#include <dbwrapper.h>
|
| CDBWrapper (const fs::path &path, size_t nCacheSize, bool fMemory=false, bool fWipe=false, bool obfuscate=false, size_t maxFileSize=2<< 20) |
|
| ~CDBWrapper () |
|
template<typename K , typename V > |
bool | Read (const K &key, 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 |
|
template<typename K > |
bool | Erase (const K &key, bool fSync=false) |
|
bool | WriteBatch (CDBBatch &batch, bool fSync=false) |
|
bool | Flush () |
|
bool | Sync () |
|
CDBIterator * | NewIterator () |
|
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...
|
|
|
std::vector< unsigned char > | CreateObfuscateKey () const |
| Returns a string (consisting of 8 random bytes) suitable for use as an obfuscating XOR key. More...
|
|
|
leveldb::Env * | penv |
| custom environment this database is using (may be nullptr in case of default environment) More...
|
|
leveldb::Options | options |
| database options used More...
|
|
leveldb::ReadOptions | readoptions |
| options used when reading from the database More...
|
|
leveldb::ReadOptions | iteroptions |
| options used when iterating over values of the database More...
|
|
leveldb::WriteOptions | writeoptions |
| options used when writing to the database More...
|
|
leveldb::WriteOptions | syncoptions |
| options used when sync writing to the database More...
|
|
leveldb::DB * | pdb |
| the database itself More...
|
|
std::vector< unsigned char > | obfuscate_key |
| a key used for optional XOR-obfuscation of the database More...
|
|
Definition at line 177 of file dbwrapper.h.
◆ CDBWrapper()
CDBWrapper::CDBWrapper |
( |
const fs::path & |
path, |
|
|
size_t |
nCacheSize, |
|
|
bool |
fMemory = false , |
|
|
bool |
fWipe = false , |
|
|
bool |
obfuscate = false , |
|
|
size_t |
maxFileSize = 2 << 20 |
|
) |
| |
- Parameters
-
[in] | path | Location in the filesystem where leveldb data will be stored. |
[in] | nCacheSize | Configures various leveldb cache settings. |
[in] | fMemory | If true, use leveldb's memory environment. |
[in] | fWipe | If true, remove all existing data. |
[in] | obfuscate | If true, store data obfuscated via simple XOR. If false, XOR with a zero'd byte array. |
Definition at line 120 of file dbwrapper.cpp.
◆ ~CDBWrapper()
CDBWrapper::~CDBWrapper |
( |
| ) |
|
◆ CompactRange()
template<typename K >
void CDBWrapper::CompactRange |
( |
const K & |
key_begin, |
|
|
const K & |
key_end |
|
) |
| const |
|
inline |
Compact a certain range of keys in the database.
Definition at line 330 of file dbwrapper.h.
◆ CreateObfuscateKey()
std::vector< unsigned char > CDBWrapper::CreateObfuscateKey |
( |
| ) |
const |
|
private |
Returns a string (consisting of 8 random bytes) suitable for use as an obfuscating XOR key.
Definition at line 204 of file dbwrapper.cpp.
◆ Erase()
template<typename K >
bool CDBWrapper::Erase |
( |
const K & |
key, |
|
|
bool |
fSync = false |
|
) |
| |
|
inline |
◆ EstimateSize()
template<typename K >
size_t CDBWrapper::EstimateSize |
( |
const K & |
key_begin, |
|
|
const K & |
key_end |
|
) |
| const |
|
inline |
◆ Exists()
template<typename K >
bool CDBWrapper::Exists |
( |
const K & |
key | ) |
const |
|
inline |
◆ Flush()
bool CDBWrapper::Flush |
( |
| ) |
|
|
inline |
◆ IsEmpty()
bool CDBWrapper::IsEmpty |
( |
| ) |
|
Return true if the database managed by this class contains no entries.
Definition at line 212 of file dbwrapper.cpp.
◆ NewIterator()
◆ Read()
template<typename K , typename V >
bool CDBWrapper::Read |
( |
const K & |
key, |
|
|
V & |
value |
|
) |
| const |
|
inline |
◆ Sync()
bool CDBWrapper::Sync |
( |
| ) |
|
|
inline |
◆ Write()
template<typename K , typename V >
bool CDBWrapper::Write |
( |
const K & |
key, |
|
|
const V & |
value, |
|
|
bool |
fSync = false |
|
) |
| |
|
inline |
◆ WriteBatch()
bool CDBWrapper::WriteBatch |
( |
CDBBatch & |
batch, |
|
|
bool |
fSync = false |
|
) |
| |
◆ dbwrapper_private::GetObfuscateKey
◆ iteroptions
leveldb::ReadOptions CDBWrapper::iteroptions |
|
private |
options used when iterating over values of the database
Definition at line 191 of file dbwrapper.h.
◆ obfuscate_key
std::vector<unsigned char> CDBWrapper::obfuscate_key |
|
private |
a key used for optional XOR-obfuscation of the database
Definition at line 203 of file dbwrapper.h.
◆ OBFUSCATE_KEY_KEY
const std::string CDBWrapper::OBFUSCATE_KEY_KEY |
|
staticprivate |
the key under which the obfuscation key is stored
Definition at line 206 of file dbwrapper.h.
◆ OBFUSCATE_KEY_NUM_BYTES
const unsigned int CDBWrapper::OBFUSCATE_KEY_NUM_BYTES = 8 |
|
staticprivate |
the length of the obfuscate key in number of bytes
Definition at line 209 of file dbwrapper.h.
◆ options
leveldb::Options CDBWrapper::options |
|
private |
◆ pdb
leveldb::DB* CDBWrapper::pdb |
|
private |
◆ penv
leveldb::Env* CDBWrapper::penv |
|
private |
custom environment this database is using (may be nullptr in case of default environment)
Definition at line 182 of file dbwrapper.h.
◆ readoptions
leveldb::ReadOptions CDBWrapper::readoptions |
|
private |
options used when reading from the database
Definition at line 188 of file dbwrapper.h.
◆ syncoptions
leveldb::WriteOptions CDBWrapper::syncoptions |
|
private |
options used when sync writing to the database
Definition at line 197 of file dbwrapper.h.
◆ writeoptions
leveldb::WriteOptions CDBWrapper::writeoptions |
|
private |
options used when writing to the database
Definition at line 194 of file dbwrapper.h.
The documentation for this class was generated from the following files: