Interface AsyncRetryStrategy<OUT>
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy
,AsyncRetryStrategies.FixedDelayRetryStrategy
,ResultRetryStrategy
@PublicEvolving public interface AsyncRetryStrategy<OUT> extends Serializable
Interface encapsulates an asynchronous retry strategy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canRetry(int currentAttempts)
long
getBackoffTimeMillis(int currentAttempts)
AsyncRetryPredicate<OUT>
getRetryPredicate()
-
-
-
Method Detail
-
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
-
-