public class SqlJetMemPage extends SqlJetCloneable
Modifier and Type | Field and Description |
---|---|
static byte |
PTF_INTKEY
Page type flags.
|
static byte |
PTF_LEAF |
static byte |
PTF_LEAFDATA |
static byte |
PTF_ZERODATA |
Constructor and Description |
---|
SqlJetMemPage() |
Modifier and Type | Method and Description |
---|---|
void |
assemblePage(int nCell,
ISqlJetMemoryPointer[] apCell,
int apCellPos,
int[] aSize,
int aSizePos)
Add a list of cells to a page.
|
void |
assertParentIndex(int iIdx,
int iChild)
Page pParent is an internal (non-leaf) tree page.
|
void |
clearCell(ISqlJetMemoryPointer pCell)
Free any overflow pages associated with the given Cell.
|
java.lang.Object |
clone() |
void |
copyNodeContent(SqlJetMemPage pTo) |
void |
decodeFlags(int flagByte)
Decode the flags byte (the first byte of the header) for a page and
initialize fields of the MemPage structure accordingly.
|
void |
dropCell(int idx,
int sz)
Remove the i-th cell from pPage.
|
int |
fillInCell(ISqlJetMemoryPointer pCell,
ISqlJetMemoryPointer pKey,
long nKey,
ISqlJetMemoryPointer pData,
int nData,
int nZero)
Create the byte sequence used to represent a cell on page pPage and write
that byte sequence into pCell[].
|
ISqlJetMemoryPointer |
findCell(int i)
Given a btree page and a cell index (0 means the first cell on the page,
1 means the second cell, and so forth) return a pointer to the cell
content.
|
ISqlJetMemoryPointer |
findOverflowCell(int iCell)
This a more complex version of findCell() that works for pages that do
contain overflow cells.
|
void |
freePage()
Add a page of the database file to the freelist.
|
void |
initPage()
Initialize the auxiliary information for a disk block.
|
void |
insertCell(int i,
ISqlJetMemoryPointer pCell,
int sz,
ISqlJetMemoryPointer pTemp,
int iChild)
Insert a new cell on pPage at cell index "i".
|
void |
modifyPagePointer(int iFrom,
int iTo,
short s)
Somewhere on pPage, which is guarenteed to be a btree page, not an
overflow page, is a pointer to page iFrom.
|
org.tmatesoft.sqljet.core.internal.btree.SqlJetBtreeCellInfo |
parseCell(int iCell) |
void |
ptrmapPutOvfl(int iCell)
If the cell with index iCell on page pPage contains a pointer to an
overflow page, insert an entry into the pointer-map for the overflow
page.
|
void |
ptrmapPutOvflPtr(ISqlJetMemoryPointer pCell)
If the cell pCell, part of page pPage contains a pointer to an overflow
page, insert an entry into the pointer-map for the overflow page.
|
static void |
releasePage(SqlJetMemPage pPage)
Release a MemPage.
|
void |
setChildPtrmaps()
Set the pointer-map entries for all children of page pPage.
|
public static final byte PTF_INTKEY
public static final byte PTF_ZERODATA
public static final byte PTF_LEAFDATA
public static final byte PTF_LEAF
public void decodeFlags(int flagByte) throws SqlJetException
PTF_ZERODATA
PTF_ZERODATA | PTF_LEAF
PTF_LEAFDATA | PTF_INTKEY
PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
SqlJetException
public void initPage() throws SqlJetException
SqlJetException
public static void releasePage(SqlJetMemPage pPage) throws SqlJetException
SqlJetException
public void setChildPtrmaps() throws SqlJetException
SqlJetException
public void modifyPagePointer(int iFrom, int iTo, short s) throws SqlJetException
SqlJetExceptionRemove
SqlJetException
public ISqlJetMemoryPointer findCell(int i)
public void ptrmapPutOvflPtr(ISqlJetMemoryPointer pCell) throws SqlJetException
SqlJetException
public org.tmatesoft.sqljet.core.internal.btree.SqlJetBtreeCellInfo parseCell(int iCell)
iCell
- The cell index. First cell is 0public void freePage() throws SqlJetException
SqlJetException
public void clearCell(ISqlJetMemoryPointer pCell) throws SqlJetException
SqlJetException
public void dropCell(int idx, int sz) throws SqlJetException
idx
- sz
- SqlJetException
public void insertCell(int i, ISqlJetMemoryPointer pCell, int sz, ISqlJetMemoryPointer pTemp, int iChild) throws SqlJetException
i
- New cell becomes the i-th cell of the pagepCell
- Content of the new cellsz
- Bytes of content in pCellpTemp
- Temp storage space for pCell, if needednSkip
- Do not write the first nSkip bytes of the cellSqlJetException
public ISqlJetMemoryPointer findOverflowCell(int iCell)
iCell
- public void assemblePage(int nCell, ISqlJetMemoryPointer[] apCell, int apCellPos, int[] aSize, int aSizePos) throws SqlJetException
nCell
- The number of cells to add to this pageapCell
- Pointers to cell bodiesaSize
- Sizes of the cellsSqlJetException
public void assertParentIndex(int iIdx, int iChild)
iIdx
- iChild
- public int fillInCell(ISqlJetMemoryPointer pCell, ISqlJetMemoryPointer pKey, long nKey, ISqlJetMemoryPointer pData, int nData, int nZero) throws SqlJetException
pCell
- Complete text of the cellpKey
- The keynKey
- The keypData
- The datanData
- The datanZero
- Extra zero bytes to append to pDataSqlJetException
public void ptrmapPutOvfl(int iCell) throws SqlJetException
iCell
- SqlJetException
public void copyNodeContent(SqlJetMemPage pTo) throws SqlJetException
SqlJetException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class SqlJetCloneable
java.lang.CloneNotSupportedException
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.