Interface AsyncRetryStrategy<OUT>

All Superinterfaces:
Serializable
All Known Implementing Classes:
AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy, AsyncRetryStrategies.FixedDelayRetryStrategy

@PublicEvolving public interface AsyncRetryStrategy<OUT> extends Serializable
Interface encapsulates an asynchronous retry strategy.
  • 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