| java.lang.Object | |
| ↳ | com.tencent.wcdb.database.SQLiteAsyncCheckpointer |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| SQLiteAsyncCheckpointer() | |||||||||||
| SQLiteAsyncCheckpointer(Looper looper) | |||||||||||
| SQLiteAsyncCheckpointer(Looper looper, int threshold, int blockingThreshold) | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| boolean | handleMessage(Message msg) | ||||||||||
| void |
onAttach(SQLiteDatabase db)
Called immediately when this listener is set to the database.
| ||||||||||
| void |
onDetach(SQLiteDatabase db)
Called immediately when this listener is detached from the database.
| ||||||||||
| void |
onWALCommit(SQLiteDatabase db, String dbName, int pages)
Called immediately when a WAL transaction has been committed.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
android.os.Handler.Callback
| |||||||||||
From interface
com.tencent.wcdb.database.SQLiteCheckpointListener
| |||||||||||
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 |