public class BTree.LeafCursor extends Object implements ILeafCursor<Leaf>
Leaf
s.
Note: Instances of this class do NOT register an Leaf.ILeafListener
and therefore do NOT notice if mutation causes the current leaf to become
invalid. In general, you need to have a specific key in mind
in order to re-locate the appropriate leaf after such mutation events.
Note: The AbstractBTreeTupleCursor.MutableBTreeTupleCursor
does register such listeners.
Constructor and Description |
---|
BTree.LeafCursor(byte[] key) |
BTree.LeafCursor(SeekEnum where) |
Modifier and Type | Method and Description |
---|---|
BTree.LeafCursor |
clone()
Clone the cursor.
|
Leaf |
first()
Return the first leaf.
|
BTree |
getBTree()
The backing B+Tree.
|
Leaf |
last()
Return the last leaf.
|
Leaf |
leaf()
The current leaf (always defined).
|
Leaf |
next()
Return the next leaf in the natural order of the B+Tree.
|
Leaf |
prior()
Materialize the prior leaf in the natural order of the index (this is
more general than the right sibling which is restricted to leaves
that are children of the same direct parent).
|
Leaf |
seek(byte[] key)
Descend from the root node to the leaf spanning that key.
|
Leaf |
seek(ILeafCursor<Leaf> src)
Position this cursor on the same leaf as the given cursor.
|
public BTree.LeafCursor(SeekEnum where)
public BTree.LeafCursor(byte[] key)
public Leaf leaf()
ILeafCursor
leaf
in interface ILeafCursor<Leaf>
public BTree getBTree()
ILeafCursor
getBTree
in interface ILeafCursor<Leaf>
public BTree.LeafCursor clone()
ILeafCursor
clone
in interface ILeafCursor<Leaf>
clone
in class Object
public Leaf first()
ILeafCursor
first
in interface ILeafCursor<Leaf>
public Leaf last()
ILeafCursor
last
in interface ILeafCursor<Leaf>
public Leaf seek(byte[] key)
seek
in interface ILeafCursor<Leaf>
key
- The keynull
.public Leaf seek(ILeafCursor<Leaf> src)
ILeafCursor
seek
in interface ILeafCursor<Leaf>
src
- A cursor.public Leaf next()
ILeafCursor
next
in interface ILeafCursor<Leaf>
null
iff there is no next
leaf.public Leaf prior()
As we go down we add each non-leaf node to the hard reference stack.
In order to make this operation atomic, the nodes to be popped are added to a temporary stack until we
prior
in interface ILeafCursor<Leaf>
null
if there is no
predecessor of this leaf.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.