Class AbstractChangeSet<S extends NodeSlot,N extends com.apple.foundationdb.async.rtree.AbstractNode<S,N>>

java.lang.Object
com.apple.foundationdb.async.rtree.AbstractChangeSet<S,N>
Type Parameters:
S - slot type class
N - node type class (self type)
All Implemented Interfaces:
Node.ChangeSet

public abstract class AbstractChangeSet<S extends NodeSlot,N extends com.apple.foundationdb.async.rtree.AbstractNode<S,N>> extends Object implements Node.ChangeSet
Abstract base implementations for all Node.ChangeSets.
  • Method Details

    • apply

      public void apply(@Nonnull Transaction transaction)
      Description copied from interface: Node.ChangeSet
      Apply all mutations for the change set. These happen transactionally using the Transaction provided.
      Specified by:
      apply in interface Node.ChangeSet
      Parameters:
      transaction - transaction to use when making all modifications
    • getPreviousChangeSet

      @Nullable public Node.ChangeSet getPreviousChangeSet()
      Previous change set in the chain of change sets. Can be null if there is no previous change set.
      Returns:
      the previous change set in the chain of change sets
    • getNode

      @Nonnull public N getNode()
      The node this change set applies to.
      Returns:
      the node this change set applies to
    • getLevel

      public int getLevel()
      The level we should use when maintaining the node slot index. If level < 0, do not maintain the node slot index.
      Returns:
      the level used when maintaing the node slot index
    • isUpdateNodeSlotIndex

      public boolean isUpdateNodeSlotIndex()
      Returns whether this change set needs to also update the node slot index. There are scenarios where we do not need to update such an index in general. For instance, the user may not want to use such an index. In addition to that, there are change set implementations that should not update the index even if such and index is maintained in general. For instance, the moved-in slots were already persisted in the database before the move-in operation. We should not update the node slot index in such a case.
      Returns:
      true if we need to update the node slot index, false otherwise