|
| bool | checkConnection () |
| | Checks if the server is up.
|
| |
| bool | containsContainer (const armarx::armem::MemoryID &id, std::string key) override |
| |
| bool | containsItem (const armarx::armem::MemoryID &id, std::string key) override |
| |
| void | createPropertyDefinitions (PropertyDefinitionsPtr &defs, const std::string &prefix) override |
| |
| std::vector< std::string > | getContainerKeys (const armarx::armem::MemoryID &id) override |
| | Returns keys that allow use to move a step further in the hierarchy (e.g.
|
| |
| std::vector< std::string > | getItemKeys (const armarx::armem::MemoryID &id) override |
| | Keys of the actual items containing data stored for the memory id.
|
| |
| | RestPersistence () |
| |
| | RestPersistence (const std::string &identifier, const std::string &exportName) |
| |
| | RestPersistence (const std::string &identifier, const std::string &exportName, const std::string &host, int port, bool disableIfNotAvailable=false) |
| |
| std::vector< unsigned char > | retrieveItem (const armarx::armem::MemoryID &id, std::string key) override |
| | Retrieve the actual data of an item stored for the memory id.
|
| |
| void | storeItem (const armarx::armem::MemoryID &id, std::string key, std::vector< unsigned char > &data) override |
| | Stores an item containing actual data for the current memory id.
|
| |
| virtual void | disable () |
| |
| virtual void | enable () |
| |
| std::string | getExportName () |
| |
| std::string | getIdentifier () |
| |
| virtual bool | isEnabled () |
| |
| | 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) |
| |
| virtual ItemResult | retrieveItemWithOrigin (const armarx::armem::MemoryID &id, std::string &key) |
| | Retrieves the actual data but also appends the origin which is in this case the strategy identifier.
|
| |
| virtual void | setExportName (const std::string &exportName) |
| |
| void | setIdentifier (const std::string &identifier) |
| |
| void | storeItem (const armarx::armem::MemoryID &memoryId, ItemIdentifier itemIdentifer, std::vector< unsigned char > &data) |
| |
| virtual | ~MemoryPersistenceStrategy ()=default |
| |
Persistence strategy that uses a rest server as its data sink.
How the data is stored on the rest server is up to the server.
The structure of rest endpoints are very similar to a directory structure.
General endpoint: /endpoint GET: /endpoint?containers: return all container keys of the endpoint GET: /endpoint?container=key: check if a container with key exists (true = Status Code 200, false = Status Code 404) GET: /endpoint?items: return all item keys of the endpoint GET: /endpoint?item=key: return Status Code 200 with item data OR Status Code 404 if the item is not inside of the container PUT: /endpoint?item: store item data (data = http body content) DELETE: /endpoint?item=key: removes item with key, return Status Code 200 on success and Status Code 404 if item not found DELETE: /endpoint?container=key: removes container with key, return Status Code 200 on success and Status Code 404 if container not found
NOTE: DELETE-methods are implemented, but the curren memory system does not use it in general.
Available endpoints: /ltm/:exportName -> memories /ltm/:exportName/:memoryName -> core segments /ltm/:exportName/:memoryName/:coreSegmentName -> provider segments /ltm/:exportName/:memoryName/:coreSegmentName/:providerSegmentName -> entities /ltm/:exportName/:memoryName/:coreSegmentName/:providerSegmentName/:entityName -> entity snapshots /ltm/:exportName/:memoryName/:coreSegmentName/:providerSegmentName/:entityName/:timestamp -> entity instances /ltm/:exportName/:memoryName/:coreSegmentName/:providerSegmentName/:entityName/:timestamp/:instanceIndex -> entity instance (here you will definitely find some items)