Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
LedgerPublisherInterface.hpp
1
#pragma once
2
3
#include <chrono>
4
#include <cstdint>
5
#include <optional>
6
7
namespace
etl
{
8
12
struct
LedgerPublisherInterface
{
13
virtual
~LedgerPublisherInterface
() =
default
;
14
23
virtual
bool
24
publish
(
25
uint32_t seq,
26
std::optional<uint32_t> maxAttempts,
27
std::chrono::steady_clock::duration attemptsDelay = std::chrono::seconds{1}
28
) = 0;
29
35
[[nodiscard]]
virtual
std::chrono::time_point<std::chrono::system_clock>
36
getLastPublish
()
const
= 0;
37
43
[[nodiscard]]
virtual
std::uint32_t
44
lastCloseAgeSeconds
()
const
= 0;
45
51
[[nodiscard]]
virtual
std::uint32_t
52
lastPublishAgeSeconds
()
const
= 0;
53
60
virtual
void
61
stop
() = 0;
62
};
63
64
}
// namespace etl
etl
This namespace contains everything to do with the ETL and ETL sources.
Definition
AmendmentBlockHandlerInterface.hpp:6
etl::LedgerPublisherInterface
The interface of a scheduler for the extraction process.
Definition
LedgerPublisherInterface.hpp:12
etl::LedgerPublisherInterface::lastPublishAgeSeconds
virtual std::uint32_t lastPublishAgeSeconds() const =0
Get time passed since last publish, in seconds.
etl::LedgerPublisherInterface::stop
virtual void stop()=0
Stop publishing.
etl::LedgerPublisherInterface::lastCloseAgeSeconds
virtual std::uint32_t lastCloseAgeSeconds() const =0
Get time passed since last ledger close, in seconds.
etl::LedgerPublisherInterface::publish
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.
etl::LedgerPublisherInterface::getLastPublish
virtual std::chrono::time_point< std::chrono::system_clock > getLastPublish() const =0
Get last publish time as a time point.
src
etl
LedgerPublisherInterface.hpp
Generated by
1.17.0