rad
2.0.0
|
#include <dbAdapterRedis.hpp>
Public Member Functions | |
DbAdapterRedis () | |
DbAdapterRedis (const std::string &ipaddr, const int port, const timeval &timeout) | |
virtual | ~DbAdapterRedis () |
void | Config (const std::string &endpoint, const timeval &timeout) |
int | Delete (const std::vector< std::string > &keys) |
bool | Exists (const std::string &key) |
std::string | Get (const std::string &key) |
std::vector< std::string > | MultiGet (const std::vector< std::string > &keys) |
std::string | Get (const std::string &key, const std::string &field) |
std::vector< std::string > | MultiGet (const std::string &key, const std::vector< std::string > &fields) |
std::map< std::string, std::string > | Scan (const std::string &key, const std::string &pattern) |
void | Set (const std::string &key, const std::string &value) |
void | MultiSet (const std::vector< std::string > &kvs) |
void | Set (const std::string &key, const std::string &field, const std::string &value) |
void | MultiSet (const std::string &key, const std::vector< std::string > &fvs) |
void | Connect () |
void | Disconnect () |
bool | IsConnected () |
DbAdapterRedis (const DbAdapterRedis &)=delete | |
DbAdapterRedis & | operator= (const DbAdapterRedis &)=delete |
Disable copy constructor. More... | |
DbAdapterRedis () | |
DbAdapterRedis (const std::string &ipaddr, const int port, const timeval &timeout) | |
virtual | ~DbAdapterRedis () |
void | Config (const std::string &endpoint, const timeval &timeout) |
int | Delete (const std::vector< std::string > &keys) |
bool | Exists (const std::string &key) |
std::string | Get (const std::string &key) |
std::vector< std::string > | MultiGet (const std::vector< std::string > &keys) |
std::string | Get (const std::string &key, const std::string &field) |
std::vector< std::string > | MultiGet (const std::string &key, const std::vector< std::string > &fields) |
std::map< std::string, std::string > | Scan (const std::string &key, const std::string &pattern) |
void | Set (const std::string &key, const std::string &value) |
void | MultiSet (const std::vector< std::string > &kvs) |
void | Set (const std::string &key, const std::string &field, const std::string &value) |
void | MultiSet (const std::string &key, const std::vector< std::string > &fvs) |
void | Connect () |
void | Disconnect () |
bool | IsConnected () |
DbAdapterRedis (const DbAdapterRedis &)=delete | |
DbAdapterRedis & | operator= (const DbAdapterRedis &)=delete |
Disable copy constructor. More... | |
![]() | |
virtual | ~DbAdapter () |
virtual | ~DbAdapter () |
This class can be used to access Redis Runtime DB.
rad::DbAdapterRedis::DbAdapterRedis | ( | ) |
rad::DbAdapterRedis::DbAdapterRedis | ( | const std::string & | ipaddr, |
const int | port, | ||
const timeval & | timeout | ||
) |
ipaddr | DB IP address. |
port | DB port. |
timeout | Timeout for GET/SET commands. |
|
virtual |
Disconnect from DB, if still connected.
|
delete |
rad::DbAdapterRedis::DbAdapterRedis | ( | ) |
rad::DbAdapterRedis::DbAdapterRedis | ( | const std::string & | ipaddr, |
const int | port, | ||
const timeval & | timeout | ||
) |
|
virtual |
|
delete |
|
virtual |
Reconfigure the DB connection parameters.
endpoint | DB endpoint in the format of "address:port". |
timeout | Timeout for GET/SET commands. |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Connect to the DB.
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Delete the specified keys from the DB.
[in] | keys | The keys to delete |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Disconnect from the DB.
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Verify if the specified key exists in the DB.
[in] | key | The key to verify |
Implements rad::DbAdapter.
|
virtual |
Retrieve from the DB the value associated to the key.
[in] | key | An existing key |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Retrieve from the DB the specified field of a key.
[in] | key | An existing key |
[in] | field | An existing field of the key |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Verify the connectivity to the DB.
Implements rad::DbAdapter.
|
virtual |
Retrieve from the DB the values associated to multiple keys.
[in] | keys | Vector of keys |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Retrieve from the DB the values associated to multiple fields of a key.
[in] | key | An existing key |
[in] | fields | Vector of fields. If empty, returns all fields and values. |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Set in the DB multiple values associated to multiple keys.
[in] | kvs | Vector of key-value paris. |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Set in the DB multiple values associated to multiple fields of a key.
[in] | key | The new or existing key. |
[in] | fvs | Vector of field-value pairs. |
Implements rad::DbAdapter.
|
delete |
Disable copy constructor.
|
delete |
Disable copy constructor.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Retrieve from the DB, the entry associated to value/partial value.
[in] | key | An existing key. |
[in] | pattern | Value or partial value. |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Set in the DB the value associated to the key.
[in] | key | The new or existing key |
[in] | value | The value associated to the key |
Implements rad::DbAdapter.
|
virtual |
Implements rad::DbAdapter.
|
virtual |
Set in the DB a field associated to a key.
[in] | key | The new or existing key |
[in] | field | The new or existing field |
[in] | value | The value associated to the field |
Implements rad::DbAdapter.