Interface RetryPolicy<S>

All Known Implementing Classes:
RetryPolicy.DelegatingRetryPolicy, RetryPolicy.SimpleRetryPolicy, RetryPolicy.StatelessRetryPolicy

public interface RetryPolicy<S>
  • Method Details

    • createRetryState

      S createRetryState()
    • nextRetryTimestamp

      long nextRetryTimestamp(long now, Exception lastError, S retryState)
    • noRetry

      static RetryPolicy<Void> noRetry()
    • immediateRetry

      static RetryPolicy<Void> immediateRetry()
    • fixedDelay

      static RetryPolicy<Void> fixedDelay(Duration delay)
    • fixedDelay

      static RetryPolicy<Void> fixedDelay(long delay)
    • exponentialBackoff

      static RetryPolicy<?> exponentialBackoff(Duration initialDelay, Duration maxDelay, double exponent)
    • exponentialBackoff

      static RetryPolicy<?> exponentialBackoff(long initialDelay, long maxDelay, double exponent)
    • exponentialBackoff

      static RetryPolicy<?> exponentialBackoff(Duration initialDelay, Duration maxDelay)
    • exponentialBackoff

      static RetryPolicy<?> exponentialBackoff(long initialDelay, long maxDelay)
    • withMaxTotalRetryCount

      default RetryPolicy<io.activej.common.tuple.Tuple2<io.activej.common.ref.RefInt,S>> withMaxTotalRetryCount(int maxRetryCount)
    • withMaxTotalRetryTimeout

      default RetryPolicy<?> withMaxTotalRetryTimeout(Duration maxRetryTimeout)