rippled
Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
ripple::RPC::ShardVerificationScheduler Class Reference
Collaboration diagram for ripple::RPC::ShardVerificationScheduler:
Collaboration graph
[legend]

Public Types

using retryFunction = std::function< void(boost::system::error_code const &ec)>
 

Public Member Functions

 ShardVerificationScheduler ()=default
 
 ShardVerificationScheduler (std::chrono::seconds retryInterval, std::uint32_t maxAttempts)
 
bool retry (Application &app, bool shouldHaveHash, retryFunction f)
 
void reset ()
 

Private Types

using waitable_timer = boost::asio::basic_waitable_timer< std::chrono::steady_clock >
 

Private Attributes

const std::chrono::seconds retryInterval_ {defaultRetryInterval_}
 
const std::uint32_t maxAttempts_ {defaultmaxAttempts_}
 
std::unique_ptr< waitable_timertimer_
 
std::uint32_t numAttempts_ {0}
 

Static Private Attributes

static constexpr std::chrono::seconds defaultRetryInterval_ {60}
 
static constexpr std::uint32_t defaultmaxAttempts_ {5}
 

Detailed Description

Definition at line 29 of file ShardVerificationScheduler.h.

Member Typedef Documentation

◆ retryFunction

using ripple::RPC::ShardVerificationScheduler::retryFunction = std::function<void(boost::system::error_code const& ec)>

Definition at line 40 of file ShardVerificationScheduler.h.

◆ waitable_timer

using ripple::RPC::ShardVerificationScheduler::waitable_timer = boost::asio::basic_waitable_timer<std::chrono::steady_clock>
private

Definition at line 56 of file ShardVerificationScheduler.h.

Constructor & Destructor Documentation

◆ ShardVerificationScheduler() [1/2]

ripple::RPC::ShardVerificationScheduler::ShardVerificationScheduler ( )
default

◆ ShardVerificationScheduler() [2/2]

ripple::RPC::ShardVerificationScheduler::ShardVerificationScheduler ( std::chrono::seconds  retryInterval,
std::uint32_t  maxAttempts 
)

Definition at line 26 of file ShardVerificationScheduler.cpp.

Member Function Documentation

◆ retry()

bool ripple::RPC::ShardVerificationScheduler::retry ( Application app,
bool  shouldHaveHash,
retryFunction  f 
)

Definition at line 37 of file ShardVerificationScheduler.cpp.

◆ reset()

void ripple::RPC::ShardVerificationScheduler::reset ( )

Definition at line 62 of file ShardVerificationScheduler.cpp.

Member Data Documentation

◆ defaultRetryInterval_

constexpr std::chrono::seconds ripple::RPC::ShardVerificationScheduler::defaultRetryInterval_ {60}
staticconstexprprivate

Definition at line 64 of file ShardVerificationScheduler.h.

◆ defaultmaxAttempts_

constexpr std::uint32_t ripple::RPC::ShardVerificationScheduler::defaultmaxAttempts_ {5}
staticconstexprprivate

Definition at line 66 of file ShardVerificationScheduler.h.

◆ retryInterval_

const std::chrono::seconds ripple::RPC::ShardVerificationScheduler::retryInterval_ {defaultRetryInterval_}
private

Definition at line 70 of file ShardVerificationScheduler.h.

◆ maxAttempts_

const std::uint32_t ripple::RPC::ShardVerificationScheduler::maxAttempts_ {defaultmaxAttempts_}
private

Definition at line 73 of file ShardVerificationScheduler.h.

◆ timer_

std::unique_ptr<waitable_timer> ripple::RPC::ShardVerificationScheduler::timer_
private

Definition at line 75 of file ShardVerificationScheduler.h.

◆ numAttempts_

std::uint32_t ripple::RPC::ShardVerificationScheduler::numAttempts_ {0}
private

Definition at line 78 of file ShardVerificationScheduler.h.