- java.lang.Object
-
- swim.db.Page
-
- swim.db.BTreePage
-
- swim.db.BTreeNode
-
public final class BTreeNode extends BTreePage
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BTreeNode(BTreePageRef pageRef, long version, BTreePageRef[] childRefs, Value[] knotKeys)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
arity()
BTreeNode
balanced(long newVersion)
void
buildDiff(Builder<Page,?> builder)
int
childCount()
BTreeNode
committed(int zone, long base, long version)
boolean
containsKey(Value key)
boolean
containsValue(Value value)
static BTreeNode
create(PageContext context, int stem, long version, int post, int zone, long base, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
static BTreeNode
create(PageContext context, int stem, long version, int zone, long base, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
static BTreeNode
create(PageContext context, int stem, long version, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
OrderedMapCursor<Value,Value>
cursor()
OrderedMapCursor<Value,Value>
deltaCursor(long sinceVersion)
OrderedMapCursor<Value,Value>
depthCursor(int maxDepth)
int
diffSize()
BTreePage
drop(long lower, long newVersion)
BTreeNode
evacuated(int post, long version)
Slot
firstEntry()
Slot
firstEntry(Value key)
static BTreeNode
fromValue(BTreePageRef pageRef, Value value)
Value
get(Value key)
BTreePage
getChild(int index)
BTreePageRef
getChildRef(int index)
Slot
getEntry(Value key)
Slot
getIndex(long index)
Value
getKey(int x)
Slot
getSlot(int x)
long
indexOf(Value key)
boolean
isEmpty()
boolean
isNode()
Slot
lastEntry()
BTreePage
loadTree(PageLoader pageLoader)
Value
maxKey()
Value
minKey()
Slot
nextEntry(Value key)
BTreePageRef
pageRef()
int
pageSize()
PageType
pageType()
Slot
previousEntry(Value key)
BTreeNode
reduced(Value identity, CombinerFunction<? super Value,Value> accumulator, CombinerFunction<Value,Value> combiner, long newVersion)
BTreePage
removed(Value key, long newVersion)
void
soften(long version)
BTreeNode
split(int x, long newVersion)
BTreeNode
splitLeft(int x, long newVersion)
BTreeNode
splitRight(int x, long newVersion)
BTreePage
take(long upper, long newVersion)
Value
toHeader()
String
toString()
Value
toValue()
long
treeSize()
BTreeNode
uncommitted(long version)
BTreePage
updated(Value key, Value newValue, long newVersion)
long
version()
void
writeDiff(Output<?> output)
void
writePage(Output<?> output)
-
Methods inherited from class swim.db.BTreePage
empty, isBTreePage
-
Methods inherited from class swim.db.Page
base, fold, isLeaf, isQTreePage, isSTreePage, isUTreePage, pageContext, post, printTree, span, stem, toDebugString, zone
-
-
-
-
Constructor Detail
-
BTreeNode
protected BTreeNode(BTreePageRef pageRef, long version, BTreePageRef[] childRefs, Value[] knotKeys)
-
-
Method Detail
-
pageRef
public BTreePageRef pageRef()
-
childCount
public int childCount()
- Specified by:
childCount
in classPage
-
getChildRef
public BTreePageRef getChildRef(int index)
- Specified by:
getChildRef
in classBTreePage
-
containsKey
public boolean containsKey(Value key)
- Specified by:
containsKey
in classBTreePage
-
containsValue
public boolean containsValue(Value value)
- Specified by:
containsValue
in classBTreePage
-
firstEntry
public Slot firstEntry(Value key)
- Specified by:
firstEntry
in classBTreePage
-
firstEntry
public Slot firstEntry()
- Specified by:
firstEntry
in classBTreePage
-
previousEntry
public Slot previousEntry(Value key)
- Specified by:
previousEntry
in classBTreePage
-
splitLeft
public BTreeNode splitLeft(int x, long newVersion)
-
splitRight
public BTreeNode splitRight(int x, long newVersion)
- Specified by:
splitRight
in classBTreePage
-
reduced
public BTreeNode reduced(Value identity, CombinerFunction<? super Value,Value> accumulator, CombinerFunction<Value,Value> combiner, long newVersion)
-
evacuated
public BTreeNode evacuated(int post, long version)
-
committed
public BTreeNode committed(int zone, long base, long version)
-
uncommitted
public BTreeNode uncommitted(long version)
- Specified by:
uncommitted
in classBTreePage
-
loadTree
public BTreePage loadTree(PageLoader pageLoader)
-
cursor
public OrderedMapCursor<Value,Value> cursor()
-
depthCursor
public OrderedMapCursor<Value,Value> depthCursor(int maxDepth)
- Specified by:
depthCursor
in classBTreePage
-
deltaCursor
public OrderedMapCursor<Value,Value> deltaCursor(long sinceVersion)
- Specified by:
deltaCursor
in classBTreePage
-
create
public static BTreeNode create(PageContext context, int stem, long version, int post, int zone, long base, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
-
create
public static BTreeNode create(PageContext context, int stem, long version, int zone, long base, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
-
create
public static BTreeNode create(PageContext context, int stem, long version, long span, Value fold, BTreePageRef[] childRefs, Value[] knotKeys)
-
fromValue
public static BTreeNode fromValue(BTreePageRef pageRef, Value value)
-
-