Class ExponentialDelayWithJitter
java.lang.Object
software.amazon.awssdk.retries.api.internal.backoff.ExponentialDelayWithJitter
- All Implemented Interfaces:
BackoffStrategy
Strategy that waits for a random period of time between 0ms and an exponentially increasing amount of time between each
subsequent attempt of the same call.
Specifically, the first attempt waits 0ms, and each subsequent attempt waits between
0ms and min(maxDelay, baseDelay * (1 << (attempt - 2))).
-
Constructor Summary
ConstructorsConstructorDescriptionExponentialDelayWithJitter(Supplier<Random> randomSupplier, Duration baseDelay, Duration maxDelay) -
Method Summary
Modifier and TypeMethodDescriptioncomputeDelay(int attempt) Compute the amount of time to wait before the provided attempt number is executed.toString()
-
Constructor Details
-
ExponentialDelayWithJitter
-
-
Method Details
-
computeDelay
Description copied from interface:BackoffStrategyCompute the amount of time to wait before the provided attempt number is executed.- Specified by:
computeDelayin interfaceBackoffStrategy- Parameters:
attempt- The attempt to compute the delay for, starting at one.
-
toString
-