DDS  ver. 2.0
Public Member Functions | Friends | List of all members
dds::commander_cmd::CKeyValueManager Class Reference

Key-value manager for the DDS commander. More...

#include <KeyValueManager.h>

Public Member Functions

 CKeyValueManager ()
 
 ~CKeyValueManager ()
 
void initWithTopology (const topology_api::CTopology &_topology)
 
void updateWithTopology (const topology_api::CTopology &_topology, const topology_api::CTopology::HashSet_t &_removedTasks, const topology_api::CTopology::HashSet_t &_addedTasks)
 
EKeyUpdateResult updateKeyValue (const protocol_api::SUpdateKeyCmd &_cmd, protocol_api::SUpdateKeyCmd &_serverCmd)
 
void deleteKeyValue (uint64_t _taskID)
 
std::string getKeyValueString (const std::string _propertyID) const
 
std::string getPropertyString () const
 

Friends

std::ostream & operator<< (std::ostream &_stream, const CKeyValueManager &_value)
 

Detailed Description

Key-value manager for the DDS commander.

In order to keep a thread safety of the key-value manager we don't add and remove elements in the data containers on the fly. All key-value records are added during the initialization of the manager based on the information from the topology. When record is deleted it is only marked as deleted without actual deleting it from the container. This approach allows us to have a fast updates and deletes of the records without locking the whole container, only the records which are modifying now are locked.

Constructor & Destructor Documentation

◆ CKeyValueManager()

CKeyValueManager::CKeyValueManager ( )

◆ ~CKeyValueManager()

CKeyValueManager::~CKeyValueManager ( )

Member Function Documentation

◆ deleteKeyValue()

void CKeyValueManager::deleteKeyValue ( uint64_t  _taskID)

◆ getKeyValueString()

string CKeyValueManager::getKeyValueString ( const std::string  _propertyID) const

◆ getPropertyString()

string CKeyValueManager::getPropertyString ( ) const

◆ initWithTopology()

void CKeyValueManager::initWithTopology ( const topology_api::CTopology _topology)

◆ updateKeyValue()

EKeyUpdateResult CKeyValueManager::updateKeyValue ( const protocol_api::SUpdateKeyCmd _cmd,
protocol_api::SUpdateKeyCmd _serverCmd 
)

◆ updateWithTopology()

void CKeyValueManager::updateWithTopology ( const topology_api::CTopology _topology,
const topology_api::CTopology::HashSet_t _removedTasks,
const topology_api::CTopology::HashSet_t _addedTasks 
)

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  _stream,
const CKeyValueManager _value 
)
friend

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