DDS  ver. 2.0
Public Types | Public Member Functions | Friends | List of all members
dds::commander_cmd::SKeyValueRecord Struct Reference

TODO: Key-Value has to provide a possibility to properly react on the errors. If Key-Value was not saved by the Commander because of the version mismatch, we have to send back the information about it to the user, providing error code, error message, user record and server record. Based on this information user can properly construct a new record and save it back to server. More...

#include <KeyValueManager.h>

Public Types

typedef std::shared_ptr< SKeyValueRecordptr_t
 
typedef std::weak_ptr< SKeyValueRecordwptr_t
 
typedef std::multimap< uint64_t, SKeyValueRecord::ptr_ttaskMap_t
 

Public Member Functions

 SKeyValueRecord ()
 
 ~SKeyValueRecord ()
 
EKeyUpdateResult updateKeyValue (const protocol_api::SUpdateKeyCmd &_cmd, protocol_api::SUpdateKeyCmd &_serverCmd)
 
void deleteKeyValue ()
 
std::string getKeyValueString () const
 

Friends

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

Detailed Description

TODO: Key-Value has to provide a possibility to properly react on the errors. If Key-Value was not saved by the Commander because of the version mismatch, we have to send back the information about it to the user, providing error code, error message, user record and server record. Based on this information user can properly construct a new record and save it back to server.

Represents a single key-value record.

This object is thread safe, i.e. key-value updates and deletes can be called from different threads.

Member Typedef Documentation

◆ ptr_t

◆ taskMap_t

◆ wptr_t

Constructor & Destructor Documentation

◆ SKeyValueRecord()

SKeyValueRecord::SKeyValueRecord ( )

◆ ~SKeyValueRecord()

SKeyValueRecord::~SKeyValueRecord ( )

Member Function Documentation

◆ deleteKeyValue()

void SKeyValueRecord::deleteKeyValue ( )

◆ getKeyValueString()

string SKeyValueRecord::getKeyValueString ( ) const

◆ updateKeyValue()

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

Friends And Related Function Documentation

◆ operator<<

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

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