newPolynomialBackoff function
Creates a BackoffFactory with backoff of the form c0x^0, c1x^1, ...cn*x^n where x is the attempt number
jitter is the function for adding randomness around the backoff
timeUnits are the units of time the polynomial is evaluated in
polyCoefs is the array of polynomial coefficients from c0, c1, ... cn
Implementation
BackoffFactory newPolynomialBackoff(
Duration min,
Duration max,
Jitter jitter,
Duration timeUnits,
List<double> polyCoefs,
Random rng) {
return () => PolynomialBackoff(
AttemptBackoff(min, max, jitter, rng),
timeUnits,
polyCoefs,
);
}