Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etlng::impl::Monitor Class Reference
Inheritance diagram for etlng::impl::Monitor:
Collaboration diagram for etlng::impl::Monitor:

Public Member Functions

 Monitor (util::async::AnyExecutionContext ctx, std::shared_ptr< BackendInterface > backend, std::shared_ptr< etl::NetworkValidatedLedgersInterface > validatedLedgers, uint32_t startSequence)
 
void run (std::chrono::steady_clock::duration repeatInterval) override
 Run the monitor service.
 
void stop () override
 Stops the monitor service.
 
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.
 
- Public Member Functions inherited from etlng::MonitorInterface

Additional Inherited Members

- Public Types inherited from etlng::MonitorInterface
using SignalType = boost::signals2::signal<void(uint32_t)>
 
- Static Public Attributes inherited from etlng::MonitorInterface
static constexpr auto kDEFAULT_REPEAT_INTERVAL = std::chrono::seconds{1}
 

Member Function Documentation

◆ run()

void etlng::impl::Monitor::run ( std::chrono::steady_clock::duration repeatInterval)
overridevirtual

Run the monitor service.

Parameters
repeatIntervalThe interval between attempts to check the database for new ledgers

Implements etlng::MonitorInterface.

◆ stop()

void etlng::impl::Monitor::stop ( )
overridevirtual

Stops the monitor service.

Implements etlng::MonitorInterface.

◆ subscribe()

boost::signals2::scoped_connection etlng::impl::Monitor::subscribe ( SignalType::slot_type const & subscriber)
overridevirtual

Allows clients to get notified when a new ledger becomes available in Clio's database.

Parameters
subscriberThe slot to connect
Returns
A connection object that automatically disconnects the subscription once destroyed

Implements etlng::MonitorInterface.


The documentation for this class was generated from the following files: