| java.lang.Object org.apache.derby.impl.store.access.btree.BranchRow
BranchRow | public class BranchRow (Code) | | Implements row which is stored in the branch pages of a btree. A non-suffix
compressed branch row contains all of the columns of the leaf rows of a btree
and contains an additional field at the end. The extra field of a branch row
in a branch page at level N, is the child page field pointing the page at
level N-1 which has keys which follow or equal the branch row entry.
There are 3 ways to use this class to produce a branch row:
createEmptyTemplate()
creates a empty row template
createBranchRowFromOldBranchRow()
creates a new row with reference to an old branch row.
createBranchRowFromOldLeafRow()
creates a new row with reference to an old leaf row.
|
Method Summary | |
public BranchRow | createBranchRowFromOldBranchRow(long childpageno) Create a new branch row, given a old branch row and a new child page.
Used by BranchControlRow to manufacture new branch rows when splitting
or growing the tree.
There is no way to "copy" values of a template row, so this class just
stores a reference to each of the columns of the Indexable row passed
in. | public static BranchRow | createBranchRowFromOldLeafRow(DataValueDescriptor[] leafrow, long childpageno) Create a new branch row, given a old leaf row and a new child page.
Used by LeafControlRow to manufacture new branch rows when splitting
or growing the tree.
There is no way to "copy" values of a template row, so this class just
stores a referece to the Indexable row passed in. | public static BranchRow | createEmptyTemplate(BTree btree) Create an empty branch row template suitable for reading branch rows in
from disk. | protected DataValueDescriptor[] | getRow() Return the branch row. | protected void | setPageNumber(long page_number) Set the page number field of the branch row to a new value. | public String | toString() |
DUMMY_PAGE_NUMBER | final public static long DUMMY_PAGE_NUMBER(Code) | | |
createBranchRowFromOldBranchRow | public BranchRow createBranchRowFromOldBranchRow(long childpageno)(Code) | | Create a new branch row, given a old branch row and a new child page.
Used by BranchControlRow to manufacture new branch rows when splitting
or growing the tree.
There is no way to "copy" values of a template row, so this class just
stores a reference to each of the columns of the Indexable row passed
in. This is ok as all
usages of this class when instantiated this way, have an old branch row
from which they are creating a new branch row with the same key values,
and a different child page number.
WARNING - this branch row is only valid while the old branch row is
valid, as it contains references to the columns of the old branch row.
So use of the row should only provide read-only access to the objects
of the old branch row which are referenced.
|
createBranchRowFromOldLeafRow | public static BranchRow createBranchRowFromOldLeafRow(DataValueDescriptor[] leafrow, long childpageno)(Code) | | Create a new branch row, given a old leaf row and a new child page.
Used by LeafControlRow to manufacture new branch rows when splitting
or growing the tree.
There is no way to "copy" values of a template row, so this class just
stores a referece to the Indexable row passed in. This is ok as all
usages of this class when instantiated this way, have an old leaf row
from which they are creating a new branch row with the same key values,
and a different child page number.
WARNING - this branch row is only valid while the old leaf row is
valid, as it contains references to the columns of the old leaf row.
So use of the row should only provide read-only access to the objects
of the old leaf row which are referenced.
|
createEmptyTemplate | public static BranchRow createEmptyTemplate(BTree btree) throws StandardException(Code) | | Create an empty branch row template suitable for reading branch rows in
from disk. This routine will create newly allocated "empty" objects for
every column in the template row.
exception: StandardException - Standard exception policy. |
getRow | protected DataValueDescriptor[] getRow()(Code) | | Return the branch row.
Return the DataValueDescriptor array that represents the branch row,
for use in raw store calls to fetch, insert, and update.
The branch row object array. |
setPageNumber | protected void setPageNumber(long page_number)(Code) | | Set the page number field of the branch row to a new value.
Parameters: page_number - the new page number. |
|
|