3#include "data/LedgerCacheInterface.hpp"
4#include "util/config/ConfigDefinition.hpp"
22 { a.save() } -> std::same_as<void>;
23 { a.waitToFinish() } -> std::same_as<void>;
34 std::optional<std::string> cacheFilePath_;
35 std::reference_wrapper<LedgerCacheInterface const> cache_;
36 std::optional<std::thread> savingThread_;
Cache for an entire ledger.
Definition LedgerCacheInterface.hpp:21
~LedgerCacheSaver()
Destructor that ensures the saving thread is properly joined.
Definition LedgerCacheSaver.cpp:23
LedgerCacheSaver(util::config::ClioConfigDefinition const &config, LedgerCacheInterface const &cache)
Constructs a LedgerCacheSaver instance.
Definition LedgerCacheSaver.cpp:13
void waitToFinish()
Waits for the saving thread to complete.
Definition LedgerCacheSaver.cpp:54
void save()
Initiates an asynchronous save operation of the ledger cache.
Definition LedgerCacheSaver.cpp:29
All the config data will be stored and extracted from this class.
Definition ConfigDefinition.hpp:31
A concept for a class that can save ledger cache asynchronously.
Definition LedgerCacheSaver.hpp:21
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56