Initializes a new instance of the ExponentialJitterBackoff class.
The base delay in milliseconds. This will be the average delay for the first retry attempt. Defaults to 250ms.
The maximum delay in milliseconds. This will be the maximum delay for the last retry attempt. Defaults to 15000ms.
The callback to use for generating a random number between 0 and 1. Used by test only.
Returns a pseudorandom number between 0 and 1.
Calculates the delay in milliseconds for the next retry attempt. Uses "exponential backoff with full jitter" algorithm.
The number of retry attempts made so far (i.e. 0 is the first retry attempt)
The delay in milliseconds for the next retry attempt.
Calculates the delay in milliseconds for the next retry attempt. Uses "exponential backoff with full jitter" algorithm.
See
https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
Param: retryCount
The number of retry attempts made so far.
Returns
The delay in milliseconds for the next retry attempt.