|
| Monitor (util::async::AnyExecutionContext ctx, std::shared_ptr< BackendInterface > backend, std::shared_ptr< etl::NetworkValidatedLedgersInterface > validatedLedgers, uint32_t startSequence, std::chrono::steady_clock::duration dbStalledReportDelay) |
|
void | notifySequenceLoaded (uint32_t seq) override |
| Allows the loading process to notify of a freshly committed ledger.
|
|
void | notifyWriteConflict (uint32_t seq) override |
| Notifies the monitor of a write conflict.
|
|
void | run (std::chrono::steady_clock::duration repeatInterval) override |
| Run the monitor service.
|
|
void | stop () override |
| Stops the monitor service.
|
|
boost::signals2::scoped_connection | subscribeToNewSequence (NewSequenceSignalType::slot_type const &subscriber) override |
| Allows clients to get notified when a new ledger becomes available in Clio's database.
|
|
boost::signals2::scoped_connection | subscribeToDbStalled (DbStalledSignalType::slot_type const &subscriber) override |
| Allows clients to get notified when no database update is detected for a configured period.
|
|
|
using | NewSequenceSignalType = boost::signals2::signal<void(uint32_t)> |
|
using | DbStalledSignalType = boost::signals2::signal<void()> |
|
static constexpr auto | kDEFAULT_REPEAT_INTERVAL = std::chrono::seconds{1} |
|
◆ notifySequenceLoaded()
void etlng::impl::Monitor::notifySequenceLoaded |
( |
uint32_t | seq | ) |
|
|
overridevirtual |
Allows the loading process to notify of a freshly committed ledger.
- Parameters
-
seq | The ledger sequence loaded |
Implements etlng::MonitorInterface.
◆ notifyWriteConflict()
void etlng::impl::Monitor::notifyWriteConflict |
( |
uint32_t | seq | ) |
|
|
overridevirtual |
Notifies the monitor of a write conflict.
- Parameters
-
seq | The sequence number of the ledger that encountered a write conflict |
Implements etlng::MonitorInterface.
◆ run()
void etlng::impl::Monitor::run |
( |
std::chrono::steady_clock::duration | repeatInterval | ) |
|
|
overridevirtual |
Run the monitor service.
- Parameters
-
repeatInterval | The interval between attempts to check the database for new ledgers |
Implements etlng::MonitorInterface.
◆ stop()
void etlng::impl::Monitor::stop |
( |
| ) |
|
|
overridevirtual |
◆ subscribeToDbStalled()
boost::signals2::scoped_connection etlng::impl::Monitor::subscribeToDbStalled |
( |
DbStalledSignalType::slot_type const & | subscriber | ) |
|
|
overridevirtual |
Allows clients to get notified when no database update is detected for a configured period.
- Parameters
-
subscriber | The slot to connect |
- Returns
- A connection object that automatically disconnects the subscription once destroyed
Implements etlng::MonitorInterface.
◆ subscribeToNewSequence()
boost::signals2::scoped_connection etlng::impl::Monitor::subscribeToNewSequence |
( |
NewSequenceSignalType::slot_type const & | subscriber | ) |
|
|
overridevirtual |
Allows clients to get notified when a new ledger becomes available in Clio's database.
- Parameters
-
subscriber | The 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:
- /__w/clio/clio/src/etlng/impl/Monitor.hpp
- /__w/clio/clio/src/etlng/impl/Monitor.cpp