rad 6.2.0
|
#include <oldbAsyncWriter.hpp>
Public Member Functions | |
OldbAsyncWriter (std::chrono::seconds conn_timeout, std::chrono::milliseconds period) | |
virtual | ~OldbAsyncWriter () |
void | Configure (const std::chrono::seconds conn_timeout, const std::chrono::milliseconds period, const std::string &oldb_prefix) |
rad::ActivityUpdateOldb & | GetActyivityUpdateOldb () |
rad::cii::OldbAdapter & | GetOldbAdapter () |
void | SetOldbPrefix (const std::string &prefix) |
void | StartWriter () |
void | StopWriter () |
void | Set (const std::string &key, const rad::cii::OldbType &value) |
void | Set (const std::map< std::string, rad::cii::OldbType > &kv_map) |
OldbAsyncWriter (const OldbAsyncWriter &)=delete | |
OldbAsyncWriter & | operator= (const OldbAsyncWriter &)=delete |
Disable copy constructor. | |
This interface some mandatory methods used by the lsv::app::Application to retrieve application specific configuration and access/update CII OLDB.
rad::OldbAsyncWriter::OldbAsyncWriter | ( | std::chrono::seconds | conn_timeout, |
std::chrono::milliseconds | period ) |
|
virtual |
|
delete |
void rad::OldbAsyncWriter::Configure | ( | const std::chrono::seconds | conn_timeout, |
const std::chrono::milliseconds | period, | ||
const std::string & | oldb_prefix ) |
This method can be used to configure the class after the object has been created (e.g. because the configuration is loaded later).
conn_timeout | Connection to OLDB timeout. |
period | Minimum duration of the update activity iteration. |
oldb_prefix | Prefix of the OLDB. |
rad::ActivityUpdateOldb & rad::OldbAsyncWriter::GetActyivityUpdateOldb | ( | ) |
rad::cii::OldbAdapter & rad::OldbAsyncWriter::GetOldbAdapter | ( | ) |
TODO this method could be declared obsolete since OLDB adapter can be retrieved using GetActyivityUpdateOldb().GetOldbAdapter().
|
delete |
Disable copy constructor.
void rad::OldbAsyncWriter::Set | ( | const std::map< std::string, rad::cii::OldbType > & | kv_map | ) |
Method to merge the given attributes/values with the ones currently stored in this object.
void rad::OldbAsyncWriter::Set | ( | const std::string & | key, |
const rad::cii::OldbType & | value ) |
Method to write an attribute/value pair.
key | Name of the attribute to be written. |
value | Value of the attribute to be written. |
void rad::OldbAsyncWriter::SetOldbPrefix | ( | const std::string & | prefix | ) |
This method allows to set a prefix to be added to all the keys before writing to the OLDB.
prefix | Prefix to be added to the keys. |
TODO this method could be declared obsolete since OLDB adapter can be retrieved using GetActyivityUpdateOldb().GetOldbAdapter().
void rad::OldbAsyncWriter::StartWriter | ( | ) |
Method to start the thread writing to the OLDB.
void rad::OldbAsyncWriter::StopWriter | ( | ) |
Method to stop the thread writing to the OLDB.