Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
CacheLoaderDecider.hpp
1
#pragma once
2
3
#include "cluster/Backend.hpp"
4
#include "cluster/ClioNode.hpp"
5
#include "data/LedgerCacheLoadingState.hpp"
6
7
#include <boost/asio/thread_pool.hpp>
8
9
#include <memory>
10
11
namespace
cluster
{
12
25
class
CacheLoaderDecider
{
29
boost::asio::thread_pool& ctx_;
30
34
std::unique_ptr<data::LedgerCacheLoadingStateInterface> cacheLoadingState_;
35
36
public
:
43
CacheLoaderDecider
(
44
boost::asio::thread_pool& ctx,
45
std::unique_ptr<data::LedgerCacheLoadingStateInterface> cacheLoadingState
46
);
47
61
void
62
onNewState
(
ClioNode::CUuid
selfId, std::shared_ptr<Backend::ClusterData const> clusterData);
63
};
64
65
}
// namespace cluster
cluster::CacheLoaderDecider::onNewState
void onNewState(ClioNode::CUuid selfId, std::shared_ptr< Backend::ClusterData const > clusterData)
Handles cluster state changes and decides whether this node should load the cache.
Definition
CacheLoaderDecider.cpp:28
cluster::CacheLoaderDecider::CacheLoaderDecider
CacheLoaderDecider(boost::asio::thread_pool &ctx, std::unique_ptr< data::LedgerCacheLoadingStateInterface > cacheLoadingState)
Constructs a CacheLoaderDecider.
Definition
CacheLoaderDecider.cpp:19
cluster
This namespace implements cluster coordination between Clio nodes.
Definition
Backend.cpp:24
cluster::ClioNode::CUuid
std::shared_ptr< boost::uuids::uuid const > CUuid
Shared read-only node UUID.
Definition
ClioNode.hpp:50
src
cluster
CacheLoaderDecider.hpp
Generated by
1.17.0