retryingPolicyCappedJitteredExponentialBackoff overloads
Synopses
Declared in <folly/futures/Retrying.h>
Builds a retry policy that always retries with capped jittered exponential backoff, up to a maximum number of tries.
std::function<Future<bool>(size_t, exception_wrapper const&)>
retryingPolicyCappedJitteredExponentialBackoff(
size_t max_tries,
Duration backoff_min,
Duration backoff_max,
double jitter_param);
Builds a retry policy with capped jittered exponential backoff that also consults an inner policy to decide whether to retry.
template<
class Policy,
class URNG>
std::function<Future<bool>(size_t, exception_wrapper const&)>
retryingPolicyCappedJitteredExponentialBackoff(
size_t max_tries,
Duration backoff_min,
Duration backoff_max,
double jitter_param,
URNG&& rng,
Policy&& p);
Return Value
A policy callable usable with retrying and retryingUnsafe.
Parameters
Name |
Description |
max_tries |
The maximum number of attempts before giving up. |
backoff_min |
The minimum backoff duration between attempts. |
backoff_max |
The maximum backoff duration between attempts. |
jitter_param |
The amount of randomized jitter applied to the backoff. |
rng |
The random number generator used to compute the jitter. |
p |
The inner policy consulted to decide whether to retry. |
Created with MrDocs