- All Implemented Interfaces:
- Enclosing interface:
A retry policy that increases the delay time following an exponential sequence. Allowed elements that are also annotated with
@Retry. Expected sequence in case factor is 2: initial delay, 2 * initial delay + jitter, 4 * initial delay + jitter, 8 * initial delay + jitter, etc.
maxDelayis used to prevent endless waiting.
builderpublic static Retry.ExponentialRetryPolicy.Builder builder()
- a new builder
nextDelayMillisDescription copied from interface:
Retry.RetryPolicyReturn next delay in milliseconds, or an empty optional to finish retries.
- Specified by:
firstCallMillis- milliseconds recorded before the first call using
lastDelay- last delay that was used (0 for the first failed call)
call- call index (0 for the first failed call)
- how long to wait before trying again, or empty to notify this is the end of retries