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

#include <sporkdb.h>

Inheritance diagram for CSporkDB:
[legend]
Collaboration diagram for CSporkDB:
[legend]

Public Member Functions

 CSporkDB (size_t nCacheSize, bool fMemory=false, bool fWipe=false)
 
bool WriteSpork (const SporkId nSporkId, const CSporkMessage &spork)
 
bool ReadSpork (const SporkId nSporkId, CSporkMessage &spork)
 
bool SporkExists (const SporkId nSporkId)
 
- Public Member Functions inherited from CDBWrapper
 CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, int nVersion=CLIENT_VERSION)
 
 ~CDBWrapper ()
 
template<typename K >
bool ReadDataStream (const K &key, CDataStream &ssValue) const
 
bool ReadDataStream (const CDataStream &ssKey, CDataStream &ssValue) const
 
template<typename K , typename V >
bool Read (const K &key, V &value) const
 
template<typename V >
bool Read (const CDataStream &ssKey, V &value) const
 
template<typename K , typename V >
bool Write (const K &key, const V &value, bool fSync=false)
 
template<typename K >
bool Exists (const K &key) const
 
bool Exists (const CDataStream &key) const
 
template<typename K >
bool Erase (const K &key, bool fSync=false)
 
bool WriteBatch (CDBBatch &batch, bool fSync=false)
 
bool Flush ()
 
bool Sync ()
 
CDBIteratorNewIterator ()
 
bool IsEmpty ()
 Return true if the database managed by this class contains no entries. More...
 
template<typename K >
size_t EstimateSize (const K &key_begin, const K &key_end) const
 
template<typename K >
void CompactRange (const K &key_begin, const K &key_end) const
 Compact a certain range of keys in the database. More...
 
void CompactFull () const
 

Private Member Functions

 CSporkDB (const CSporkDB &)
 
void operator= (const CSporkDB &)
 

Detailed Description

Definition at line 12 of file sporkdb.h.

Constructor & Destructor Documentation

◆ CSporkDB() [1/2]

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

Definition at line 8 of file sporkdb.cpp.

◆ CSporkDB() [2/2]

CSporkDB::CSporkDB ( const CSporkDB )
private

Member Function Documentation

◆ operator=()

void CSporkDB::operator= ( const CSporkDB )
private

◆ ReadSpork()

bool CSporkDB::ReadSpork ( const SporkId  nSporkId,
CSporkMessage spork 
)

Definition at line 17 of file sporkdb.cpp.

Here is the call graph for this function:

◆ SporkExists()

bool CSporkDB::SporkExists ( const SporkId  nSporkId)

Definition at line 22 of file sporkdb.cpp.

Here is the call graph for this function:

◆ WriteSpork()

bool CSporkDB::WriteSpork ( const SporkId  nSporkId,
const CSporkMessage spork 
)

Definition at line 10 of file sporkdb.cpp.


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