Loading...
Searching...
No Matches
resdb::storage::ResRocksDB Class Reference

#include <rocksdb.h>

Inheritance diagram for resdb::storage::ResRocksDB:
resdb::Storage

Public Member Functions

 ResRocksDB (std::optional< RocksDBInfo > config_data=std::nullopt)
 
virtual ~ResRocksDB ()
 
int SetValue (const std::string &key, const std::string &value) override
 
std::string GetValue (const std::string &key) override
 
std::string GetAllValues (void) override
 
std::string GetRange (const std::string &min_key, const std::string &max_key) override
 
int SetValueWithVersion (const std::string &key, const std::string &value, int version) override
 
std::pair< std::string, int > GetValueWithVersion (const std::string &key, int version) override
 
std::map< std::string, std::pair< std::string, int > > GetAllItems () override
 
std::map< std::string, std::pair< std::string, int > > GetKeyRange (const std::string &min_key, const std::string &max_key) override
 
std::vector< std::pair< std::string, int > > GetHistory (const std::string &key, int min_version, int max_version) override
 
std::vector< std::pair< std::string, int > > GetTopHistory (const std::string &key, int top_number) override
 
bool Flush () override
 
- Public Member Functions inherited from resdb::Storage
 Storage ()=default
 
virtual ~Storage ()=default
 

Detailed Description

Definition at line 39 of file rocksdb.h.

Constructor & Destructor Documentation

◆ ResRocksDB()

resdb::storage::ResRocksDB::ResRocksDB ( std::optional< RocksDBInfo >  config_data = std::nullopt)

Definition at line 42 of file rocksdb.cpp.

◆ ~ResRocksDB()

resdb::storage::ResRocksDB::~ResRocksDB ( )
virtual

Definition at line 76 of file rocksdb.cpp.

Member Function Documentation

◆ Flush()

bool resdb::storage::ResRocksDB::Flush ( )
overridevirtual

Reimplemented from resdb::Storage.

Definition at line 139 of file rocksdb.cpp.

◆ GetAllItems()

std::map< std::string, std::pair< std::string, int > > resdb::storage::ResRocksDB::GetAllItems ( )
overridevirtual

Implements resdb::Storage.

Definition at line 204 of file rocksdb.cpp.

◆ GetAllValues()

std::string resdb::storage::ResRocksDB::GetAllValues ( void  )
overridevirtual

Implements resdb::Storage.

Definition at line 107 of file rocksdb.cpp.

◆ GetHistory()

std::vector< std::pair< std::string, int > > resdb::storage::ResRocksDB::GetHistory ( const std::string &  key,
int  min_version,
int  max_version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 247 of file rocksdb.cpp.

◆ GetKeyRange()

std::map< std::string, std::pair< std::string, int > > resdb::storage::ResRocksDB::GetKeyRange ( const std::string &  min_key,
const std::string &  max_key 
)
overridevirtual

Implements resdb::Storage.

Definition at line 224 of file rocksdb.cpp.

◆ GetRange()

std::string resdb::storage::ResRocksDB::GetRange ( const std::string &  min_key,
const std::string &  max_key 
)
overridevirtual

Implements resdb::Storage.

Definition at line 122 of file rocksdb.cpp.

◆ GetTopHistory()

std::vector< std::pair< std::string, int > > resdb::storage::ResRocksDB::GetTopHistory ( const std::string &  key,
int  top_number 
)
overridevirtual

Implements resdb::Storage.

Definition at line 271 of file rocksdb.cpp.

◆ GetValue()

std::string resdb::storage::ResRocksDB::GetValue ( const std::string &  key)
overridevirtual

Implements resdb::Storage.

Definition at line 97 of file rocksdb.cpp.

◆ GetValueWithVersion()

std::pair< std::string, int > resdb::storage::ResRocksDB::GetValueWithVersion ( const std::string &  key,
int  version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 176 of file rocksdb.cpp.

◆ SetValue()

int resdb::storage::ResRocksDB::SetValue ( const std::string &  key,
const std::string &  value 
)
overridevirtual

Implements resdb::Storage.

Definition at line 82 of file rocksdb.cpp.

◆ SetValueWithVersion()

int resdb::storage::ResRocksDB::SetValueWithVersion ( const std::string &  key,
const std::string &  value,
int  version 
)
overridevirtual

Implements resdb::Storage.

Definition at line 148 of file rocksdb.cpp.