xrpld
Loading...
Searching...
No Matches
xrpl::InboundLedgers Class Referenceabstract

Manages the lifetime of inbound ledgers. More...

#include <InboundLedgers.h>

Inheritance diagram for xrpl::InboundLedgers:

Public Types

using clock_type = beast::AbstractClock<std::chrono::steady_clock>

Public Member Functions

virtual ~InboundLedgers ()=default
virtual std::shared_ptr< Ledger const > acquire (uint256 const &hash, std::uint32_t seq, InboundLedger::Reason)=0
virtual void acquireAsync (uint256 const &hash, std::uint32_t seq, InboundLedger::Reason reason)=0
virtual std::shared_ptr< InboundLedgerfind (LedgerHash const &hash)=0
virtual bool gotLedgerData (LedgerHash const &ledgerHash, std::shared_ptr< Peer >, std::shared_ptr< protocol::TMLedgerData >)=0
virtual void gotStaleData (std::shared_ptr< protocol::TMLedgerData > packet)=0
virtual void logFailure (uint256 const &h, std::uint32_t seq)=0
virtual bool isFailure (uint256 const &h)=0
virtual void clearFailures ()=0
virtual json::Value getInfo ()=0
virtual std::size_t fetchRate ()=0
 Returns the rate of historical ledger fetches per minute.
virtual void onLedgerFetched ()=0
 Called when a complete ledger is obtained.
virtual void gotFetchPack ()=0
virtual void sweep ()=0
virtual void stop ()=0
virtual std::size_t cacheSize ()=0

Detailed Description

Manages the lifetime of inbound ledgers.

See also
InboundLedger

Definition at line 13 of file InboundLedgers.h.

Member Typedef Documentation

◆ clock_type

Constructor & Destructor Documentation

◆ ~InboundLedgers()

virtual xrpl::InboundLedgers::~InboundLedgers ( )
virtualdefault

Member Function Documentation

◆ acquire()

virtual std::shared_ptr< Ledger const > xrpl::InboundLedgers::acquire ( uint256 const & hash,
std::uint32_t seq,
InboundLedger::Reason  )
pure virtual

◆ acquireAsync()

virtual void xrpl::InboundLedgers::acquireAsync ( uint256 const & hash,
std::uint32_t seq,
InboundLedger::Reason reason )
pure virtual

◆ find()

virtual std::shared_ptr< InboundLedger > xrpl::InboundLedgers::find ( LedgerHash const & hash)
pure virtual

◆ gotLedgerData()

virtual bool xrpl::InboundLedgers::gotLedgerData ( LedgerHash const & ledgerHash,
std::shared_ptr< Peer > ,
std::shared_ptr< protocol::TMLedgerData >  )
pure virtual

◆ gotStaleData()

virtual void xrpl::InboundLedgers::gotStaleData ( std::shared_ptr< protocol::TMLedgerData > packet)
pure virtual

◆ logFailure()

virtual void xrpl::InboundLedgers::logFailure ( uint256 const & h,
std::uint32_t seq )
pure virtual

◆ isFailure()

virtual bool xrpl::InboundLedgers::isFailure ( uint256 const & h)
pure virtual

◆ clearFailures()

virtual void xrpl::InboundLedgers::clearFailures ( )
pure virtual

◆ getInfo()

virtual json::Value xrpl::InboundLedgers::getInfo ( )
pure virtual

◆ fetchRate()

virtual std::size_t xrpl::InboundLedgers::fetchRate ( )
pure virtual

Returns the rate of historical ledger fetches per minute.

Implemented in xrpl::InboundLedgersImp, and xrpl::test::MagicInboundLedgers.

◆ onLedgerFetched()

virtual void xrpl::InboundLedgers::onLedgerFetched ( )
pure virtual

Called when a complete ledger is obtained.

Implemented in xrpl::InboundLedgersImp, and xrpl::test::MagicInboundLedgers.

◆ gotFetchPack()

virtual void xrpl::InboundLedgers::gotFetchPack ( )
pure virtual

◆ sweep()

virtual void xrpl::InboundLedgers::sweep ( )
pure virtual

◆ stop()

virtual void xrpl::InboundLedgers::stop ( )
pure virtual

◆ cacheSize()

virtual std::size_t xrpl::InboundLedgers::cacheSize ( )
pure virtual