3#include "data/LedgerCacheInterface.hpp"
32 [[nodiscard]]
virtual bool
46 [[nodiscard]]
virtual bool
55 [[nodiscard]]
virtual std::unique_ptr<LedgerCacheLoadingStateInterface>
66 std::reference_wrapper<LedgerCacheInterface const> cache_;
67 std::shared_ptr<std::atomic_bool> isLoadingAllowed_ = std::make_shared<std::atomic_bool>(
false);
93 [[nodiscard]] std::unique_ptr<LedgerCacheLoadingStateInterface>
94 clone()
const override;
Cache for an entire ledger.
Definition LedgerCacheInterface.hpp:21
Interface for coordinating cache loading permissions across a cluster.
Definition LedgerCacheLoadingState.hpp:18
virtual void waitForLoadingAllowed() const =0
Block until loading is permitted.
virtual std::unique_ptr< LedgerCacheLoadingStateInterface > clone() const =0
Create a clone that shares the same loading-allowed flag.
virtual bool isCurrentlyLoading() const =0
Check whether the cache is currently being loaded from the backend.
virtual bool isLoadingAllowed() const =0
Check whether loading has been permitted.
virtual void allowLoading()=0
Allow this node to begin loading the cache from the backend.
bool isCurrentlyLoading() const override
Check whether the cache is currently being loaded from the backend.
Definition LedgerCacheLoadingState.cpp:33
std::unique_ptr< LedgerCacheLoadingStateInterface > clone() const override
Create a clone that shares the same loading-allowed flag.
Definition LedgerCacheLoadingState.cpp:39
LedgerCacheLoadingState(LedgerCacheInterface const &cache)
Construct a new LedgerCacheLoadingState.
Definition LedgerCacheLoadingState.cpp:9
void allowLoading() override
Allow this node to begin loading the cache from the backend.
Definition LedgerCacheLoadingState.cpp:14
bool isLoadingAllowed() const override
Check whether loading has been permitted.
Definition LedgerCacheLoadingState.cpp:21
void waitForLoadingAllowed() const override
Block until loading is permitted.
Definition LedgerCacheLoadingState.cpp:27
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56