E - The type for the stored element (either a value or a page)K - The type of the BTree keyV - The type of the BTree valueclass PersistedPageHolder<K,V> extends PageHolder<K,V>
| Modifier and Type | Field and Description |
|---|---|
private org.apache.commons.collections.map.LRUMap |
cache
The cache
|
private long |
lastOffset
The offset of the last
PageIO storing the page on disk |
private long |
offset
The offset of the first
PageIO storing the page on disk |
private RecordManager |
recordManager
The RecordManager
|
btree| Constructor and Description |
|---|
PersistedPageHolder(BTree<K,V> btree,
Page<K,V> page)
Create a new holder storing an offset and a SoftReference containing the element.
|
PersistedPageHolder(BTree<K,V> btree,
Page<K,V> page,
long offset,
long lastOffset)
Create a new holder storing an offset and a SoftReference containing the element.
|
| Modifier and Type | Method and Description |
|---|---|
private Page<K,V> |
fetchElement()
Retrieve the value from the disk, using the BTree and offset
|
(package private) long |
getLastOffset() |
(package private) long |
getOffset() |
Page<K,V> |
getValue() |
java.lang.String |
toString() |
private RecordManager recordManager
private org.apache.commons.collections.map.LRUMap cache
private long offset
PageIO storing the page on diskprivate long lastOffset
PageIO storing the page on diskpublic PersistedPageHolder(BTree<K,V> btree, Page<K,V> page)
page - The element to store into a SoftReferencepublic Page<K,V> getValue()
getValue in class PageHolder<K,V>java.io.IOExceptionEndOfFileExceededExceptionprivate Page<K,V> fetchElement()
long getOffset()
PageIO storing the data on disklong getLastOffset()
PageIO storing the data on diskpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()