Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etlng::LedgerPublisherInterface Struct Referenceabstract

The interface of a scheduler for the extraction process. More...

#include <LedgerPublisherInterface.hpp>

Inheritance diagram for etlng::LedgerPublisherInterface:

Public Member Functions

virtual bool publish (uint32_t seq, std::optional< uint32_t > maxAttempts, std::chrono::steady_clock::duration attemptsDelay=std::chrono::seconds{1})=0
 Publish the ledger by its sequence number.
 
virtual std::chrono::time_point< std::chrono::system_clock > getLastPublish () const =0
 Get last publish time as a time point.
 
virtual std::uint32_t lastCloseAgeSeconds () const =0
 Get time passed since last ledger close, in seconds.
 
virtual std::uint32_t lastPublishAgeSeconds () const =0
 Get time passed since last publish, in seconds.
 

Detailed Description

The interface of a scheduler for the extraction process.

Member Function Documentation

◆ getLastPublish()

virtual std::chrono::time_point< std::chrono::system_clock > etlng::LedgerPublisherInterface::getLastPublish ( ) const
pure virtual

Get last publish time as a time point.

Returns
A std::chrono::time_point representing the time of the last publish

Implemented in etl::impl::LedgerPublisher, and etlng::impl::LedgerPublisher.

◆ lastCloseAgeSeconds()

virtual std::uint32_t etlng::LedgerPublisherInterface::lastCloseAgeSeconds ( ) const
pure virtual

Get time passed since last ledger close, in seconds.

Returns
The number of seconds since the last ledger close as std::uint32_t

Implemented in etl::impl::LedgerPublisher, and etlng::impl::LedgerPublisher.

◆ lastPublishAgeSeconds()

virtual std::uint32_t etlng::LedgerPublisherInterface::lastPublishAgeSeconds ( ) const
pure virtual

Get time passed since last publish, in seconds.

Returns
The number of seconds since the last publish as std::uint32_t

Implemented in etl::impl::LedgerPublisher, and etlng::impl::LedgerPublisher.

◆ publish()

virtual bool etlng::LedgerPublisherInterface::publish ( uint32_t seq,
std::optional< uint32_t > maxAttempts,
std::chrono::steady_clock::duration attemptsDelay = std::chrono::seconds{1} )
pure virtual

Publish the ledger by its sequence number.

Parameters
seqThe sequence number of the ledger
maxAttemptsThe maximum number of attempts to publish the ledger; no limit if nullopt
attemptsDelayThe delay between attempts
Returns
Whether the ledger was found in the database and published

Implemented in etl::impl::LedgerPublisher, and etlng::impl::LedgerPublisher.


The documentation for this struct was generated from the following file: