Bitcoin ABC 0.26.3
P2P Digital Currency
|
An instance of this class represents one database. More...
#include <db.h>
Public Member Functions | |
WalletDatabase () | |
Create dummy DB handle. | |
virtual | ~WalletDatabase () |
virtual void | Open ()=0 |
Open the database if it is not already opened. | |
virtual void | AddRef ()=0 |
Indicate the a new database user has began using the database. | |
virtual void | RemoveRef ()=0 |
Indicate that database user has stopped using the database and that it could be flushed or closed. | |
virtual bool | Rewrite (const char *pszSkip=nullptr)=0 |
Rewrite the entire database on disk, with the exception of key pszSkip if non-zero. | |
virtual bool | Backup (const std::string &strDest) const =0 |
Back up the entire database to a file. | |
virtual void | Flush ()=0 |
Make sure all changes are flushed to database file. | |
virtual void | Close ()=0 |
Flush to the database file and close the database. | |
virtual bool | PeriodicFlush ()=0 |
virtual void | IncrementUpdateCounter ()=0 |
virtual void | ReloadDbEnv ()=0 |
virtual std::string | Filename ()=0 |
Return path to main database file for logs and error messages. | |
virtual std::unique_ptr< DatabaseBatch > | MakeBatch (bool flush_on_close=true)=0 |
Make a DatabaseBatch connected to this database. | |
Public Attributes | |
std::atomic< int > | m_refcount {0} |
Counts the number of active database users to be sure that the database is not closed while someone is using it. | |
std::atomic< unsigned int > | nUpdateCounter |
unsigned int | nLastSeen |
unsigned int | nLastFlushed |
int64_t | nLastWalletUpdate |
|
inline |
Indicate the a new database user has began using the database.
Increments m_refcount
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Back up the entire database to a file.
Implemented in SQLiteDatabase, BerkeleyDatabase, and DummyDatabase.
Flush to the database file and close the database.
Also close the environment if no other databases are open in it.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
|
pure virtual |
Return path to main database file for logs and error messages.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Make sure all changes are flushed to database file.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
|
pure virtual |
Make a DatabaseBatch connected to this database.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Open the database if it is not already opened.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Indicate that database user has stopped using the database and that it could be flushed or closed.
Decrement m_refcount
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
Rewrite the entire database on disk, with the exception of key pszSkip if non-zero.
Implemented in BerkeleyDatabase, DummyDatabase, and SQLiteDatabase.
std::atomic<int> WalletDatabase::m_refcount {0} |