public abstract class AbstractMapBlock extends Object implements Block
Modifier and Type | Field and Description |
---|---|
protected MethodHandle |
keyBlockNativeEquals |
protected MethodHandle |
keyNativeHashCode |
protected Type |
keyType |
Constructor and Description |
---|
AbstractMapBlock(Type keyType,
MethodHandle keyNativeHashCode,
MethodHandle keyBlockNativeEquals) |
Modifier and Type | Method and Description |
---|---|
Block |
copyPositions(List<Integer> positions)
Returns a block containing the specified positions.
|
Block |
copyRegion(int position,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
BlockEncoding |
getEncoding()
Get the encoding for this block.
|
protected abstract int[] |
getHashTables() |
protected abstract Block |
getKeys() |
protected abstract boolean[] |
getMapIsNull() |
<T> T |
getObject(int position,
Class<T> clazz)
Gets an object in the value at
position . |
protected abstract int |
getOffsetBase()
offset is entry-based, not position-based.
|
protected abstract int[] |
getOffsets()
offset is entry-based, not position-based.
|
Block |
getRegion(int position,
int length)
Returns a block starting at the specified position and extends for the
specified length.
|
long |
getRegionSizeInBytes(int position,
int length)
Returns the logical size of
block.getRegion(position, length) in memory. |
Block |
getSingleValueBlock(int position)
Gets the value at the specified position as a single element block.
|
protected abstract Block |
getValues() |
boolean |
isNull(int position)
Is the specified position null?
|
void |
writePositionTo(int position,
BlockBuilder blockBuilder)
Appends the value at
position to blockBuilder . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
assureLoaded, bytesCompare, bytesEqual, compareTo, equals, getByte, getInt, getLong, getPositionCount, getRetainedSizeInBytes, getShort, getSizeInBytes, getSlice, getSliceLength, hash, retainedBytesForEachPart, writeBytesTo
protected final Type keyType
protected final MethodHandle keyNativeHashCode
protected final MethodHandle keyBlockNativeEquals
public AbstractMapBlock(Type keyType, MethodHandle keyNativeHashCode, MethodHandle keyBlockNativeEquals)
protected abstract Block getKeys()
protected abstract Block getValues()
protected abstract int[] getHashTables()
protected abstract int[] getOffsets()
protected abstract int getOffsetBase()
protected abstract boolean[] getMapIsNull()
public BlockEncoding getEncoding()
Block
getEncoding
in interface Block
public Block copyPositions(List<Integer> positions)
Block
The returned block must be a compact representation of the original block.
copyPositions
in interface Block
public Block getRegion(int position, int length)
Block
The region can be a view over this block. If this block is released the region block may also be released. If the region block is released this block may also be released.
public long getRegionSizeInBytes(int position, int length)
Block
block.getRegion(position, length)
in memory.getRegionSizeInBytes
in interface Block
public Block copyRegion(int position, int length)
Block
The region returned must be a compact representation of the original block, unless their internal representation will be exactly the same. This method is useful for operators that hold on to a range of values without holding on to the entire block.
copyRegion
in interface Block
public <T> T getObject(int position, Class<T> clazz)
Block
position
.public void writePositionTo(int position, BlockBuilder blockBuilder)
Block
position
to blockBuilder
.writePositionTo
in interface Block
public Block getSingleValueBlock(int position)
Block
This method is useful for operators that hold on to a single value without holding on to the entire block.
getSingleValueBlock
in interface Block
Copyright © 2012-2017. All Rights Reserved.