3 #include "exporters/JournalQueuingStrategy.h"
52 void setup()
override;
70 std::vector<SensorData> &data)
const;
97 const std::string &broken,
98 Poco::Timestamp &newest);
107 std::list<Poco::File> &recoverable,
108 const Poco::Timestamp &indexModified,
109 const Poco::Timestamp &newest);
112 bool m_disableTmpDataRecovery;
113 bool m_disableBrokenRecovery;
114 bool m_disableLostRecovery;
void setDisableTmpDataRecovery(bool disable)
Disable running recovery of the data.tmp file.
Definition: RecoverableJournalQueuingStrategy.cpp:41
RecoverableJournalQueuingStrategy works the same way as the JournalQueuingStrategy but it extends its...
Definition: RecoverableJournalQueuingStrategy.h:30
size_t recoverEntries(Poco::File file, std::vector< SensorData > &data) const
Read the given file and parse its contents like it is a buffer. In this way, we read as much of entri...
Definition: RecoverableJournalQueuingStrategy.cpp:109
void recoverLost(std::list< Poco::File > &recoverable, const Poco::Timestamp &indexModified, const Poco::Timestamp &newest)
From a list of potentially recoverable buffers, recover those that has newer timestamps than the newe...
Definition: RecoverableJournalQueuingStrategy.cpp:290
void recoverBroken(const std::string &broken, Poco::Timestamp &newest)
Definition: RecoverableJournalQueuingStrategy.cpp:257
void setDisableLostRecovery(bool disable)
Disable running recovery of lost buffers - ie. buffers that were not appended to index but contain re...
Definition: RecoverableJournalQueuingStrategy.cpp:51
void recoverTmpData(Poco::Timestamp &newest)
Recover the data.tmp file if present and append it to the index.
Definition: RecoverableJournalQueuingStrategy.cpp:223
std::string recoverBrokenBuffer(Poco::File file) const
Recover contents of the given file into a new file that has a valid digest. Empty files are deleted...
Definition: RecoverableJournalQueuingStrategy.cpp:146
JournalQueuingStrategy implements persistent temporary storing of SensorData into a filesystem struct...
Definition: JournalQueuingStrategy.h:40
std::string recoverBuffer(Poco::File tmpFile) const
Recover the given file as it should be a buffer. This method is useful to recover file that are not n...
Definition: RecoverableJournalQueuingStrategy.cpp:194
void setup() override
Setup the storage for the JournalQueuingStrategy. It creates new index or loads the existing one...
Definition: RecoverableJournalQueuingStrategy.cpp:56
void collectRecoverable(std::list< Poco::File > &files) const
Collect files looking like buffers that are not referenced and thus are potentially recoverable for s...
Definition: RecoverableJournalQueuingStrategy.cpp:90
void setDisableBrokenRecovery(bool disable)
Disable running recovery of broken buffers referenced from index. Such buffers are ignored (and poten...
Definition: RecoverableJournalQueuingStrategy.cpp:46