Interface BackoffStrategy
-
- All Known Implementing Classes:
EqualJitterBackoffStrategy,FixedDelayBackoffStrategy,FullJitterBackoffStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @Deprecated public interface BackoffStrategy
Deprecated.Use insteadBackoffStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static intRETRIES_ATTEMPTED_CEILINGDeprecated.Max permitted retry times.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default intcalculateExponentialDelay(int retriesAttempted, Duration baseDelay, Duration maxBackoffTime)Deprecated.DurationcomputeDelayBeforeNextRetry(RetryPolicyContext context)Deprecated.Compute the delay before the next retry request.static BackoffStrategydefaultStrategy()Deprecated.static BackoffStrategydefaultStrategy(RetryMode retryMode)Deprecated.static BackoffStrategydefaultThrottlingStrategy()Deprecated.static BackoffStrategydefaultThrottlingStrategy(RetryMode retryMode)Deprecated.static BackoffStrategynone()Deprecated.
-
-
-
Method Detail
-
computeDelayBeforeNextRetry
Duration computeDelayBeforeNextRetry(RetryPolicyContext context)
Deprecated.Compute the delay before the next retry request. This strategy is only consulted when there will be a next retry.- Parameters:
context- Context about the state of the last request and information about the number of requests made.- Returns:
- Amount of time in milliseconds to wait before the next attempt. Must be non-negative (can be zero).
-
calculateExponentialDelay
default int calculateExponentialDelay(int retriesAttempted, Duration baseDelay, Duration maxBackoffTime)Deprecated.
-
defaultStrategy
static BackoffStrategy defaultStrategy()
Deprecated.
-
defaultStrategy
static BackoffStrategy defaultStrategy(RetryMode retryMode)
Deprecated.
-
defaultThrottlingStrategy
static BackoffStrategy defaultThrottlingStrategy()
Deprecated.
-
defaultThrottlingStrategy
static BackoffStrategy defaultThrottlingStrategy(RetryMode retryMode)
Deprecated.
-
none
static BackoffStrategy none()
Deprecated.
-
-