|
MIRA
|
Stores data sequentially into different files (striped) providing a reliable way to retrieve data later from one of the files even if some of the files are corrupted (e.g. More...
#include <database/StripedStorage.h>

Public Member Functions | |
| StripedStorageXML () | |
| StripedStorageXML (std::string baseName, uint32 maxFiles) | |
| StripedStorageXML (const Path &directory, std::string baseName, uint32 maxFiles) | |
| template<typename T > | |
| Path | store (const T &data, const Time &at=Time::now()) |
| Stores the given data in one of the files adding a timestamp and returns the filename of the written file. More... | |
| template<typename T > | |
| std::pair< T, Time > | retrieve (bool(*validCheckFunc)(const T &)=NULL) const |
| Retrieves the data from one of the files. More... | |
| void | setFilePath (const Path &path) |
| Resolves path and assigns to filePath. More... | |
| const Path & | getFilePath () |
| Path | generateFilename (uint32 fileNr) const |
| Returns the filename (including path) of the file with the specified nr. More... | |
| std::list< Path > | getFiles () const |
| Returns a list of filenames (including paths) for all files that are used for persistent storage. More... | |
| void | deleteAllFiles () |
| Delete all files that were stored by the persistent storage. More... | |
Public Attributes | |
| std::string | fileNameBase |
| The base filename. More... | |
| std::string | extension |
| The file name extension. More... | |
| uint32 | maxFiles |
| Maximum number of used files. More... | |
Protected Attributes | |
| Path | filePath |
| The path where the files are stored. More... | |
| uint32 | mCurrentFileIdx |
Stores data sequentially into different files (striped) providing a reliable way to retrieve data later from one of the files even if some of the files are corrupted (e.g.
caused by program termination during write operation).
|
inline |
|
inline |
|
inline |
Stores the given data in one of the files adding a timestamp and returns the filename of the written file.
|
inline |
Retrieves the data from one of the files.
If more than one file contain valid data the data with the newest timestamp is returned.
| validCheckFunc | optional function for checking if restored data is valid |
|
inlineinherited |
Resolves path and assigns to filePath.
|
inlineinherited |
Returns the filename (including path) of the file with the specified nr.
|
inlineinherited |
Returns a list of filenames (including paths) for all files that are used for persistent storage.
|
inlineinherited |
Delete all files that were stored by the persistent storage.
|
inherited |
The base filename.
|
inherited |
The file name extension.
|
inherited |
Maximum number of used files.
|
protectedinherited |
The path where the files are stored.
|
protectedinherited |
1.8.14