Loading...
Searching...
No Matches
resdb::KVExecutor Class Reference

#include <kv_executor.h>

Inheritance diagram for resdb::KVExecutor:
resdb::TransactionManager

Public Member Functions

 KVExecutor (std::unique_ptr< Storage > storage)
 
virtual ~KVExecutor ()=default
 
std::unique_ptr< std::string > ExecuteData (const std::string &request) override
 
- Public Member Functions inherited from resdb::TransactionManager
 TransactionManager (bool is_out_of_order=false, bool need_response=true)
 
virtual ~TransactionManager ()=default
 
virtual std::unique_ptr< BatchUserResponse > ExecuteBatch (const BatchUserRequest &request)
 
bool IsOutOfOrder ()
 
bool NeedResponse ()
 
virtual Storage * GetStorage ()
 

Protected Member Functions

virtual void Set (const std::string &key, const std::string &value)
 
std::string Get (const std::string &key)
 
std::string GetAllValues ()
 
std::string GetRange (const std::string &min_key, const std::string &max_key)
 
void SetWithVersion (const std::string &key, const std::string &value, int version)
 
void GetWithVersion (const std::string &key, int version, ValueInfo *info)
 
void GetAllItems (Items *items)
 
void GetKeyRange (const std::string &min_key, const std::string &max_key, Items *items)
 
void GetHistory (const std::string &key, int min_key, int max_key, Items *items)
 
void GetTopHistory (const std::string &key, int top_number, Items *items)
 

Detailed Description

Definition at line 32 of file kv_executor.h.

Constructor & Destructor Documentation

◆ KVExecutor()

resdb::KVExecutor::KVExecutor ( std::unique_ptr< Storage >  storage)

Definition at line 26 of file kv_executor.cpp.

◆ ~KVExecutor()

virtual resdb::KVExecutor::~KVExecutor ( )
virtualdefault

Member Function Documentation

◆ ExecuteData()

std::unique_ptr< std::string > resdb::KVExecutor::ExecuteData ( const std::string &  request)
overridevirtual

Reimplemented from resdb::TransactionManager.

Definition at line 29 of file kv_executor.cpp.

◆ Get()

std::string resdb::KVExecutor::Get ( const std::string &  key)
protected

Definition at line 76 of file kv_executor.cpp.

◆ GetAllItems()

void resdb::KVExecutor::GetAllItems ( Items *  items)
protected

Definition at line 100 of file kv_executor.cpp.

◆ GetAllValues()

std::string resdb::KVExecutor::GetAllValues ( )
protected

Definition at line 80 of file kv_executor.cpp.

◆ GetHistory()

void resdb::KVExecutor::GetHistory ( const std::string &  key,
int  min_key,
int  max_key,
Items *  items 
)
protected

Definition at line 123 of file kv_executor.cpp.

◆ GetKeyRange()

void resdb::KVExecutor::GetKeyRange ( const std::string &  min_key,
const std::string &  max_key,
Items *  items 
)
protected

Definition at line 111 of file kv_executor.cpp.

◆ GetRange()

std::string resdb::KVExecutor::GetRange ( const std::string &  min_key,
const std::string &  max_key 
)
protected

Definition at line 83 of file kv_executor.cpp.

◆ GetTopHistory()

void resdb::KVExecutor::GetTopHistory ( const std::string &  key,
int  top_number,
Items *  items 
)
protected

Definition at line 135 of file kv_executor.cpp.

◆ GetWithVersion()

void resdb::KVExecutor::GetWithVersion ( const std::string &  key,
int  version,
ValueInfo *  info 
)
protected

Definition at line 93 of file kv_executor.cpp.

◆ Set()

void resdb::KVExecutor::Set ( const std::string &  key,
const std::string &  value 
)
protectedvirtual

Definition at line 72 of file kv_executor.cpp.

◆ SetWithVersion()

void resdb::KVExecutor::SetWithVersion ( const std::string &  key,
const std::string &  value,
int  version 
)
protected

Definition at line 88 of file kv_executor.cpp.