22#include "data/BackendInterface.hpp"
24#include "etlng/MonitorInterface.hpp"
25#include "util/async/AnyExecutionContext.hpp"
26#include "util/async/AnyOperation.hpp"
27#include "util/async/AnyStrand.hpp"
28#include "util/log/Logger.hpp"
30#include <boost/signals2/connection.hpp>
31#include <xrpl/protocol/TxFormats.h>
39namespace etlng::impl {
43 std::shared_ptr<BackendInterface> backend_;
44 std::shared_ptr<etl::NetworkValidatedLedgersInterface> validatedLedgers_;
46 uint32_t nextSequence_;
47 std::optional<util::async::AnyOperation<void>> repeatedTask_;
48 std::optional<boost::signals2::scoped_connection> subscription_;
50 SignalType notificationChannel_;
57 std::shared_ptr<BackendInterface> backend,
58 std::shared_ptr<etl::NetworkValidatedLedgersInterface> validatedLedgers,
59 uint32_t startSequence
67 run(std::chrono::steady_clock::duration repeatInterval)
override;
72 boost::signals2::scoped_connection
73 subscribe(SignalType::slot_type
const& subscriber)
override;
77 onNextSequence(uint32_t seq);
An interface for the monitor service An implementation of this service is responsible for periodicall...
Definition MonitorInterface.hpp:36
Definition Monitor.hpp:41
void run(std::chrono::steady_clock::duration repeatInterval) override
Run the monitor service.
Definition Monitor.cpp:68
void stop() override
Stops the monitor service.
Definition Monitor.cpp:78
void notifyLedgerLoaded(uint32_t seq) override
Allows the loading process to notify of a freshly committed ledger.
Definition Monitor.cpp:61
boost::signals2::scoped_connection subscribe(SignalType::slot_type const &subscriber) override
Allows clients to get notified when a new ledger becomes available in Clio's database.
Definition Monitor.cpp:87
A simple thread-safe logger for the channel specified in the constructor.
Definition Logger.hpp:111
A type-erased execution context.
Definition AnyExecutionContext.hpp:41
A type-erased execution context.
Definition AnyStrand.hpp:40