newExponentialBackoff function
Creates a BackoffFactory with backoff of the form base^x + offset where x is the attempt number jitter is the function for adding randomness around the backoff timeUnits are the units of time the base^x is evaluated in
Implementation
BackoffFactory newExponentialBackoff(
Duration min,
Duration max,
Jitter jitter,
Duration timeUnits,
double base,
Duration offset,
Random rng) {
return () => ExponentialBackoff(
AttemptBackoff(min, max, jitter, rng),
timeUnits,
base,
offset,
);
}