Module swim.db
Package swim.db

Class BTreeNode


public final class BTreeNode extends BTreePage
  • Constructor Details

    • BTreeNode

      protected BTreeNode(BTreePageRef pageRef, long version, BTreePageRef[] childRefs, swim.structure.Value[] knotKeys)
  • Method Details

    • isNode

      public boolean isNode()
      Overrides:
      isNode in class Page
    • pageRef

      public BTreePageRef pageRef()
      Specified by:
      pageRef in class BTreePage
    • pageType

      public PageType pageType()
      Specified by:
      pageType in class Page
    • version

      public long version()
      Specified by:
      version in class Page
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in class Page
    • arity

      public int arity()
      Specified by:
      arity in class Page
    • childCount

      public int childCount()
      Specified by:
      childCount in class Page
    • getChildRef

      public BTreePageRef getChildRef(int index)
      Specified by:
      getChildRef in class BTreePage
    • getChild

      public BTreePage getChild(int index)
      Specified by:
      getChild in class BTreePage
    • getSlot

      public swim.structure.Slot getSlot(int x)
      Specified by:
      getSlot in class BTreePage
    • getKey

      public swim.structure.Value getKey(int x)
      Specified by:
      getKey in class BTreePage
    • minKey

      public swim.structure.Value minKey()
      Specified by:
      minKey in class BTreePage
    • maxKey

      public swim.structure.Value maxKey()
      Specified by:
      maxKey in class BTreePage
    • containsKey

      public boolean containsKey(swim.structure.Value key)
      Specified by:
      containsKey in class BTreePage
    • containsValue

      public boolean containsValue(swim.structure.Value value)
      Specified by:
      containsValue in class BTreePage
    • indexOf

      public long indexOf(swim.structure.Value key)
      Specified by:
      indexOf in class BTreePage
    • get

      public swim.structure.Value get(swim.structure.Value key)
      Specified by:
      get in class BTreePage
    • getEntry

      public swim.structure.Slot getEntry(swim.structure.Value key)
      Specified by:
      getEntry in class BTreePage
    • getIndex

      public swim.structure.Slot getIndex(long index)
      Specified by:
      getIndex in class BTreePage
    • firstEntry

      public swim.structure.Slot firstEntry(swim.structure.Value key)
      Specified by:
      firstEntry in class BTreePage
    • firstEntry

      public swim.structure.Slot firstEntry()
      Specified by:
      firstEntry in class BTreePage
    • lastEntry

      public swim.structure.Slot lastEntry()
      Specified by:
      lastEntry in class BTreePage
    • nextEntry

      public swim.structure.Slot nextEntry(swim.structure.Value key)
      Specified by:
      nextEntry in class BTreePage
    • previousEntry

      public swim.structure.Slot previousEntry(swim.structure.Value key)
      Specified by:
      previousEntry in class BTreePage
    • updated

      public BTreePage updated(swim.structure.Value key, swim.structure.Value newValue, long newVersion)
      Specified by:
      updated in class BTreePage
    • removed

      public BTreePage removed(swim.structure.Value key, long newVersion)
      Specified by:
      removed in class BTreePage
    • drop

      public BTreePage drop(long lower, long newVersion)
      Specified by:
      drop in class BTreePage
    • take

      public BTreePage take(long upper, long newVersion)
      Specified by:
      take in class BTreePage
    • balanced

      public BTreeNode balanced(long newVersion)
      Specified by:
      balanced in class BTreePage
    • split

      public BTreeNode split(int x, long newVersion)
      Specified by:
      split in class BTreePage
    • splitLeft

      public BTreeNode splitLeft(int x, long newVersion)
      Specified by:
      splitLeft in class BTreePage
    • splitRight

      public BTreeNode splitRight(int x, long newVersion)
      Specified by:
      splitRight in class BTreePage
    • pageSize

      public int pageSize()
      Overrides:
      pageSize in class Page
    • diffSize

      public int diffSize()
      Overrides:
      diffSize in class Page
    • treeSize

      public long treeSize()
      Overrides:
      treeSize in class Page
    • toHeader

      public swim.structure.Value toHeader()
      Specified by:
      toHeader in class Page
    • toValue

      public swim.structure.Value toValue()
      Specified by:
      toValue in class Page
    • reduced

      public BTreeNode reduced(swim.structure.Value identity, swim.util.CombinerFunction<? super swim.structure.Value,swim.structure.Value> accumulator, swim.util.CombinerFunction<swim.structure.Value,swim.structure.Value> combiner, long newVersion)
      Specified by:
      reduced in class BTreePage
    • evacuated

      public BTreeNode evacuated(int post, long version)
      Specified by:
      evacuated in class BTreePage
    • committed

      public BTreeNode committed(int zone, long base, long version)
      Specified by:
      committed in class BTreePage
    • uncommitted

      public BTreeNode uncommitted(long version)
      Specified by:
      uncommitted in class BTreePage
    • writePage

      public void writePage(swim.codec.Output<?> output)
      Specified by:
      writePage in class Page
    • writeDiff

      public void writeDiff(swim.codec.Output<?> output)
      Specified by:
      writeDiff in class Page
    • buildDiff

      public void buildDiff(swim.util.Builder<Page,?> builder)
      Specified by:
      buildDiff in class Page
    • loadTree

      public BTreePage loadTree(PageLoader pageLoader)
      Specified by:
      loadTree in class BTreePage
    • soften

      public void soften(long version)
      Specified by:
      soften in class Page
    • cursor

      public swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> cursor()
      Specified by:
      cursor in class BTreePage
    • depthCursor

      public swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> depthCursor(int maxDepth)
      Specified by:
      depthCursor in class BTreePage
    • deltaCursor

      public swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> deltaCursor(long sinceVersion)
      Specified by:
      deltaCursor in class BTreePage
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • create

      public static BTreeNode create(PageContext context, int stem, long version, int post, int zone, long base, long span, swim.structure.Value fold, BTreePageRef[] childRefs, swim.structure.Value[] knotKeys)
    • create

      public static BTreeNode create(PageContext context, int stem, long version, int zone, long base, long span, swim.structure.Value fold, BTreePageRef[] childRefs, swim.structure.Value[] knotKeys)
    • create

      public static BTreeNode create(PageContext context, int stem, long version, long span, swim.structure.Value fold, BTreePageRef[] childRefs, swim.structure.Value[] knotKeys)
    • fromValue

      public static BTreeNode fromValue(BTreePageRef pageRef, swim.structure.Value value)