PageBtreeNode
A b-tree node page that contains index data. Format:
- page type: byte
- checksum: short
- parent page id (0 for root): int
- index id: varInt
- count of all children (-1 if not known): int
- entry count: short
- rightmost child page id: int
- entries (child page id: int, offset: short)
The row contains the largest key of the respective child,
meaning row[0] contains the largest key of child[0].
| Methods |
| static PageBtreeNode |
create(PageBtreeIndex index, int pageId, int parentPageId)
Create a new b-tree node page.
|
| static PageBtreeNode |
create(PageBtreeIndex index, int pageId, int parentPageId)
Create a new b-tree node page.
Parameters:
index - the index
pageId - the page id
parentPageId - the parent page id
Returns:
the page
|
| static Page |
read(PageBtreeIndex index, Data data, int pageId)
Read a b-tree node page.
|
| static Page |
read(PageBtreeIndex index, Data data, int pageId)
Read a b-tree node page.
Parameters:
index - the index
data - the data
pageId - the page id
Returns:
the page
|
| int |
addRowTry(SearchRow row)
|
| int |
addRowTry(SearchRow row)
|
| void |
find(PageBtreeCursor cursor, SearchRow first, boolean bigger)
|
| void |
find(PageBtreeCursor cursor, SearchRow first, boolean bigger)
|
| void |
freeRecursive()
|
| void |
freeRecursive()
|
| PageBtreeLeaf |
getFirstLeaf()
|
| PageBtreeLeaf |
getFirstLeaf()
|
| PageBtreeLeaf |
getLastLeaf()
|
| PageBtreeLeaf |
getLastLeaf()
|
| int |
getRowCount()
|
| int |
getRowCount()
|
| void |
init(PageBtree page1, SearchRow pivot, PageBtree page2)
Initialize the page.
|
| void |
init(PageBtree page1, SearchRow pivot, PageBtree page2)
Initialize the page.
Parameters:
page1 - the first child page
pivot - the pivot key
page2 - the last child page
|
| void |
last(PageBtreeCursor cursor)
|
| void |
last(PageBtreeCursor cursor)
|
| void |
moveChild(int oldPos, int newPos)
One of the children has moved to a new page.
|
| void |
moveChild(int oldPos, int newPos)
One of the children has moved to a new page.
Parameters:
oldPos - the old position
newPos - the new position
|
| void |
moveTo(Session session, int newPos)
|
| void |
moveTo(Session session, int newPos)
|
| void |
nextPage(PageBtreeCursor cursor, int pageId)
Set the cursor to the first row of the next page.
|
| void |
nextPage(PageBtreeCursor cursor, int pageId)
Set the cursor to the first row of the next page.
Parameters:
cursor - the cursor
pageId - id of the next page
|
| void |
previousPage(PageBtreeCursor cursor, int pageId)
Set the cursor to the last row of the previous page.
|
| void |
previousPage(PageBtreeCursor cursor, int pageId)
Set the cursor to the last row of the previous page.
Parameters:
cursor - the cursor
pageId - id of the previous page
|
| void |
remapChildren()
|
| void |
remapChildren()
|
| SearchRow |
remove(SearchRow row)
|
| SearchRow |
remove(SearchRow row)
|
| void |
setRowCountStored(int rowCount)
|
| void |
setRowCountStored(int rowCount)
|
| PageBtree |
split(int splitPoint)
|
| PageBtree |
split(int splitPoint)
|
| String |
toString()
|
| String |
toString()
|
| void |
write()
|
| void |
write()
|
|