org.h2.index
Class BtreeHead
java.lang.Object
org.h2.util.CacheObject
org.h2.store.Record
org.h2.index.BtreeHead
public class BtreeHead
- extends Record
The head page of a b-tree index. There is exactly one head page for each such
index, and it contains meta data such as the location of the root page.
Unlike the root page of a b-tree index, the head page always stays at the
same place.
Method Summary |
int |
getByteCount(DataPage dummy)
Get the number of bytes required for the data if the given data page
would be used. |
boolean |
isPinned()
Check if this cache object can be removed from the cache. |
void |
write(DataPage buff)
Write the record to the data page. |
Methods inherited from class org.h2.store.Record |
canRemove, commit, getSessionId, getStorageId, isDeleted, isEmpty, isLogWritten, prepareWrite, setDeleted, setLastLog, setLogWritten, setSessionId, setStorageId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BtreeHead
public BtreeHead()
BtreeHead
public BtreeHead(DataPage s)
getByteCount
public int getByteCount(DataPage dummy)
- Description copied from class:
Record
- Get the number of bytes required for the data if the given data page
would be used.
- Specified by:
getByteCount
in class Record
- Parameters:
dummy
- the template data page
- Returns:
- the number of bytes
write
public void write(DataPage buff)
- Description copied from class:
Record
- Write the record to the data page.
- Specified by:
write
in class Record
- Parameters:
buff
- the data page
isPinned
public boolean isPinned()
- Description copied from class:
CacheObject
- Check if this cache object can be removed from the cache.
- Overrides:
isPinned
in class CacheObject
- Returns:
- if it can be removed