CoreSegment Class Reference

#include <RobotAPI/libraries/armem/server/ltm/CoreSegment.h>

+ Inheritance diagram for CoreSegment:

Public Member Functions

 CoreSegment (const std::string &exportName, const MemoryID &memoryId, const std::shared_ptr< Processors > &filters, const std::shared_ptr< persistence::MemoryPersistenceStrategy > &persistenceStrategy)
 
std::shared_ptr< ProviderSegmentfindProviderSegment (const std::string &name) const override
 find provider segment More...
 
bool forEachProviderSegment (std::function< void(ProviderSegment &)> func) const override
 iterate over all provider segments of this ltm More...
 
std::shared_ptr< persistence::MemoryPersistenceStrategygetPersistenceStrategy () const
 
bool hasProviderSegment (const std::string &name) const override
 check if provider segment exists More...
 
- Public Member Functions inherited from CoreSegmentBase< ProviderSegment >
aron::type::ObjectPtr aronType () const
 get aron type More...
 
Statistics getStatistics () const
 
void loadAllReferences (armem::wm::CoreSegment &coreSeg)
 return the full sub-ltm as a wm::CoreSegment with only references the ltm may be huge, use with caution More...
 
void loadLatestNReferences (int n, armem::wm::CoreSegment &coreSeg)
 
 MemoryItem (const std::string &exportName, const MemoryID &)
 
 MemoryItem (const std::string &exportName, const MemoryID &, const std::shared_ptr< Processors > &)
 
void resetStatistics ()
 statistics More...
 
void resolve (armem::wm::CoreSegment &coreSeg)
 convert the references of the input into a wm::Memory More...
 
void store (const armem::wm::CoreSegment &coreSeg, bool simulatedVersion)
 encode the content of a wm::Memory and store More...
 
- Public Member Functions inherited from MemoryItem
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
 

Protected Member Functions

void _loadAllReferences (armem::wm::CoreSegment &wmCoreSegment) override
 
void _loadLatestNReferences (int n, armem::wm::CoreSegment &wmCoreSegment) override
 
void _resolve (armem::wm::CoreSegment &wmCoreSegment) override
 
void _store (const armem::wm::CoreSegment &wmCoreSegment, bool simulatedVersion) override
 
- Protected Member Functions inherited from MemoryItem
virtual void _setExportName (const std::string &)
 
virtual void _setMemoryID (const MemoryID &)
 

Additional Inherited Members

- Public Types inherited from CoreSegmentBase< ProviderSegment >
using ProviderSegmentT = ProviderSegment
 
- Static Public Member Functions inherited from CoreSegmentBase< ProviderSegment >
static std::string getLevelName ()
 get level name More...
 
- Protected Attributes inherited from CoreSegmentBase< ProviderSegment >
std::recursive_mutex ltm_mutex
 
Statistics statistics
 
- Protected Attributes inherited from MemoryItem
std::shared_ptr< Processorsprocessors
 

Detailed Description

Definition at line 13 of file CoreSegment.h.

Constructor & Destructor Documentation

◆ CoreSegment()

CoreSegment ( const std::string &  exportName,
const MemoryID memoryId,
const std::shared_ptr< Processors > &  filters,
const std::shared_ptr< persistence::MemoryPersistenceStrategy > &  persistenceStrategy 
)

Definition at line 13 of file CoreSegment.cpp.

Member Function Documentation

◆ _loadAllReferences()

void _loadAllReferences ( armem::wm::CoreSegment wmCoreSegment)
overrideprotectedvirtual

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 76 of file CoreSegment.cpp.

+ Here is the call graph for this function:

◆ _loadLatestNReferences()

void _loadLatestNReferences ( int  n,
armem::wm::CoreSegment wmCoreSegment 
)
overrideprotectedvirtual

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 115 of file CoreSegment.cpp.

+ Here is the call graph for this function:

◆ _resolve()

void _resolve ( armem::wm::CoreSegment wmCoreSegment)
overrideprotectedvirtual

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 154 of file CoreSegment.cpp.

+ Here is the call graph for this function:

◆ _store()

void _store ( const armem::wm::CoreSegment wmCoreSegment,
bool  simulatedVersion 
)
overrideprotectedvirtual

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 177 of file CoreSegment.cpp.

+ Here is the call graph for this function:

◆ findProviderSegment()

std::shared_ptr< ProviderSegment > findProviderSegment ( const std::string &  ) const
overridevirtual

find provider segment

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 57 of file CoreSegment.cpp.

+ Here is the call graph for this function:

◆ forEachProviderSegment()

bool forEachProviderSegment ( std::function< void(ProviderSegment &)>  func) const
overridevirtual

iterate over all provider segments of this ltm

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 21 of file CoreSegment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPersistenceStrategy()

std::shared_ptr<persistence::MemoryPersistenceStrategy> getPersistenceStrategy ( ) const
inline

Definition at line 26 of file CoreSegment.h.

◆ hasProviderSegment()

bool hasProviderSegment ( const std::string &  ) const
overridevirtual

check if provider segment exists

Implements CoreSegmentBase< ProviderSegment >.

Definition at line 47 of file CoreSegment.cpp.

+ Here is the caller graph for this function:

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