org.h2.index
Class PageBtreeLeaf

java.lang.Object
  extended by org.h2.util.CacheObject
      extended by org.h2.store.Page
          extended by org.h2.index.PageBtree
              extended by org.h2.index.PageBtreeLeaf
All Implemented Interfaces:
java.lang.Comparable<CacheObject>

public class PageBtreeLeaf
extends PageBtree

A b-tree leaf page that contains index data. Format:


Field Summary
 
Fields inherited from class org.h2.index.PageBtree
data, entryCount, index, memoryEstimated, offsets, onlyPosition, parentPageId, rows, start, written
 
Fields inherited from class org.h2.store.Page
changeCount, FLAG_LAST, TYPE_BTREE_LEAF, TYPE_BTREE_NODE, TYPE_DATA_LEAF, TYPE_DATA_NODE, TYPE_DATA_OVERFLOW, TYPE_EMPTY, TYPE_FREE_LIST, TYPE_STREAM_DATA, TYPE_STREAM_TRUNK
 
Fields inherited from class org.h2.util.CacheObject
cacheChained, cacheNext, cachePrevious
 
Method Summary
 void moveTo(Session session, int newPos)
          Copy the data to a new location, change the parent to point to the new location, and free up the current page.
static Page read(PageBtreeIndex index, Data data, int pageId)
          Read a b-tree leaf page.
 java.lang.String toString()
           
 void write()
          Write the page.
 
Methods inherited from class org.h2.index.PageBtree
canRemove, getMemory, readAllRows
 
Methods inherited from class org.h2.store.Page
add, canMove, insert, insert, insert, remove, remove, remove
 
Methods inherited from class org.h2.util.CacheObject
compareTo, getPos, isChanged, setChanged, setPos
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

read

public static Page read(PageBtreeIndex index,
                        Data data,
                        int pageId)
Read a b-tree leaf page.

Parameters:
index - the index
data - the data
pageId - the page id
Returns:
the page

write

public void write()
Description copied from class: Page
Write the page.

Specified by:
write in class Page

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

moveTo

public void moveTo(Session session,
                   int newPos)
Description copied from class: Page
Copy the data to a new location, change the parent to point to the new location, and free up the current page.

Specified by:
moveTo in class Page
Parameters:
session - the session
newPos - the new position