public abstract class AbstractVariableWidthBlock extends Object implements Block
| Constructor and Description |
|---|
AbstractVariableWidthBlock() |
| Modifier and Type | Method and Description |
|---|---|
void |
assureLoaded()
Assures that all data for the block is in memory.
|
int |
bytesCompare(int position,
int offset,
int length,
io.airlift.slice.Slice otherSlice,
int otherOffset,
int otherLength)
Compares the byte sequences at
offset in the value at position
to the byte sequence at otherOffset in otherSlice. |
boolean |
bytesEqual(int position,
int offset,
io.airlift.slice.Slice otherSlice,
int otherOffset,
int length)
Is the byte sequences at
offset in the value at position equal
to the byte sequence at otherOffset in otherSlice. |
int |
compareTo(int position,
int offset,
int length,
Block otherBlock,
int otherPosition,
int otherOffset,
int otherLength)
Compares the byte sequences at
offset in the value at position
to the byte sequence at otherOffset in the value at otherPosition
in otherBlock. |
boolean |
equals(int position,
int offset,
Block otherBlock,
int otherPosition,
int otherOffset,
int length)
Is the byte sequences at
offset in the value at position equal
to the byte sequence at otherOffset in the value at otherPosition
in otherBlock. |
byte |
getByte(int position,
int offset)
Gets a byte at
offset in the value at position. |
double |
getDouble(int position,
int offset)
Gets a little endian double at
offset in the value at position. |
BlockEncoding |
getEncoding()
Get the encoding for this block.
|
float |
getFloat(int position,
int offset)
Gets a little endian float at
offset in the value at position. |
int |
getInt(int position,
int offset)
Gets a little endian int at
offset in the value at position. |
long |
getLong(int position,
int offset)
Gets a little endian long at
offset in the value at position. |
protected abstract int |
getPositionOffset(int position) |
protected abstract io.airlift.slice.Slice |
getRawSlice(int position) |
short |
getShort(int position,
int offset)
Gets a little endian short at
offset in the value at position. |
Block |
getSingleValueBlock(int position)
Gets the value at the specified position as a single element block.
|
io.airlift.slice.Slice |
getSlice(int position,
int offset,
int length)
Gets a slice at
offset in the value at position. |
int |
hash(int position,
int offset,
int length)
Calculates the hash code the byte sequences at
offset in the
value at position. |
protected abstract boolean |
isEntryNull(int position) |
boolean |
isNull(int position)
Is the specified position null?
|
void |
writeBytesTo(int position,
int offset,
int length,
BlockBuilder blockBuilder)
Appends the byte sequences at
offset in the value at position
to blockBuilder. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLength, getPositionCount, getRegion, getSizeInBytesprotected abstract io.airlift.slice.Slice getRawSlice(int position)
protected abstract int getPositionOffset(int position)
protected abstract boolean isEntryNull(int position)
public BlockEncoding getEncoding()
BlockgetEncoding in interface Blockpublic byte getByte(int position,
int offset)
Blockoffset in the value at position.public short getShort(int position,
int offset)
Blockoffset in the value at position.public int getInt(int position,
int offset)
Blockoffset in the value at position.public long getLong(int position,
int offset)
Blockoffset in the value at position.public float getFloat(int position,
int offset)
Blockoffset in the value at position.public double getDouble(int position,
int offset)
Blockoffset in the value at position.public io.airlift.slice.Slice getSlice(int position,
int offset,
int length)
Blockoffset in the value at position.public boolean equals(int position,
int offset,
Block otherBlock,
int otherPosition,
int otherOffset,
int length)
Blockoffset in the value at position equal
to the byte sequence at otherOffset in the value at otherPosition
in otherBlock.public boolean bytesEqual(int position,
int offset,
io.airlift.slice.Slice otherSlice,
int otherOffset,
int length)
Blockoffset in the value at position equal
to the byte sequence at otherOffset in otherSlice.bytesEqual in interface Blockpublic int hash(int position,
int offset,
int length)
Blockoffset in the
value at position.public int compareTo(int position,
int offset,
int length,
Block otherBlock,
int otherPosition,
int otherOffset,
int otherLength)
Blockoffset in the value at position
to the byte sequence at otherOffset in the value at otherPosition
in otherBlock.public int bytesCompare(int position,
int offset,
int length,
io.airlift.slice.Slice otherSlice,
int otherOffset,
int otherLength)
Blockoffset in the value at position
to the byte sequence at otherOffset in otherSlice.bytesCompare in interface Blockpublic void writeBytesTo(int position,
int offset,
int length,
BlockBuilder blockBuilder)
Blockoffset in the value at position
to blockBuilder.writeBytesTo in interface Blockpublic Block getSingleValueBlock(int position)
BlockgetSingleValueBlock in interface Blockpublic boolean isNull(int position)
Blockpublic void assureLoaded()
BlockassureLoaded in interface BlockCopyright © 2012-2015. All Rights Reserved.