Module swim.db
Package swim.db

Class BTreeNode


  • public final class BTreeNode
    extends BTreePage
    • Constructor Detail

      • BTreeNode

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

      • 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)
      • isNode

        public boolean isNode()
        Overrides:
        isNode 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
      • 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
      • 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
      • 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
      • 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