Interface AsyncRetryStrategy<OUT>
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy,AsyncRetryStrategies.FixedDelayRetryStrategy
Interface encapsulates an asynchronous retry strategy.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanRetry(int currentAttempts) longgetBackoffTimeMillis(int currentAttempts)
-
Method Details
-
canRetry
boolean canRetry(int currentAttempts) - Returns:
- whether the next attempt can happen
-
getBackoffTimeMillis
long getBackoffTimeMillis(int currentAttempts) - Returns:
- the delay time of next attempt
-
getRetryPredicate
AsyncRetryPredicate<OUT> getRetryPredicate()- Returns:
- the defined retry predicate
AsyncRetryPredicate
-