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>
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).
◆ StripedStorageXML() [1/3]
◆ StripedStorageXML() [2/3]
◆ StripedStorageXML() [3/3]
◆ store()
Stores the given data in one of the files adding a timestamp and returns the filename of the written file.
◆ retrieve()
std::pair<T, Time> retrieve |
( |
bool(*)(const T &) |
validCheckFunc = NULL | ) |
const |
|
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.
- Parameters
-
validCheckFunc | optional function for checking if restored data is valid |
- Returns
- A pair of data and timestamp
◆ setFilePath()
void setFilePath |
( |
const Path & |
path | ) |
|
|
inlineinherited |
Resolves path and assigns to filePath.
◆ getFilePath()
const Path& getFilePath |
( |
| ) |
|
|
inlineinherited |
◆ generateFilename()
Path generateFilename |
( |
uint32 |
fileNr | ) |
const |
|
inlineinherited |
Returns the filename (including path) of the file with the specified nr.
◆ getFiles()
std::list<Path> getFiles |
( |
| ) |
const |
|
inlineinherited |
Returns a list of filenames (including paths) for all files that are used for persistent storage.
◆ deleteAllFiles()
Delete all files that were stored by the persistent storage.
◆ fileNameBase
◆ extension
◆ maxFiles
Maximum number of used files.
◆ filePath
The path where the files are stored.
◆ mCurrentFileIdx
The documentation for this class was generated from the following file: