Package io.activej.promise
Interface RetryPolicy<S>
-
- All Known Implementing Classes:
RetryPolicy.DelegatingRetryPolicy,RetryPolicy.SimpleRetryPolicy,RetryPolicy.StatelessRetryPolicy
public interface RetryPolicy<S>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRetryPolicy.DelegatingRetryPolicy<S,DS>static classRetryPolicy.SimpleRetryPolicystatic classRetryPolicy.SimpleRetryStatestatic classRetryPolicy.StatelessRetryPolicy
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ScreateRetryState()static RetryPolicy<?>exponentialBackoff(long initialDelay, long maxDelay)static RetryPolicy<?>exponentialBackoff(long initialDelay, long maxDelay, double exponent)static RetryPolicy<?>exponentialBackoff(Duration initialDelay, Duration maxDelay)static RetryPolicy<?>exponentialBackoff(Duration initialDelay, Duration maxDelay, double exponent)static RetryPolicy<Void>fixedDelay(long delay)static RetryPolicy<Void>fixedDelay(Duration delay)static RetryPolicy<Void>immediateRetry()longnextRetryTimestamp(long now, Throwable lastError, S retryState)static RetryPolicy<Void>noRetry()default RetryPolicy<io.activej.common.tuple.Tuple2<io.activej.common.ref.RefInt,S>>withMaxTotalRetryCount(int maxRetryCount)default RetryPolicy<?>withMaxTotalRetryTimeout(Duration maxRetryTimeout)
-
-
-
Method Detail
-
createRetryState
S createRetryState()
-
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)
-
-