|
DDS
ver. 2.0
|
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) |
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.
| CKeyValueManager::CKeyValueManager | ( | ) |
| CKeyValueManager::~CKeyValueManager | ( | ) |
| void CKeyValueManager::deleteKeyValue | ( | uint64_t | _taskID | ) |
| string CKeyValueManager::getKeyValueString | ( | const std::string | _propertyID | ) | const |
| string CKeyValueManager::getPropertyString | ( | ) | const |
| void CKeyValueManager::initWithTopology | ( | const topology_api::CTopology & | _topology | ) |
| EKeyUpdateResult CKeyValueManager::updateKeyValue | ( | const protocol_api::SUpdateKeyCmd & | _cmd, |
| protocol_api::SUpdateKeyCmd & | _serverCmd | ||
| ) |
| void CKeyValueManager::updateWithTopology | ( | const topology_api::CTopology & | _topology, |
| const topology_api::CTopology::HashSet_t & | _removedTasks, | ||
| const topology_api::CTopology::HashSet_t & | _addedTasks | ||
| ) |
|
friend |
1.8.13