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