org.h2.index
Class BtreePage

java.lang.Object
  extended by org.h2.util.CacheObject
      extended by org.h2.store.Record
          extended by org.h2.index.BtreePage
Direct Known Subclasses:
BtreeLeaf, BtreeNode

public abstract class BtreePage
extends Record

An abstract b-tree page.


Field Summary
protected static int BLOCKS_PER_PAGE
          The maximum number of blocks occupied by a b-tree page.
protected  BtreeIndex index
          The b-tree index object
protected  ObjectArray<SearchRow> pageData
          The list of data pages.
protected  boolean root
          If this is the root page of the index.
 
Fields inherited from class org.h2.util.CacheObject
blockCount, cacheQueue, chained, next, previous
 
Method Summary
 int getByteCount(DataPage dummy)
          Get the number of bytes required for the data if the given data page would be used.
 boolean isEmpty()
          Check if this record is empty.
 boolean isPinned()
          Check if this cache object can be removed from the cache.
 
Methods inherited from class org.h2.store.Record
canRemove, commit, getSessionId, getStorageId, isDeleted, isLogWritten, prepareWrite, setDeleted, setLastLog, setLogWritten, setSessionId, setStorageId, write
 
Methods inherited from class org.h2.util.CacheObject
getBlockCount, getMemorySize, getPos, isChanged, setBlockCount, setChanged, setPos, sort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLOCKS_PER_PAGE

protected static final int BLOCKS_PER_PAGE
The maximum number of blocks occupied by a b-tree page.

See Also:
Constant Field Values

index

protected BtreeIndex index
The b-tree index object


pageData

protected ObjectArray<SearchRow> pageData
The list of data pages.


root

protected boolean root
If this is the root page of the index.

Method Detail

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

isEmpty

public boolean isEmpty()
Description copied from class: Record
Check if this record is empty.

Overrides:
isEmpty in class Record
Returns:
false

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