Class ChildSlot

java.lang.Object
com.apple.foundationdb.async.rtree.ChildSlot
All Implemented Interfaces:
NodeSlot

public class ChildSlot extends Object implements NodeSlot
A child slot that is used by IntermediateNodes. Holds the id of a child node, as well as the largest hilbert value of its child, the largest key of its child and an mbr that encompasses all points in the subtree rooted at the child.
  • Method Details

    • getChildId

      @Nonnull public byte[] getChildId()
    • getSmallestHilbertValue

      @Nonnull public BigInteger getSmallestHilbertValue()
      Specified by:
      getSmallestHilbertValue in interface NodeSlot
    • getSmallestKey

      @Nonnull public Tuple getSmallestKey()
      Specified by:
      getSmallestKey in interface NodeSlot
    • getLargestHilbertValue

      @Nonnull public BigInteger getLargestHilbertValue()
      Specified by:
      getLargestHilbertValue in interface NodeSlot
    • getLargestKey

      @Nonnull public Tuple getLargestKey()
      Specified by:
      getLargestKey in interface NodeSlot
    • getMbr

      @Nonnull public RTree.Rectangle getMbr()
    • getSlotKey

      @Nonnull public Tuple getSlotKey(boolean storeHilbertValue)
      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 interface NodeSlot
      Parameters:
      storeHilbertValue - indicator if the hilbert value should be encoded into the slot key or null-ed out
      Returns:
      a new tuple
    • getSlotValue

      @Nonnull public 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 interface NodeSlot
      Returns:
      a new tuple
    • suffixPredicateCanBeApplied

      public boolean suffixPredicateCanBeApplied()
      Method to determine if (during a scan a suffix predicate can be applied). A suffix predicate can only be applied, if the smallest and largest hilbert value as well as the non-suffix part of the key are the same.
      Returns:
      true if a suffix predicate can be applied on this child slot
    • toString

      @Nonnull public String toString()
      Overrides:
      toString in class Object