|
A memory storing data on the hard drive and in mongodb (needs 'armarx memory start' to start the mongod instance) More...
#include <RobotAPI/libraries/armem/server/ltm/Memory.h>
Public Types | |
using | BufferedBase = detail::mixin::BufferedMemoryMixin< CoreSegment > |
using | CachedBase = detail::mixin::CachedMemoryMixin< CoreSegment > |
using | MemoryBase = detail::MemoryBase< CoreSegment > |
![]() | |
using | CoreSegmentT = CoreSegment |
Public Member Functions | |
void | _configure (const nlohmann::json &config) final |
configuration More... | |
void | _disable () final |
void | _enable () final |
void | _setExportName (const std::string &memoryName) final |
void | _setMemoryID (const MemoryID &memoryId) final |
void | createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix) override |
default parameters. Implementation should use the configuration to configure More... | |
std::shared_ptr< CoreSegment > | findCoreSegment (const std::string &coreSegmentName) const final |
find core segment More... | |
bool | forEachCoreSegment (std::function< void(CoreSegment &)> func) const final |
iterate over all core segments of this ltm More... | |
void | getAndSaveStatistics () |
getAndSaveStatistics generates and saves statistics for a LTM recording More... | |
std::shared_ptr< persistence::RedundantPersistenceStrategy > | getPersistenceStrategy () const |
bool | hasCoreSegment (const std::string &coreSegmentName) const final |
check if core segment exists More... | |
Memory () | |
Memory (const std::string &exportName, const std::string &memoryName) | |
Memory (const std::string &exportName, const std::string &memoryName, const std::shared_ptr< persistence::RedundantPersistenceStrategy > &persistenceStrategy) | |
void | setPersistenceStrategy (std::shared_ptr< persistence::RedundantPersistenceStrategy > persistenceStrategy) |
![]() | |
void | configure () |
initialize config More... | |
void | disable () |
disable this LTM More... | |
void | enable () |
enable this LTM More... | |
std::map< std::string, processor::SnapshotFilter::FilterStatistics > | getFilterStatistics () |
RecordingMode | getRecordingMode () const |
Statistics | getStatistics () const |
bool | isRecording () const |
armem::wm::Memory | loadAllAndResolve () |
return the full ltm as a wm::Memory and resolves the references the ltm may be huge, use with caution More... | |
void | loadAllAndResolve (armem::wm::Memory &memory) |
armem::wm::Memory | loadAllReferences () |
return the full ltm as a wm::Memory with only references the ltm may be huge, use with caution More... | |
void | loadAllReferences (armem::wm::Memory &memory) |
armem::wm::Memory | loadLatestNReferences (int n) |
void | loadLatestNReferences (int n, armem::wm::Memory &memory) |
void | loadLatestNReferences (int n, armem::wm::Memory &memory, std::list< std::string > coreSegNames) |
void | loadOnStartup () |
MemoryBase (const std::string &exportName, const MemoryID &id) | |
virtual void | resetStatistics () |
statistics More... | |
void | resolve (armem::wm::Memory &memory) |
convert the references of the input into a wm::Memory More... | |
void | setRecordingMode (const RecordingMode m) |
void | setRecordingMode (const std::string &m) |
void | startRecording () |
enable/disable More... | |
void | stopRecording () |
void | store (const armem::server::wm::Memory &serverMemory) |
append a wm::Memory instance to the ltm More... | |
void | store (const armem::wm::Memory &memory) |
append a wm::Memory instance to the ltm More... | |
![]() | |
virtual std::string | getExportName () const |
MemoryID | getMemoryID () const |
MemoryID | id () const |
MemoryItem (const std::string &exportName, const MemoryID &) | |
MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &) | |
std::string | name () const |
void | setExportName (const std::string &n) |
void | setMemoryID (const MemoryID &) |
void | setMemoryName (const std::string &memoryName) |
virtual | ~MemoryItem ()=default |
![]() | |
BufferedMemoryMixin (const MemoryID &id) | |
void | bufferFinished () |
void | directlyStore (const armem::server::wm::Memory &serverMemory, bool simulatedVersion=false) |
void | directlyStore (const armem::wm::Memory &memory, bool simulatedVersion=false) |
virtual | ~BufferedMemoryMixin ()=default |
![]() | |
CachedMemoryMixin (const MemoryID &id) | |
Protected Member Functions | |
void | _directlyStore (const armem::wm::Memory &wmMemory, bool simulatedVersion) final |
void | _loadAllReferences (armem::wm::Memory &wmMemory) final |
void | _loadLatestNReferences (int n, armem::wm::Memory &wmMemory) final |
void | _loadLatestNReferences (int n, armem::wm::Memory &wmMemory, std::list< std::string > coreSegNames) final |
void | _loadOnStartup () final |
void | _resolve (armem::wm::Memory &wmMemory) final |
void | _store (const armem::wm::Memory &wmMemory) final |
![]() | |
void | addToBuffer (const armem::wm::Memory &memory) |
void | configureMixin (const nlohmann::json &json) |
configuration More... | |
void | createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix) |
armem::wm::Memory | getBuffer () const |
void | setMixinMemoryID (const MemoryID &id) |
void | start () |
void | stop () |
void | storeBuffer () |
![]() | |
void | addToCache (const armem::wm::Memory &memory) |
bool | cacheHasCoreSegment (const MemoryID &n) const |
bool | cacheHasCoreSegment (const std::string &n) const |
bool | cacheHasEntity (const MemoryID &n) const |
bool | cacheHasEntityInstance (const MemoryID &n) const |
bool | cacheHasEntitySnapshot (const MemoryID &n) const |
bool | cacheHasProviderSegment (const MemoryID &n) const |
void | configureMixin (const nlohmann::json &json) |
configuration More... | |
armem::wm::Memory | getCache () const |
void | setMixinMemoryID (const MemoryID &id) |
Additional Inherited Members | |
![]() | |
static std::string | getLevelName () |
get level name1 More... | |
![]() | |
struct armarx::armem::server::ltm::detail::MemoryBase::Properties | p |
![]() | |
std::atomic_bool | enabled |
std::recursive_mutex | ltm_mutex |
RecordingMode | recordingMode |
Statistics | statistics |
![]() | |
std::shared_ptr< Processors > | processors |
![]() | |
std::unique_ptr< armem::wm::Memory > | buffer |
Internal memory for data consolidated from wm to ltm (double-buffer) The to-put-to-ltm buffer (contains data in plain text) This buffer may still be filtered (e.g. More... | |
std::atomic_flag | storeFlag |
float | storeFrequency |
The frequency (Hz) to store data to the ltm. More... | |
std::unique_ptr< armem::wm::Memory > | to_store |
![]() | |
std::unique_ptr< armem::wm::Memory > | cache |
A memory storing data on the hard drive and in mongodb (needs 'armarx memory start' to start the mongod instance)
using MemoryBase = detail::MemoryBase<CoreSegment> |
Memory | ( | ) |
Definition at line 115 of file Memory.cpp.
Memory | ( | const std::string & | exportName, |
const std::string & | memoryName | ||
) |
Definition at line 119 of file Memory.cpp.
Memory | ( | const std::string & | exportName, |
const std::string & | memoryName, | ||
const std::shared_ptr< persistence::RedundantPersistenceStrategy > & | persistenceStrategy | ||
) |
Definition at line 127 of file Memory.cpp.
|
finalvirtual |
configuration
ARMARX_INFO << "MemoryID=" << getMemoryID().str(); ARMARX_INFO << "Identifier=" << identifier; ARMARX_INFO << "Export name=" << getExportName(); ARMARX_INFO << "Host=" << p.restHost; ARMARX_INFO << "Port=" << p.restPort; ARMARX_INFO << "DisableIfNotAvailable=" << p.restDisableIfNotAvailable;
std::shared_ptr<armem::server::ltm::persistence::RestPersistence> restPersistence = std::make_shared<armem::server::ltm::persistence::RestPersistence>( identifier, getExportName(), p.restHost, p.restPort, p.restDisableIfNotAvailable);
redundantPersistence->addStrategy(restPersistence);
Reimplemented from MemoryBase< CoreSegment >.
Definition at line 18 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 390 of file Memory.cpp.
|
finalvirtual |
Reimplemented from MemoryBase< CoreSegment >.
Definition at line 158 of file Memory.cpp.
|
finalvirtual |
Reimplemented from MemoryBase< CoreSegment >.
Definition at line 150 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 253 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 283 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 313 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 432 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 359 of file Memory.cpp.
|
finalvirtual |
Reimplemented from MemoryBase< CoreSegment >.
Definition at line 139 of file Memory.cpp.
|
finalvirtual |
Reimplemented from MemoryItem.
Definition at line 168 of file Memory.cpp.
|
finalprotectedvirtual |
Implements MemoryBase< CoreSegment >.
Definition at line 383 of file Memory.cpp.
|
overridevirtual |
default parameters. Implementation should use the configuration to configure
Reimplemented from MemoryBase< CoreSegment >.
Definition at line 244 of file Memory.cpp.
|
finalvirtual |
find core segment
Implements MemoryBase< CoreSegment >.
Definition at line 223 of file Memory.cpp.
|
finalvirtual |
iterate over all core segments of this ltm
Implements MemoryBase< CoreSegment >.
Definition at line 182 of file Memory.cpp.
void getAndSaveStatistics | ( | ) |
getAndSaveStatistics generates and saves statistics for a LTM recording
Definition at line 438 of file Memory.cpp.
|
inline |
|
finalvirtual |
check if core segment exists
Implements MemoryBase< CoreSegment >.
Definition at line 210 of file Memory.cpp.
|
inline |