| com.tencent.wcdb.database.SQLiteCheckpointListener |
Known Indirect Subclasses
|
A listener for WAL checkpointing.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
onAttach(SQLiteDatabase db)
Called immediately when this listener is set to the database.
| ||||||||||
| abstract void |
onDetach(SQLiteDatabase db)
Called immediately when this listener is detached from the database.
| ||||||||||
| abstract void |
onWALCommit(SQLiteDatabase db, String dbName, int pages)
Called immediately when a WAL transaction has been committed.
| ||||||||||
Called immediately when this listener is set to the database. Initialization codes can be placed here, if any.
| db | database object to be attached |
|---|
Called immediately when this listener is detached from the database. Cleanup codes can be placed here, if any.
| db | database object to be detached from |
|---|
Called immediately when a WAL transaction has been committed.
The implementation should checkpoint the database according to its strategy by executing
SQL PRAGMA wal_checkpoint; or something alike. Failing to do this will result in
unlimited growing WAL file and may degrade performance.
| db | database object whose transaction is committed |
|---|---|
| dbName | attached database name of the committed transaction, or "main" for the main database |
| pages | number of frames in the WAL file after commit |