Further CDBEnv encapsulation work.

This commit is contained in:
Jeff Garzik
2012-05-18 02:49:50 -04:00
committed by Jeff Garzik
parent 94e34fa0ad
commit ffe8b77a61
3 changed files with 24 additions and 25 deletions

View File

@@ -42,6 +42,8 @@ private:
public:
mutable CCriticalSection cs_db;
DbEnv dbenv;
std::map<std::string, int> mapFileUseCount;
std::map<std::string, Db*> mapDb;
CDBEnv();
~CDBEnv();
@@ -51,6 +53,8 @@ public:
void CheckpointLSN(std::string strFile);
void SetDetach(bool fDetachDB_) { fDetachDB = fDetachDB_; }
void CloseDb(const std::string& strFile);
DbTxn *TxnBegin(int flags=DB_TXN_WRITE_NOSYNC)
{
DbTxn* ptxn = NULL;