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

Batch of changes queued to be written to a CDBWrapper. More...

#include <dbwrapper.h>

Collaboration diagram for CDBBatch:
[legend]

Public Member Functions

 CDBBatch (int nVersion)
 
void Clear ()
 
template<typename K , typename V >
void Write (const K &key, const V &value)
 
template<typename V >
void Write (const CDataStream &_ssKey, const V &value)
 
template<typename K >
void Erase (const K &key)
 
void Erase (const CDataStream &_ssKey)
 
size_t SizeEstimate () const
 

Private Attributes

leveldb::WriteBatch batch
 
CDataStream ssKey
 
CDataStream ssValue
 
size_t size_estimate
 

Friends

class CDBWrapper
 

Detailed Description

Batch of changes queued to be written to a CDBWrapper.

Definition at line 45 of file dbwrapper.h.

Constructor & Destructor Documentation

◆ CDBBatch()

CDBBatch::CDBBatch ( int  nVersion)
inlineexplicit
Parameters
[in]_nVersionThe version used to serialize data.

Definition at line 60 of file dbwrapper.h.

Member Function Documentation

◆ Clear()

void CDBBatch::Clear ( )
inline

Definition at line 62 of file dbwrapper.h.

Here is the caller graph for this function:

◆ Erase() [1/2]

void CDBBatch::Erase ( const CDataStream _ssKey)
inline

Definition at line 108 of file dbwrapper.h.

Here is the call graph for this function:

◆ Erase() [2/2]

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

Definition at line 100 of file dbwrapper.h.

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

◆ SizeEstimate()

size_t CDBBatch::SizeEstimate ( ) const
inline

Definition at line 122 of file dbwrapper.h.

◆ Write() [1/2]

template<typename V >
void CDBBatch::Write ( const CDataStream _ssKey,
const V &  value 
)
inline

Definition at line 78 of file dbwrapper.h.

Here is the call graph for this function:

◆ Write() [2/2]

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

Definition at line 69 of file dbwrapper.h.

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

Friends And Related Function Documentation

◆ CDBWrapper

friend class CDBWrapper
friend

Definition at line 47 of file dbwrapper.h.

Member Data Documentation

◆ batch

leveldb::WriteBatch CDBBatch::batch
private

Definition at line 50 of file dbwrapper.h.

◆ size_estimate

size_t CDBBatch::size_estimate
private

Definition at line 54 of file dbwrapper.h.

◆ ssKey

CDataStream CDBBatch::ssKey
private

Definition at line 52 of file dbwrapper.h.

◆ ssValue

CDataStream CDBBatch::ssValue
private

Definition at line 53 of file dbwrapper.h.


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