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