veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
altintegration::adaptors::RocksDBStorage Struct Reference

Detailed Description

Definition at line 62 of file rocksdb_impl.hpp.

+ Inheritance diagram for altintegration::adaptors::RocksDBStorage:
+ Collaboration diagram for altintegration::adaptors::RocksDBStorage:

Public Member Functions

 RocksDBStorage (const std::string &path)
 
void write (const std::vector< uint8_t > &key, const std::vector< uint8_t > &value) override
 
bool read (const std::vector< uint8_t > &key, std::vector< uint8_t > &value) override
 
std::shared_ptr< WriteBatchgenerateWriteBatch () override
 
std::shared_ptr< StorageIteratorgenerateIterator () override
 
virtual void write (const std::vector< uint8_t > &key, const std::vector< uint8_t > &value)=0
 
virtual bool read (const std::vector< uint8_t > &key, std::vector< uint8_t > &out)=0
 
virtual std::shared_ptr< WriteBatchgenerateWriteBatch ()=0
 
virtual std::shared_ptr< StorageIteratorgenerateIterator ()=0
 

Member Function Documentation

◆ generateIterator()

std::shared_ptr< StorageIterator > altintegration::adaptors::RocksDBStorage::generateIterator ( )
inlineoverridevirtual

Implements altintegration::adaptors::Storage.

Definition at line 77 of file rocksdb_impl.hpp.

77 {
78 return std::make_shared<RocksDBStorageIterator>(
79 db_->NewIterator(read_options_));
80 }

◆ generateWriteBatch()

std::shared_ptr< WriteBatch > altintegration::adaptors::RocksDBStorage::generateWriteBatch ( )
inlineoverridevirtual

Implements altintegration::adaptors::Storage.

Definition at line 73 of file rocksdb_impl.hpp.

73 {
74 return std::make_shared<RocksDBWriteBatch>(*db_, write_options_);
75 }

◆ read()

bool altintegration::adaptors::RocksDBStorage::read ( const std::vector< uint8_t > &  key,
std::vector< uint8_t > &  value 
)
overridevirtual

◆ write()

void altintegration::adaptors::RocksDBStorage::write ( const std::vector< uint8_t > &  key,
const std::vector< uint8_t > &  value 
)
overridevirtual

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