Ethereum  PoC-8
The C++ Implementation of Ethereum
dev::db::RocksDB Class Reference

#include <RocksDB.h>

Inheritance diagram for dev::db::RocksDB:
dev::db::DatabaseFace

Public Member Functions

 RocksDB (boost::filesystem::path const &_path, rocksdb::ReadOptions _readOptions=defaultReadOptions(), rocksdb::WriteOptions _writeOptions=defaultWriteOptions(), rocksdb::Options _dbOptions=defaultDBOptions())
 
std::string lookup (Slice _key) const override
 
bool exists (Slice _key) const override
 
void insert (Slice _key, Slice _value) override
 
void kill (Slice _key) override
 
std::unique_ptr< WriteBatchFacecreateWriteBatch () const override
 
void commit (std::unique_ptr< WriteBatchFace > _batch) override
 
void forEach (std::function< bool(Slice, Slice)> f) const override
 
- Public Member Functions inherited from dev::db::DatabaseFace
virtual ~DatabaseFace ()=default
 

Static Public Member Functions

static rocksdb::ReadOptions defaultReadOptions ()
 
static rocksdb::WriteOptions defaultWriteOptions ()
 
static rocksdb::Options defaultDBOptions ()
 

Detailed Description

Definition at line 30 of file RocksDB.h.

Constructor & Destructor Documentation

◆ RocksDB()

dev::db::RocksDB::RocksDB ( boost::filesystem::path const &  _path,
rocksdb::ReadOptions  _readOptions = defaultReadOptions(),
rocksdb::WriteOptions  _writeOptions = defaultWriteOptions(),
rocksdb::Options  _dbOptions = defaultDBOptions() 
)
explicit

Definition at line 116 of file RocksDB.cpp.

Member Function Documentation

◆ commit()

void dev::db::RocksDB::commit ( std::unique_ptr< WriteBatchFace _batch)
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 175 of file RocksDB.cpp.

◆ createWriteBatch()

std::unique_ptr< WriteBatchFace > dev::db::RocksDB::createWriteBatch ( ) const
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 170 of file RocksDB.cpp.

◆ defaultDBOptions()

rocksdb::Options dev::db::RocksDB::defaultDBOptions ( )
static

Definition at line 108 of file RocksDB.cpp.

◆ defaultReadOptions()

rocksdb::ReadOptions dev::db::RocksDB::defaultReadOptions ( )
static

Definition at line 98 of file RocksDB.cpp.

◆ defaultWriteOptions()

rocksdb::WriteOptions dev::db::RocksDB::defaultWriteOptions ( )
static

Definition at line 103 of file RocksDB.cpp.

◆ exists()

bool dev::db::RocksDB::exists ( Slice  _key) const
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 140 of file RocksDB.cpp.

◆ forEach()

void dev::db::RocksDB::forEach ( std::function< bool(Slice, Slice)>  f) const
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 188 of file RocksDB.cpp.

◆ insert()

void dev::db::RocksDB::insert ( Slice  _key,
Slice  _value 
)
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 155 of file RocksDB.cpp.

◆ kill()

void dev::db::RocksDB::kill ( Slice  _key)
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 163 of file RocksDB.cpp.

◆ lookup()

std::string dev::db::RocksDB::lookup ( Slice  _key) const
overridevirtual

Implements dev::db::DatabaseFace.

Definition at line 128 of file RocksDB.cpp.


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