Package org.h2.mvstore
Class CursorPos<K,V>
- java.lang.Object
-
- org.h2.mvstore.CursorPos<K,V>
-
public final class CursorPos<K,V> extends java.lang.Object
A position in a cursor. Instance represents a node in the linked list, which traces path from a specific (target) key within a leaf node all the way up to te root (bottom up path).
-
-
Field Summary
Fields Modifier and Type Field Description int
index
Index of the key (within page above) used to go down to a lower level in case of intermediate nodes, or index of the target key for leaf a node.Page<K,V>
page
The page at the current level.CursorPos<K,V>
parent
Next node in the linked list, representing the position within parent level, or null, if we are at the root level already.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
processRemovalInfo(long version)
Calculate the memory used by changes that are not yet stored.java.lang.String
toString()
(package private) static <K,V>
CursorPos<K,V>traverseDown(Page<K,V> page, K key)
Searches for a given key and creates a breadcrumb trail through a B-tree rooted at a given Page.
-
-
-
Method Detail
-
traverseDown
static <K,V> CursorPos<K,V> traverseDown(Page<K,V> page, K key)
Searches for a given key and creates a breadcrumb trail through a B-tree rooted at a given Page. Resulting path starts at "insertion point" for a given key and goes back to the root.- Type Parameters:
K
- key typeV
- value type- Parameters:
page
- root of the treekey
- the key to search for- Returns:
- head of the CursorPos chain (insertion point)
-
processRemovalInfo
int processRemovalInfo(long version)
Calculate the memory used by changes that are not yet stored.- Parameters:
version
- the version- Returns:
- the amount of memory
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-