Package org.h2.mvstore
Class Page.PageReference<K,V>
- java.lang.Object
-
- org.h2.mvstore.Page.PageReference<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longcountThe descendant count for this child page.(package private) static Page.PageReferenceEMPTYSingleton object used when arrays of PageReference have not yet been filled.private Page<K,V>pageThe page, if in memory, or null.private longposThe position, if known, or 0.
-
Constructor Summary
Constructors Modifier Constructor Description (package private)PageReference(long pos, long count)PageReference(Page<K,V> page)privatePageReference(Page<K,V> page, long pos, long count)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidclearPageReference()Clear if necessary, reference to the actual child Page object, so it can be garbage collected if not actively used elsewhere.static <X,Y>
Page.PageReference<X,Y>empty()Get an empty page reference.Page<K,V>getPage()(package private) longgetPos()(package private) voidresetPos()Re-acquire position from in-memory page.java.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY
static final Page.PageReference EMPTY
Singleton object used when arrays of PageReference have not yet been filled.
-
pos
private long pos
The position, if known, or 0.
-
count
final long count
The descendant count for this child page.
-
-
Method Detail
-
empty
public static <X,Y> Page.PageReference<X,Y> empty()
Get an empty page reference.- Type Parameters:
X- the key classY- the value class- Returns:
- the page reference
-
clearPageReference
void clearPageReference()
Clear if necessary, reference to the actual child Page object, so it can be garbage collected if not actively used elsewhere. Reference is cleared only if corresponding page was already saved on a disk.
-
getPos
long getPos()
-
resetPos
void resetPos()
Re-acquire position from in-memory page.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-