5 #ifndef __DDS__KeyValueManager__ 6 #define __DDS__KeyValueManager__ 18 namespace commander_cmd
33 typedef std::shared_ptr<SKeyValueRecord>
ptr_t;
34 typedef std::weak_ptr<SKeyValueRecord>
wptr_t;
36 typedef std::multimap<uint64_t, SKeyValueRecord::ptr_t>
taskMap_t;
50 mutable std::mutex m_mutex;
57 std::lock_guard<std::mutex> lock(_value.m_mutex);
59 return _stream <<
"SKeyValueRecord cmd: " << _value.m_keyValue <<
" deleted: " << _value.m_deleted;
66 typedef std::shared_ptr<SPropertyRecord>
ptr_t;
67 typedef std::weak_ptr<SPropertyRecord>
wptr_t;
88 _stream <<
"SPropertyRecord\n";
89 for (
const auto& v : _value.m_taskMap)
91 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
119 std::string getPropertyString()
const;
135 _stream <<
"CKeyValueManager\n";
136 _stream <<
"[Property map]\n";
137 for (
const auto& v : _value.m_propertyMap)
139 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
141 _stream <<
"[Task map]\n";
142 for (
const auto& v : _value.m_taskMap)
144 _stream <<
" " << v.first <<
" --> " << *(v.second) <<
"\n";
std::multimap< uint64_t, SKeyValueRecord::ptr_t > taskMap_t
Definition: KeyValueManager.h:36
Definition: UpdateKeyCmd.h:14
bool updateKeyValue(const protocol_api::SUpdateKeyCmd &_cmd, protocol_api::SUpdateKeyCmd &_serverCmd)
Definition: KeyValueManager.cpp:31
TODO: Key-Value has to provide a possibility to properly react on the errors. If Key-Value was not sa...
Definition: KeyValueManager.h:31
friend std::ostream & operator<<(std::ostream &_stream, const SKeyValueRecord &_value)
Definition: KeyValueManager.h:55
std::map< std::string, SPropertyRecord::ptr_t > propertyMap_t
Definition: KeyValueManager.h:69
std::set< uint64_t > HashSet_t
Definition: Topology.h:63
std::string getKeyValueString() const
Definition: KeyValueManager.cpp:54
Definition: dds-agent/src/AgentConnectionManager.h:16
Definition: Topology.h:42
Key-value manager for the DDS commander.
Definition: KeyValueManager.h:105
void deleteKeyValue()
Definition: KeyValueManager.cpp:47
~SKeyValueRecord()
Definition: KeyValueManager.cpp:27
SKeyValueRecord()
Definition: KeyValueManager.cpp:20
std::weak_ptr< SPropertyRecord > wptr_t
Definition: KeyValueManager.h:67
Container for the key-value records with the same property ID.
Definition: KeyValueManager.h:64
std::shared_ptr< SPropertyRecord > ptr_t
Definition: KeyValueManager.h:66
std::weak_ptr< SKeyValueRecord > wptr_t
Definition: KeyValueManager.h:34
std::shared_ptr< SKeyValueRecord > ptr_t
Definition: KeyValueManager.h:33