Go to the documentation of this file.
28 return filename_ + fileType_;
32 std::string filename_;
33 std::string fileType_;
65 const std::string& exportName,
66 const std::filesystem::path& memoryParentPath) :
100 std::vector<unsigned char>&
data)
override;
107 std::string key)
override;
119 if (!enoughDiskSpaceLeft())
121 ARMARX_WARNING <<
"Not enough available disk space for DiskPersistance Strategy. "
123 << this->minDiskSpace
124 <<
" GB available disk space to record into LTM using this strategy";
132 std::filesystem::path memoryParentPath_;
147 bool createIfNotExistent =
false);
151 bool createIfNotExistent =
false);
155 const std::vector<unsigned char>&
data);
160 std::filesystem::path getMemoryParentPath();
162 bool enoughDiskSpaceLeft();
std::vector< unsigned char > retrieveItem(const armarx::armem::MemoryID &id, std::string key) override
Reads the data of the file with name 'key' at the current location.
FileIdentifier(std::string &filename, std::string &fileType)
DiskPersistence(const std::string &identifier, const std::string &exportName, const std::filesystem::path &memoryParentPath)
void createPropertyDefinitions(PropertyDefinitionsPtr &defs, const std::string &prefix) override
Abstract memory persistence strategy (resp.
For usage if you might want to create the key using some logic defined with your strategy rather than...
DiskPersistence(const std::filesystem::path &memoryParentPath)
std::vector< std::string > getContainerKeys(const armarx::armem::MemoryID &id) override
Returns all containers for the current id.
Persistence strategy that writes items (e.g.
void storeItem(const armarx::armem::MemoryID &id, std::string key, std::vector< unsigned char > &data) override
Create a new file with name 'key' and stores the data inside it.
void setMinAvailableDiskSpace(const int minDiskSpace)
std::string getKey() override
bool containsItem(const armarx::armem::MemoryID &id, std::string key) override
Checks if current container contains the item defined by its key.
virtual ~FileIdentifier()
std::vector< std::string > getItemKeys(const armarx::armem::MemoryID &id) override
Returns all items for the current id.
bool containsContainer(const armarx::armem::MemoryID &id, std::string key) override
Checks if the container is available for the current memory id.