Interface NodeSlot

All Known Implementing Classes:
ChildSlot, ItemSlot

public interface NodeSlot
Abstract base class for all node slots. Holds a Hilbert value and a key. The semantics of these attributes is refined in the subclasses ItemSlot and ChildSlot.
  • Method Details

    • compareHilbertValueKeyPair

      static int compareHilbertValueKeyPair(@Nonnull BigInteger hilbertValue1, @Nonnull Tuple key1, @Nonnull BigInteger hilbertValue2, @Nonnull Tuple key2)
    • getSmallestHilbertValue

      @Nonnull BigInteger getSmallestHilbertValue()
    • getLargestHilbertValue

      @Nonnull BigInteger getLargestHilbertValue()
    • getSmallestKey

      @Nonnull Tuple getSmallestKey()
    • getSmallestKeySuffix

      @Nonnull default Tuple getSmallestKeySuffix()
    • getLargestKey

      @Nonnull Tuple getLargestKey()
    • getLargestKeySuffix

      @Nonnull default Tuple getLargestKeySuffix()
    • getSlotKey

      @Nonnull Tuple getSlotKey(boolean storeHilbertValues)
      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

      @Nonnull 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

      default int compareSmallestHilbertValueAndKey(@Nonnull BigInteger hilbertValue, @Nonnull Tuple key)
      Compare this node slot's smallest (hilbertValue, key) pair with another (hilbertValue, key) pair. We do not use a proper Comparator as we don't want to wrap the pair in another object.
      Parameters:
      hilbertValue - Hilbert value
      key - first key
      Returns:
      -1, 0, 1 if this node slot's pair is less/equal/greater than the pair passed in
    • compareLargestHilbertValueAndKey

      default int compareLargestHilbertValueAndKey(@Nonnull BigInteger hilbertValue, @Nonnull Tuple key)
      Compare this node slot's largest (hilbertValue, key) pair with another (hilbertValue, key) pair. We do not use a proper Comparator as we don't want to wrap the pair in another object.
      Parameters:
      hilbertValue - Hilbert value
      key - first key
      Returns:
      -1, 0, 1 if this node slot's pair is less/equal/greater than the pair passed in