public interface RetryPolicy
Modifier and Type | Method and Description |
---|---|
static RetryPolicy |
attempts(int attempts,
long backoff)
Retry policy with configurable number of attempts.
|
static RetryPolicy |
attemptsAndDuration(int attempts,
long duration,
long backoff)
Retry policy with configurable number of retries and limited total duration of the encompassing task.
|
static RetryPolicy |
duration(long duration,
long backoff)
Retry policy with limited total duration of the encompassing task (including unlimited retries).
|
BackoffPolicy |
getBackoffPolicy() |
java.util.function.Function<java.lang.Throwable,ErrorClassification> |
getErrorClassifier() |
java.lang.String |
getName() |
TerminationPolicy |
getTerminationPolicy() |
java.lang.String getName()
TerminationPolicy getTerminationPolicy()
BackoffPolicy getBackoffPolicy()
java.util.function.Function<java.lang.Throwable,ErrorClassification> getErrorClassifier()
static RetryPolicy attempts(int attempts, long backoff)
attempts
- Total number of attempts (the number of retries will be that minus 1).backoff
- The constant delay (in milliseconds) between retry attempts.static RetryPolicy duration(long duration, long backoff)
duration
- Total duration of the task. This includes both the original request and all potential retries.backoff
- The constant delay (in milliseconds) between retry attempts.static RetryPolicy attemptsAndDuration(int attempts, long duration, long backoff)
attempts
- Total number of attempts (the number of retries will be that minus 1).duration
- Total duration of the task. This includes both the original request and all potential retries.backoff
- The constant delay (in milliseconds) between retry attempts.