public class SqlJetBtreeShared
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static byte |
PTRMAP_BTREE |
static byte |
PTRMAP_FREEPAGE |
static byte |
PTRMAP_OVERFLOW1 |
static byte |
PTRMAP_OVERFLOW2 |
static byte |
PTRMAP_ROOTPAGE |
Constructor and Description |
---|
SqlJetBtreeShared() |
Modifier and Type | Method and Description |
---|---|
SqlJetMemPage |
allocatePage(int[] pPgno,
int nearby,
boolean exact)
Allocate a new page from the database file.
|
void |
allocateTempSpace()
Make sure pBt->pTmpSpace points to an allocation of MX_CELL_SIZE(pBt)
bytes.
|
void |
autoVacuumCommit()
This routine is called prior to sqlite3PagerCommit when a transaction is
commited for an auto-vacuum database.
|
void |
clearDatabasePage(int pgno,
boolean freePageFlag,
int[] pnChange)
Erase the given database page and all its children.
|
int |
countWriteCursors()
Return the number of write-cursors open on this handle.
|
void |
getOverflowPage(int ovfl,
SqlJetMemPage[] ppPage,
int[] pPgnoNext)
Given the page number of an overflow page in the database (parameter
ovfl), this function finds the page number of the next page in the linked
list of overflow pages.
|
SqlJetMemPage |
getPage(int pgno,
boolean noContent)
Get a page from the pager.
|
void |
incrVacuumStep(int nFin,
int iLastPg)
Perform a single step of an incremental-vacuum.
|
void |
invalidateAllOverflowCache()
Invalidate the overflow page-list cache for all cursors opened on the
shared btree structure pBt.
|
int |
MX_CELL_SIZE()
The following value is the maximum cell size assuming a maximum page size
give above.
|
int |
MX_CELL()
The maximum number of cells on a single page of the database.
|
int |
PENDING_BYTE_PAGE()
The database page the PENDING_BYTE occupies.
|
int |
PTRMAP_PAGENO(int pgno)
These macros define the location of the pointer-map entry for a database
page.
|
void |
ptrmapGet(int key,
short[] pEType,
int[] pPgno)
Read an entry from the pointer map.
|
void |
ptrmapPut(int key,
short eType,
int parent)
Write an entry into the pointer map.
|
void |
ptrmapPutOvflPtr(SqlJetMemPage pPage,
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.
|
void |
relocatePage(SqlJetMemPage pDbPage,
short s,
int iPtrPage,
int iFreePage,
boolean isCommit)
Move the open database page pDbPage to location iFreePage in the
database.
|
boolean |
saveAllCursors(int iRoot,
SqlJetBtreeCursor pExcept)
Save the positions of all cursors except pExcept open on the table with
root-page iRoot.
|
void |
unlockBtreeIfUnused()
If there are no outstanding cursors and we are not in the middle of a
transaction but there is a read lock on the database, then this routine
unrefs the first page of the database file which has the effect of
releasing the read lock.
|
public static final byte PTRMAP_ROOTPAGE
public static final byte PTRMAP_FREEPAGE
public static final byte PTRMAP_OVERFLOW1
public static final byte PTRMAP_OVERFLOW2
public static final byte PTRMAP_BTREE
public int PENDING_BYTE_PAGE()
public int MX_CELL_SIZE()
public int MX_CELL()
public int PTRMAP_PAGENO(int pgno)
public void invalidateAllOverflowCache()
public void ptrmapPut(int key, short eType, int parent) throws SqlJetException
SqlJetException
public void ptrmapGet(int key, short[] pEType, int[] pPgno) throws SqlJetException
SqlJetException
public SqlJetMemPage getPage(int pgno, boolean noContent) throws SqlJetException
pgno
- Number of the page to fetchnoContent
- Do not load page content if trueSqlJetException
public SqlJetMemPage allocatePage(int[] pPgno, int nearby, boolean exact) throws SqlJetException
SqlJetException
public void relocatePage(SqlJetMemPage pDbPage, short s, int iPtrPage, int iFreePage, boolean isCommit) throws SqlJetException
pDbPage
- Open page to moves
- Pointer map 'type' entry for pDbPageiPtrPage
- Pointer map 'page-no' entry for pDbPageiFreePage
- The location to move pDbPage toisCommit
- SqlJetException
public void incrVacuumStep(int nFin, int iLastPg) throws SqlJetException
SqlJetException
public void autoVacuumCommit() throws SqlJetException
SqlJetException
public void unlockBtreeIfUnused() throws SqlJetException
SqlJetException
public boolean saveAllCursors(int iRoot, SqlJetBtreeCursor pExcept) throws SqlJetException
i
- j
- SqlJetException
public int countWriteCursors()
public void clearDatabasePage(int pgno, boolean freePageFlag, int[] pnChange) throws SqlJetException
pgno
- freePageFlag
- Page number to clearpnChange
- Deallocate page if trueSqlJetException
public void getOverflowPage(int ovfl, SqlJetMemPage[] ppPage, int[] pPgnoNext) throws SqlJetException
ovfl
- Overflow pageppPage
- OUT: MemPage handlepPgnoNext
- OUT: Next overflow page numberSqlJetException
public void allocateTempSpace()
public void ptrmapPutOvflPtr(SqlJetMemPage pPage, ISqlJetMemoryPointer pCell) throws SqlJetException
SqlJetException
Copyright © 2009-2010 TMate Software Ltd. All Rights Reserved.