Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
data::cassandra::impl::ExponentialBackoffRetryPolicy Class Reference

A retry policy that employs exponential backoff. More...

#include <RetryPolicy.hpp>

Public Member Functions

 ExponentialBackoffRetryPolicy (boost::asio::io_context &ioc)
 Create a new retry policy instance with the io_context provided.
 
bool shouldRetry (CassandraError err)
 Computes next retry delay and returns true unconditionally.
 
template<typename Fn >
void retry (Fn &&fn)
 Schedules next retry.
 

Detailed Description

A retry policy that employs exponential backoff.

Member Function Documentation

◆ retry()

template<typename Fn >
void data::cassandra::impl::ExponentialBackoffRetryPolicy::retry ( Fn && fn)
inline

Schedules next retry.

Parameters
fnThe callable to execute

◆ shouldRetry()

bool data::cassandra::impl::ExponentialBackoffRetryPolicy::shouldRetry ( CassandraError err)
inlinenodiscard

Computes next retry delay and returns true unconditionally.

Parameters
errThe cassandra error that triggered the retry

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