Interface BackoffStrategy
- All Known Implementing Classes:
- EqualJitterBackoffStrategy,- FixedDelayBackoffStrategy,- FullJitterBackoffStrategy,- NonLegacyToLegacyAdapter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Deprecated.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intDeprecated.Max permitted retry times.
- 
Method SummaryModifier and TypeMethodDescriptiondefault intcalculateExponentialDelay(int retriesAttempted, Duration baseDelay, Duration maxBackoffTime) Deprecated.Deprecated.Compute the delay before the next retry request.static BackoffStrategyDeprecated.static BackoffStrategydefaultStrategy(RetryMode retryMode) Deprecated.static BackoffStrategyDeprecated.static BackoffStrategydefaultThrottlingStrategy(RetryMode retryMode) Deprecated.static BackoffStrategynone()Deprecated.
- 
Field Details- 
RETRIES_ATTEMPTED_CEILINGstatic final int RETRIES_ATTEMPTED_CEILINGDeprecated.Max permitted retry times. To prevent exponentialDelay from overflow, there must be 2 ^ retriesAttempted <= 2 ^ 31 - 1, which means retriesAttempted <= 30, so that is the ceil for retriesAttempted.
 
- 
- 
Method Details- 
computeDelayBeforeNextRetryDeprecated.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
- 
defaultStrategyDeprecated.
- 
defaultStrategyDeprecated.
- 
defaultThrottlingStrategyDeprecated.
- 
defaultThrottlingStrategyDeprecated.
- 
noneDeprecated.
 
- 
BackoffStrategy