rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::OldbAsyncWriter Class Reference

#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::ActivityUpdateOldbGetActyivityUpdateOldb ()
 
rad::cii::OldbAdapterGetOldbAdapter ()
 
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
 
OldbAsyncWriteroperator= (const OldbAsyncWriter &)=delete
 Disable copy constructor.
 

Detailed Description

This interface some mandatory methods used by the lsv::app::Application to retrieve application specific configuration and access/update CII OLDB.

Constructor & Destructor Documentation

◆ OldbAsyncWriter() [1/2]

rad::OldbAsyncWriter::OldbAsyncWriter ( std::chrono::seconds conn_timeout,
std::chrono::milliseconds period )

◆ ~OldbAsyncWriter()

rad::OldbAsyncWriter::~OldbAsyncWriter ( )
virtual

◆ OldbAsyncWriter() [2/2]

rad::OldbAsyncWriter::OldbAsyncWriter ( const OldbAsyncWriter & )
delete

Member Function Documentation

◆ Configure()

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).

Parameters
conn_timeoutConnection to OLDB timeout.
periodMinimum duration of the update activity iteration.
oldb_prefixPrefix of the OLDB.

◆ GetActyivityUpdateOldb()

rad::ActivityUpdateOldb & rad::OldbAsyncWriter::GetActyivityUpdateOldb ( )
Returns
A reference to the Activity responsible for updating periodically the OLDB.

◆ GetOldbAdapter()

rad::cii::OldbAdapter & rad::OldbAsyncWriter::GetOldbAdapter ( )
Returns
Reference to the adapter object used to write to the OLDB.

TODO this method could be declared obsolete since OLDB adapter can be retrieved using GetActyivityUpdateOldb().GetOldbAdapter().

◆ operator=()

OldbAsyncWriter & rad::OldbAsyncWriter::operator= ( const OldbAsyncWriter & )
delete

Disable copy constructor.

◆ Set() [1/2]

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.

◆ Set() [2/2]

void rad::OldbAsyncWriter::Set ( const std::string & key,
const rad::cii::OldbType & value )

Method to write an attribute/value pair.

Parameters
keyName of the attribute to be written.
valueValue of the attribute to be written.

◆ SetOldbPrefix()

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.

Parameters
prefixPrefix to be added to the keys.

TODO this method could be declared obsolete since OLDB adapter can be retrieved using GetActyivityUpdateOldb().GetOldbAdapter().

◆ StartWriter()

void rad::OldbAsyncWriter::StartWriter ( )

Method to start the thread writing to the OLDB.

◆ StopWriter()

void rad::OldbAsyncWriter::StopWriter ( )

Method to stop the thread writing to the OLDB.


The documentation for this class was generated from the following files: