Class ItemSlot
java.lang.Object
com.apple.foundationdb.async.rtree.ItemSlot
- All Implemented Interfaces:
NodeSlot
An item slot that is used by
LeafNode
s. Holds the actual data of the item as well as the items Hilbert
value and its key.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionItemSlot
(BigInteger hilbertValue, RTree.Point position, Tuple key, Tuple value) -
Method Summary
Modifier and TypeMethodDescriptionint
compareHilbertValueAndKey
(BigInteger hilbertValue, Tuple key) Compare this node slot's(hilbertValue, key)
pair with another(hilbertValue, key)
pair.getKey()
getSlotKey
(boolean storeHilbertValues) Create a tuple for the key part of this slot.Create a tuple for the value part of this slot.getValue()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.apple.foundationdb.async.rtree.NodeSlot
compareLargestHilbertValueAndKey, compareSmallestHilbertValueAndKey, getLargestKeySuffix, getSmallestKeySuffix
-
Field Details
-
SLOT_KEY_TUPLE_SIZE
public static final int SLOT_KEY_TUPLE_SIZE- See Also:
-
SLOT_VALUE_TUPLE_SIZE
public static final int SLOT_VALUE_TUPLE_SIZE- See Also:
-
-
Constructor Details
-
ItemSlot
public ItemSlot(@Nonnull BigInteger hilbertValue, @Nonnull RTree.Point position, @Nonnull Tuple key, @Nonnull Tuple value)
-
-
Method Details
-
getHilbertValue
-
getKey
-
getKeySuffix
-
getValue
-
getPosition
-
getSmallestHilbertValue
- Specified by:
getSmallestHilbertValue
in interfaceNodeSlot
-
getLargestHilbertValue
- Specified by:
getLargestHilbertValue
in interfaceNodeSlot
-
getSmallestKey
- Specified by:
getSmallestKey
in interfaceNodeSlot
-
getLargestKey
- Specified by:
getLargestKey
in interfaceNodeSlot
-
getSlotKey
Description copied from interface:NodeSlot
Create a tuple for the key part of this slot. This tuple is used when the slot is persisted in the database. Note that the serialization format is not yet finalized.- Specified by:
getSlotKey
in interfaceNodeSlot
- Parameters:
storeHilbertValues
- indicator if the hilbert value should be encoded into the slot key or null-ed out- Returns:
- a new tuple
-
getSlotValue
Description copied from interface:NodeSlot
Create a tuple for the value part of this slot. This tuple is used when the slot is persisted in the database. Note that the serialization format is not yet finalized.- Specified by:
getSlotValue
in interfaceNodeSlot
- Returns:
- a new tuple
-
compareHilbertValueAndKey
Compare this node slot's(hilbertValue, key)
pair with another(hilbertValue, key)
pair. We do not use a properComparator
as we don't want to wrap the pair in another object.- Parameters:
hilbertValue
- Hilbert valuekey
- first key- Returns:
-1, 0, 1
if this node slot's pair is less/equal/greater than the pair passed in
-
toString
-