5 #ifndef __DDS__KeyValueManager__ 6 #define __DDS__KeyValueManager__ 18 namespace commander_cmd
40 typedef std::shared_ptr<SKeyValueRecord>
ptr_t;
41 typedef std::weak_ptr<SKeyValueRecord>
wptr_t;
43 typedef std::multimap<uint64_t, SKeyValueRecord::ptr_t>
taskMap_t;
52 void deleteKeyValue();
53 std::string getKeyValueString()
const;
58 mutable std::mutex m_mutex;
65 std::lock_guard<std::mutex> lock(_value.m_mutex);
67 return _stream <<
"SKeyValueRecord cmd: " << _value.m_keyValue <<
" deleted: " << _value.m_deleted;
74 typedef std::shared_ptr<SPropertyRecord>
ptr_t;
75 typedef std::weak_ptr<SPropertyRecord>
wptr_t;
87 std::string getKeyValueString()
const;
97 _stream <<
"SPropertyRecord\n";
98 for (
const auto& v : _value.m_taskMap)
100 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
126 void deleteKeyValue(uint64_t _taskID);
128 std::string getKeyValueString(
const std::string _propertyID)
const;
129 std::string getPropertyString()
const;
145 _stream <<
"CKeyValueManager\n";
146 _stream <<
"[Property map]\n";
147 for (
const auto& v : _value.m_propertyMap)
149 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
151 _stream <<
"[Task map]\n";
152 for (
const auto& v : _value.m_taskMap)
154 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
std::multimap< uint64_t, SKeyValueRecord::ptr_t > taskMap_t
Definition: KeyValueManager.h:43
Definition: UpdateKeyCmd.h:14
TODO: Key-Value has to provide a possibility to properly react on the errors. If Key-Value was not sa...
Definition: KeyValueManager.h:38
EKeyUpdateResult
Definition: KeyValueManager.h:20
std::map< std::string, SPropertyRecord::ptr_t > propertyMap_t
Definition: KeyValueManager.h:77
std::set< uint64_t > HashSet_t
Definition: Topology.h:63
Definition: dds-agent/src/AgentConnectionManager.h:18
Definition: Topology.h:42
Key-value manager for the DDS commander.
Definition: KeyValueManager.h:114
std::weak_ptr< SPropertyRecord > wptr_t
Definition: KeyValueManager.h:75
Container for the key-value records with the same property ID.
Definition: KeyValueManager.h:72
std::ostream & operator<<(std::ostream &_stream, const SKeyValueRecord &_value)
Definition: KeyValueManager.h:63
std::shared_ptr< SPropertyRecord > ptr_t
Definition: KeyValueManager.h:74
std::weak_ptr< SKeyValueRecord > wptr_t
Definition: KeyValueManager.h:41
std::shared_ptr< SKeyValueRecord > ptr_t
Definition: KeyValueManager.h:40