PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CEvoDB Class Reference

#include <evodb.h>

Collaboration diagram for CEvoDB:
[legend]

Public Member Functions

 CEvoDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
std::unique_ptr< CEvoDBScopedCommitterBeginTransaction ()
 
CurTransactionGetCurTransaction ()
 
template<typename K , typename V >
bool Read (const K &key, V &value)
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename K >
bool Exists (const K &key)
 
template<typename K >
void Erase (const K &key)
 
CDBWrapperGetRawDB ()
 
size_t GetMemoryUsage ()
 
bool CommitRootTransaction ()
 
bool VerifyBestBlock (const uint256 &hash)
 
void WriteBestBlock (const uint256 &hash)
 

Public Attributes

RecursiveMutex cs
 

Private Types

typedef CDBTransaction< CDBWrapper, CDBBatchRootTransaction
 
typedef CDBTransaction< RootTransaction, RootTransactionCurTransaction
 

Private Member Functions

void CommitCurTransaction ()
 
void RollbackCurTransaction ()
 

Private Attributes

CDBWrapper db
 
CDBBatch rootBatch
 
RootTransaction rootDBTransaction
 
CurTransaction curDBTransaction
 

Friends

class CEvoDBScopedCommitter
 

Detailed Description

Definition at line 31 of file evodb.h.

Member Typedef Documentation

◆ CurTransaction

Definition at line 40 of file evodb.h.

◆ RootTransaction

Definition at line 39 of file evodb.h.

Constructor & Destructor Documentation

◆ CEvoDB()

CEvoDB::CEvoDB ( size_t  nCacheSize,
bool  fMemory = false,
bool  fWipe = false 
)
explicit

Definition at line 37 of file evodb.cpp.

Member Function Documentation

◆ BeginTransaction()

std::unique_ptr<CEvoDBScopedCommitter> CEvoDB::BeginTransaction ( )
inline

Definition at line 49 of file evodb.h.

◆ CommitCurTransaction()

void CEvoDB::CommitCurTransaction ( )
private

Definition at line 44 of file evodb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CommitRootTransaction()

bool CEvoDB::CommitRootTransaction ( )

Definition at line 56 of file evodb.cpp.

Here is the call graph for this function:

◆ Erase()

template<typename K >
void CEvoDB::Erase ( const K &  key)
inline

Definition at line 83 of file evodb.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Exists()

template<typename K >
bool CEvoDB::Exists ( const K &  key)
inline

Definition at line 76 of file evodb.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCurTransaction()

CurTransaction& CEvoDB::GetCurTransaction ( )
inline

Definition at line 55 of file evodb.h.

Here is the caller graph for this function:

◆ GetMemoryUsage()

size_t CEvoDB::GetMemoryUsage ( )
inline

Definition at line 94 of file evodb.h.

Here is the call graph for this function:

◆ GetRawDB()

CDBWrapper& CEvoDB::GetRawDB ( )
inline

Definition at line 89 of file evodb.h.

◆ Read()

template<typename K , typename V >
bool CEvoDB::Read ( const K &  key,
V &  value 
)
inline

Definition at line 62 of file evodb.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RollbackCurTransaction()

void CEvoDB::RollbackCurTransaction ( )
private

Definition at line 50 of file evodb.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerifyBestBlock()

bool CEvoDB::VerifyBestBlock ( const uint256 hash)

Definition at line 66 of file evodb.cpp.

Here is the call graph for this function:

◆ Write()

template<typename K , typename V >
void CEvoDB::Write ( const K &  key,
const V &  value 
)
inline

Definition at line 69 of file evodb.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteBestBlock()

void CEvoDB::WriteBestBlock ( const uint256 hash)

Definition at line 72 of file evodb.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ CEvoDBScopedCommitter

friend class CEvoDBScopedCommitter
friend

Definition at line 106 of file evodb.h.

Member Data Documentation

◆ cs

RecursiveMutex CEvoDB::cs

Definition at line 34 of file evodb.h.

◆ curDBTransaction

CurTransaction CEvoDB::curDBTransaction
private

Definition at line 44 of file evodb.h.

◆ db

CDBWrapper CEvoDB::db
private

Definition at line 37 of file evodb.h.

◆ rootBatch

CDBBatch CEvoDB::rootBatch
private

Definition at line 42 of file evodb.h.

◆ rootDBTransaction

RootTransaction CEvoDB::rootDBTransaction
private

Definition at line 43 of file evodb.h.


The documentation for this class was generated from the following files: