aboutsummaryrefslogtreecommitdiff
path: root/oop2eindopdr/CacheManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'oop2eindopdr/CacheManager.h')
-rw-r--r--oop2eindopdr/CacheManager.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/oop2eindopdr/CacheManager.h b/oop2eindopdr/CacheManager.h
index 0b15cfa..1e0a565 100644
--- a/oop2eindopdr/CacheManager.h
+++ b/oop2eindopdr/CacheManager.h
@@ -2,6 +2,8 @@
#include <string>
#include <vector>
+#include <chrono>
+#include <functional>
/** @brief cache storage manager */
class CacheManager {
@@ -10,6 +12,10 @@ private:
std::string cache_path;
/** @brief pointers to open file handles */
std::vector<std::fstream*> files;
+
+ const unsigned int max_tries = 100;
+
+ virtual void retry(std::string label, std::function<void()> action, std::function<bool()> retry_if);
public:
/** @brief initialize CacheManager class at `cache_path` */
CacheManager(const char* cache_path);