lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao > Class Template Reference

#include <SharedMemoryRepository.h>

Inheritance diagram for lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >:
lintel::SharedMemoryRepository lintel::JsonSerializable

Public Member Functions

 SharedMemoryMapRepository (const std::shared_ptr< SharedMemoryService > &sharedMemoryService, const std::shared_ptr< SharedMemorySegment > &segment, int32_t codeVersion, std::string uuid, int32_t sizeOfData=sizeof(VALUE))
 
SharedMemoryType getType () const override
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
bool deserialize (const rapidjson::Value &obj) override
 
- Public Member Functions inherited from lintel::SharedMemoryRepository
 SharedMemoryRepository (std::shared_ptr< SharedMemorySegment > sharedMemorySegment, std::size_t sizeOfData, std::string_view sharedMemoryRepository, int32_t codeVersion, std::string uuid)
 
const std::shared_ptr< SharedMemorySegment > & getSharedMemorySegment () const
 
std::size_t getSizeOfData () const
 
const std::string & getSharedMemoryRepository () const
 
int32_t getCodeVersion () const
 
const std::string & getUuid () const
 
std::string_view getTypeName () const
 
 ~SharedMemoryRepository () override=default
 
virtual void onMigrate (int32_t currentActiveVersion)=0
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual std::string serialize () const
 
virtual void deserialize (const std::string &json)
 

Protected Member Functions

Map & getMap () const
 
- Protected Member Functions inherited from lintel::SharedMemoryRepository
virtual void onAcquireReadLock () const
 
virtual void onReleaseReadLock () const
 

Protected Attributes

std::shared_ptr< SharedMemoryService > m_sharedMemoryService
 

Additional Inherited Members

- Static Protected Member Functions inherited from lintel::SharedMemoryRepository
template<typename TYPE >
static constexpr bool isSerializable ()
 

Detailed Description

template<typename KEY, typename VALUE, typename KeyDao, typename ValueDao>
class lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >

Shared memory repository backed by an associative map.

Template Parameters
KEYkey type
VALUEmapped value type
KeyDaoserializable DAO wrapper for KEY
ValueDaoserializable DAO wrapper for VALUE

Constructor & Destructor Documentation

◆ SharedMemoryMapRepository()

lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::SharedMemoryMapRepository ( const std::shared_ptr< SharedMemoryService > &  sharedMemoryService,
const std::shared_ptr< SharedMemorySegment > &  segment,
int32_t  codeVersion,
std::string  uuid,
int32_t  sizeOfData = sizeof(VALUE) 
)
inline

Member Function Documentation

◆ deserialize()

bool lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::deserialize ( const rapidjson::Value &  obj)
inlineoverridevirtual

deserialization of given value in json

Parameters
objjson value
Returns
success or not ?

Reimplemented from lintel::JsonSerializable.

◆ getMap()

Map & lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::getMap ( ) const
inlineprotected

◆ getType()

SharedMemoryType lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::getType ( ) const
inlineoverridevirtual
Returns
the shared memory data structure type

Implements lintel::SharedMemoryRepository.

◆ serialize()

void lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
inlineoverridevirtual

serialization of object to json itself

Parameters
writerfor serialization of object

Implements lintel::JsonSerializable.

Member Data Documentation

◆ m_sharedMemoryService

std::shared_ptr<SharedMemoryService> lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >::m_sharedMemoryService
protected

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