This class is the interface to the in-memory DB.
More...
#include <dbInterface.hpp>
This class is the interface to the in-memory DB.
Definition at line 46 of file dbInterface.hpp.
◆ DbInterface() [1/2]
server::DbInterface::DbInterface |
( |
const std::string & |
prefix, |
|
|
rad::DbAdapter & |
runtime_db |
|
) |
| |
Constructor.
- Parameters
-
[in] | prefix | String used as prefix when building the keys. |
[in] | runtime_db | Reference to the in-memory DB adapter. |
Definition at line 20 of file dbInterface.cpp.
◆ ~DbInterface()
server::DbInterface::~DbInterface |
( |
| ) |
|
|
virtual |
◆ DbInterface() [2/2]
server::DbInterface::DbInterface |
( |
const DbInterface & |
| ) |
|
|
delete |
◆ Get()
std::string server::DbInterface::Get |
( |
const std::string & |
key | ) |
|
- Parameters
-
- Returns
- The value stored in the DB associated to the given key.
Definition at line 39 of file dbInterface.cpp.
◆ GetControlState()
std::string server::DbInterface::GetControlState |
( |
| ) |
|
- Returns
- The current state of the application stored in the DB.
Definition at line 34 of file dbInterface.cpp.
◆ operator=()
Disable copy constructor.
◆ Set()
void server::DbInterface::Set |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
- Parameters
-
[in] | key | Key to be written in the DB. |
[in] | value | Value, associated to the given key, to be written in the DB. |
Definition at line 89 of file dbInterface.cpp.
◆ SetConfig()
void server::DbInterface::SetConfig |
( |
Config & |
cfg | ) |
|
Set the application configuration information in the DB.
- Parameters
-
[in] | reqEndpoint | Request msg endpoint. |
[in] | dbIpAddr | DB IP address. |
[in] | dbPort | DB port. |
[in] | dbTimeout | DB timeout. |
Definition at line 49 of file dbInterface.cpp.
◆ SetControlState()
void server::DbInterface::SetControlState |
( |
const std::string & |
value | ) |
|
- Parameters
-
[in] | value | State to be stored in the DB. |
Definition at line 44 of file dbInterface.cpp.
The documentation for this class was generated from the following files: