public abstract class AbstractVariableWidthBlock extends Object implements Block
| Constructor and Description |
|---|
AbstractVariableWidthBlock() |
| Modifier and Type | Method and Description |
|---|---|
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. |
protected void |
checkReadablePosition(int position) |
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)
Gets a byte in the value at
position. |
String |
getEncodingName()
Get the encoding for this block.
|
long |
getEstimatedDataSizeForStats(int position)
Returns the estimated in memory data size for stats of position.
|
int |
getInt(int position)
Gets a little endian int in the value at
position. |
long |
getLong(int position)
Gets a little endian long in the value at
position. |
long |
getLong(int position,
int offset)
Gets a little endian long at
offset in the value at position. |
abstract int |
getPositionOffset(int position) |
abstract io.airlift.slice.Slice |
getRawSlice(int position) |
short |
getShort(int position)
Gets a little endian short at 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. |
long |
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. |
void |
writeBytesTo(int position,
int offset,
int length,
io.airlift.slice.SliceOutput sliceOutput)
Appends the byte sequences at
offset in the value at position
to sliceOutput. |
void |
writePositionTo(int position,
BlockBuilder blockBuilder)
Appends the value at
position to blockBuilder and close the entry. |
void |
writePositionTo(int position,
io.airlift.slice.SliceOutput output)
Appends the value at
position to output. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitappendNull, copyPositions, copyRegion, fixedSizeInBytesPerPosition, getApproximateRegionLogicalSizeInBytes, getBlock, getLoadedBlock, getLogicalSizeInBytes, getPositionCount, getPositions, getPositionsSizeInBytes, getRegion, getRegionLogicalSizeInBytes, getRegionSizeInBytes, getRetainedSizeInBytes, getSizeInBytes, getSliceLength, mayHaveNull, retainedBytesForEachPartgetBlockUnchecked, getByteUnchecked, getIntUnchecked, getLongUnchecked, getLongUnchecked, getOffsetBase, getShortUnchecked, getSliceLengthUnchecked, getSliceUnchecked, isNullUncheckedpublic abstract io.airlift.slice.Slice getRawSlice(int position)
public abstract int getPositionOffset(int position)
protected abstract boolean isEntryNull(int position)
public String getEncodingName()
BlockgetEncodingName in interface Blockpublic byte getByte(int position)
Blockposition.public short getShort(int position)
Blockposition.public int getInt(int position)
Blockposition.public long getLong(int position)
Blockposition.public long getLong(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.
This method must be implemented if @{code getSlice} is implemented.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.
This method must be implemented if @{code getSlice} is implemented.bytesEqual in interface Blockpublic long hash(int position,
int offset,
int length)
Blockoffset in the
value at position.
This method must be implemented if @{code getSlice} is implemented.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.
This method must be implemented if @{code getSlice} is implemented.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.
This method must be implemented if @{code getSlice} is implemented.bytesCompare in interface Blockpublic void writeBytesTo(int position,
int offset,
int length,
BlockBuilder blockBuilder)
Blockoffset in the value at position
to blockBuilder.
This method must be implemented if @{code getSlice} is implemented.writeBytesTo in interface Blockpublic void writeBytesTo(int position,
int offset,
int length,
io.airlift.slice.SliceOutput sliceOutput)
Blockoffset in the value at position
to sliceOutput.
This method must be implemented if @{code getSlice} is implemented.writeBytesTo in interface Blockpublic void writePositionTo(int position,
BlockBuilder blockBuilder)
Blockposition to blockBuilder and close the entry.writePositionTo in interface Blockpublic void writePositionTo(int position,
io.airlift.slice.SliceOutput output)
Blockposition to output.writePositionTo in interface Blockpublic Block getSingleValueBlock(int position)
BlockThis method is useful for operators that hold on to a single value without holding on to the entire block.
getSingleValueBlock in interface Blockpublic long getEstimatedDataSizeForStats(int position)
BlockgetEstimatedDataSizeForStats in interface Blockpublic boolean isNull(int position)
Blockprotected void checkReadablePosition(int position)
Copyright © 2012–2022. All rights reserved.