Class ItemSlot
java.lang.Object
com.apple.foundationdb.async.rtree.ItemSlot
- All Implemented Interfaces:
NodeSlot
An item slot that is used by
LeafNodes. Holds the actual data of the item as well as the items Hilbert
value and its key.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionItemSlot(BigInteger hilbertValue, RTree.Point position, Tuple key, Tuple value) -
Method Summary
Modifier and TypeMethodDescriptionintcompareHilbertValueAndKey(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, waitMethods 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:
getSmallestHilbertValuein interfaceNodeSlot
-
getLargestHilbertValue
- Specified by:
getLargestHilbertValuein interfaceNodeSlot
-
getSmallestKey
- Specified by:
getSmallestKeyin interfaceNodeSlot
-
getLargestKey
- Specified by:
getLargestKeyin interfaceNodeSlot
-
getSlotKey
Description copied from interface:NodeSlotCreate 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:
getSlotKeyin 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:NodeSlotCreate 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:
getSlotValuein interfaceNodeSlot- Returns:
- a new tuple
-
compareHilbertValueAndKey
Compare this node slot's(hilbertValue, key)pair with another(hilbertValue, key)pair. We do not use a properComparatoras we don't want to wrap the pair in another object.- Parameters:
hilbertValue- Hilbert valuekey- first key- Returns:
-1, 0, 1if this node slot's pair is less/equal/greater than the pair passed in
-
toString
-