|
lintel 0.2.0
|
#include <SharedMemoryRepository.h>
Classes | |
| class | ReadLockGuard |
Public Member Functions | |
| 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 |
| virtual SharedMemoryType | getType () const =0 |
| 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 bool | deserialize (const rapidjson::Value &obj) |
| virtual void | serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const =0 |
| virtual std::string | serialize () const |
| virtual void | deserialize (const std::string &json) |
Protected Member Functions | |
| virtual void | onAcquireReadLock () const |
| virtual void | onReleaseReadLock () const |
Static Protected Member Functions | |
| template<typename TYPE > | |
| static constexpr bool | isSerializable () |
Base class for shared-memory-backed repositories with JSON serialization.
| lintel::SharedMemoryRepository::SharedMemoryRepository | ( | std::shared_ptr< SharedMemorySegment > | sharedMemorySegment, |
| std::size_t | sizeOfData, | ||
| std::string_view | sharedMemoryRepository, | ||
| int32_t | codeVersion, | ||
| std::string | uuid | ||
| ) |
Constructor.
| sharedMemorySegment | the underlying shared memory segment |
| sizeOfData | size of each data element in bytes |
| sharedMemoryRepository | name/path of this repository |
| codeVersion | version of the code that created this repository |
| uuid | unique identifier for this repository instance |
|
overridedefault |
| int32_t lintel::SharedMemoryRepository::getCodeVersion | ( | ) | const |
| const std::string & lintel::SharedMemoryRepository::getSharedMemoryRepository | ( | ) | const |
| const std::shared_ptr< SharedMemorySegment > & lintel::SharedMemoryRepository::getSharedMemorySegment | ( | ) | const |
| std::size_t lintel::SharedMemoryRepository::getSizeOfData | ( | ) | const |
|
pure virtual |
Implemented in lintel::SharedMemoryArrayRepository< DATA, DAO, MaxSize >, lintel::SharedMemoryVectorRepository< DATA, DAO >, lintel::SharedMemoryMapRepository< KEY, VALUE, KeyDao, ValueDao >, lintel::SharedMemoryMapRepository< shm::String, PropertyDataDto, shm::String, PropertyDataDao >, and lintel::SharedMemoryObjectRepository< DATA, DAO >.
|
inline |
| const std::string & lintel::SharedMemoryRepository::getUuid | ( | ) | const |
|
inlinestaticconstexprprotected |
Acquire the shared read lock before serializing the underlying shared memory structure. No-op by default.
Reimplemented in lintel::SharedMemoryPropertyRepository.
Implemented in lintel::SharedMemoryPropertyRepository.
Release the shared read lock after serialization. No-op by default.
Reimplemented in lintel::SharedMemoryPropertyRepository.