|
|
Basically the option to use multiple ltm sinks as source or target. More...
#include <RobotAPI/libraries/armem/server/ltm/persistence/RedundantPersistenceStrategy.h>
Inheritance diagram for RedundantPersistenceStrategy:Public Member Functions | |
| void | addStrategy (std::shared_ptr< MemoryPersistenceStrategy > strategy) |
| Add another strategy to the end. More... | |
| void | clearStrategies () |
| Removes all strategies. More... | |
| bool | containsContainer (const armarx::armem::MemoryID &id, std::string key) override |
| Checks if any strategy contains the container. More... | |
| bool | containsItem (const armarx::armem::MemoryID &id, std::string key) override |
| Checks if any strategy contains the item. More... | |
| void | createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix) override |
| void | disable () override |
| void | enable () override |
| std::vector< std::string > | getContainerKeys (const armarx::armem::MemoryID &id) override |
| Returns all containers over all strategies. More... | |
| std::vector< std::string > | getItemKeys (const armarx::armem::MemoryID &id) override |
| Returns all items over all strategies. More... | |
| bool | isEnabled () override |
| RedundantPersistenceStrategy ()=default | |
| RedundantPersistenceStrategy (std::vector< std::shared_ptr< MemoryPersistenceStrategy >> &strategies) | |
| std::vector< unsigned char > | retrieveItem (const armarx::armem::MemoryID &id, std::string key) override |
| Retrieves the data of the item following the FIFO principle (if the item exists at any strategy). More... | |
| ItemResult | retrieveItemWithOrigin (const armarx::armem::MemoryID &id, std::string &key) override |
| Retrieves the actual data but also appends the origin which is in this case the strategy identifier. More... | |
| void | setExportName (const std::string &exportName) override |
| Sets the export name for all strategies. More... | |
| void | storeItem (const armarx::armem::MemoryID &id, const std::string key, std::vector< unsigned char > &data) override |
| Stores the item to every strategy. More... | |
Public Member Functions inherited from MemoryPersistenceStrategy | |
| std::string | getExportName () |
| std::string | getIdentifier () |
| MemoryPersistenceStrategy () | |
| MemoryPersistenceStrategy (const std::string &identifier, const std::string &exportName, bool enabled=true) | |
| std::vector< unsigned char > | retrieveItem (const armarx::armem::MemoryID &memoryId, ItemIdentifier itemIdentifier) |
| void | setIdentifier (const std::string &identifier) |
| void | storeItem (const armarx::armem::MemoryID &memoryId, ItemIdentifier itemIdentifer, std::vector< unsigned char > &data) |
| virtual | ~MemoryPersistenceStrategy ()=default |
Additional Inherited Members | |
Static Public Attributes inherited from MemoryPersistenceStrategy | |
| static const constexpr char * | DATA_FILENAME = "data.aron" |
| static const int | DEPTH_TO_DATA_FILES = 7 |
| static const constexpr char * | MEMORY_EXPORT_SUFFIX = "_" |
| static const constexpr char * | METADATA_FILENAME = "metadata.aron" |
| static const constexpr char * | TYPE_FILENAME = "type.aron" |
Protected Attributes inherited from MemoryPersistenceStrategy | |
| bool | enabled_ = true |
| If false, the strategy is not writing or reading anything. More... | |
| std::string | exportName_ |
| Name of the specific memory export where our items should be stored. More... | |
| std::string | identifier_ |
| Name of the strategy. More... | |
Basically the option to use multiple ltm sinks as source or target.
Holds a list to different persistence strategies potentially also another redundant strategy resulting in tree structure.
Why the name 'redundant'? -> Comes from the possibility to search in multiple ltm sinks for an item or store item to different sinks that are potentially at different location/different implementations. But you won't find any more redundancies features.
What if an item key occurs multiple times? -> FIFO: Strategy that was added first is choosen. In case we have a tree, you go from "left to right through the graph".
Definition at line 22 of file RedundantPersistenceStrategy.h.
|
default |
|
inline |
Definition at line 27 of file RedundantPersistenceStrategy.h.
|
inline |
Add another strategy to the end.
Will be last in the item/container FIFO.
Definition at line 167 of file RedundantPersistenceStrategy.h.
|
inline |
Removes all strategies.
Definition at line 176 of file RedundantPersistenceStrategy.h.
|
inlineoverridevirtual |
Checks if any strategy contains the container.
Implements MemoryPersistenceStrategy.
Definition at line 73 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Checks if any strategy contains the item.
Implements MemoryPersistenceStrategy.
Definition at line 90 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Implements MemoryPersistenceStrategy.
Definition at line 182 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Reimplemented from MemoryPersistenceStrategy.
Definition at line 204 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Reimplemented from MemoryPersistenceStrategy.
Definition at line 213 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Returns all containers over all strategies.
Duplicates are not treated.
Implements MemoryPersistenceStrategy.
Definition at line 38 of file RedundantPersistenceStrategy.h.
|
inlineoverridevirtual |
Returns all items over all strategies.
Duplicates are not treated.
Implements MemoryPersistenceStrategy.
Definition at line 56 of file RedundantPersistenceStrategy.h.
|
inlineoverridevirtual |
Reimplemented from MemoryPersistenceStrategy.
Definition at line 191 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Retrieves the data of the item following the FIFO principle (if the item exists at any strategy).
Implements MemoryPersistenceStrategy.
Definition at line 121 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Retrieves the actual data but also appends the origin which is in this case the strategy identifier.
Reimplemented from MemoryPersistenceStrategy.
Definition at line 135 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Sets the export name for all strategies.
Reimplemented from MemoryPersistenceStrategy.
Definition at line 152 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function:
|
inlineoverridevirtual |
Stores the item to every strategy.
Implements MemoryPersistenceStrategy.
Definition at line 107 of file RedundantPersistenceStrategy.h.
Here is the call graph for this function: