Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
LedgerPublisherInterface.hpp
1#pragma once
2
3#include <chrono>
4#include <cstdint>
5#include <optional>
6
7namespace etl {
8
13 virtual ~LedgerPublisherInterface() = default;
14
23 virtual bool
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 virtual std::chrono::time_point<std::chrono::system_clock>
36 getLastPublish() const = 0;
37
43 virtual std::uint32_t
45
51 virtual std::uint32_t
53};
54
55} // namespace etl
The interface of a scheduler for the extraction process.
Definition LedgerPublisherInterface.hpp:12
virtual std::uint32_t lastPublishAgeSeconds() const =0
Get time passed since last publish, in seconds.
virtual std::uint32_t lastCloseAgeSeconds() const =0
Get time passed since last ledger close, in seconds.
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.