Interface NodeSlot
public interface NodeSlot
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareHilbertValueKeyPair
(BigInteger hilbertValue1, Tuple key1, BigInteger hilbertValue2, Tuple key2) default int
compareLargestHilbertValueAndKey
(BigInteger hilbertValue, Tuple key) Compare this node slot's largest(hilbertValue, key)
pair with another(hilbertValue, key)
pair.default int
compareSmallestHilbertValueAndKey
(BigInteger hilbertValue, Tuple key) Compare this node slot's smallest(hilbertValue, key)
pair with another(hilbertValue, key)
pair.default Tuple
getSlotKey
(boolean storeHilbertValues) Create a tuple for the key part of this slot.Create a tuple for the value part of this slot.default Tuple
-
Method Details
-
compareHilbertValueKeyPair
static int compareHilbertValueKeyPair(@Nonnull BigInteger hilbertValue1, @Nonnull Tuple key1, @Nonnull BigInteger hilbertValue2, @Nonnull Tuple key2) -
getSmallestHilbertValue
-
getLargestHilbertValue
-
getSmallestKey
-
getSmallestKeySuffix
-
getLargestKey
-
getLargestKeySuffix
-
getSlotKey
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.- Parameters:
storeHilbertValues
- indicator if the hilbert value should be encoded into the slot key or null-ed out- Returns:
- a new tuple
-
getSlotValue
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.- Returns:
- a new tuple
-
compareSmallestHilbertValueAndKey
Compare this node slot's smallest(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
-
compareLargestHilbertValueAndKey
Compare this node slot's largest(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
-