public final class RetryPolicies extends Object
RetryPolicy.| Modifier and Type | Field | Description |
|---|---|---|
static RetryPolicy |
RETRY_ONLY_ONCE |
Retry Policy to just do one try.
|
| Modifier and Type | Method | Description |
|---|---|---|
static RetryPolicy |
of(int count,
long ms) |
Create a new RetryPolicy.
|
static RetryPolicy |
of(int count,
long value,
TimeUnit unit) |
Create a new RetryPolicy.
|
static RetryPolicy |
of(int count,
Duration duration) |
Create a new RetryPolicy.
|
static RetryPolicy |
of(int count,
IntToLongFunction retryToWaitTime) |
Create a new RetryPolicy.
|
static RetryPolicy |
ofIncremental(int count,
long ms) |
Create a new RetryPolicy, that wait each time more time : first time the
received duration, second time twice, etc.
|
static RetryPolicy |
ofIncremental(int count,
Duration duration) |
Create a new RetryPolicy, that wait each time more time : first time the
received duration, second time twice, etc.
|
public static final RetryPolicy RETRY_ONLY_ONCE
public static RetryPolicy of(int count, long ms)
count - the number of retry.ms - the wait time in ms.public static RetryPolicy of(int count, long value, TimeUnit unit)
count - the number of retry.value - the wait timeunit - the unit of the wait time.public static RetryPolicy of(int count, Duration duration)
count - the number of retry.duration - the duration to wait.public static RetryPolicy of(int count, IntToLongFunction retryToWaitTime)
count - the number of retry.retryToWaitTime - the function to compute the wait time based on the retry.public static RetryPolicy ofIncremental(int count, long ms)
count - the number of retry.ms - the time in ms that will be combined with the retry numberpublic static RetryPolicy ofIncremental(int count, Duration duration)
count - the number of retry.duration - the duration that will be combined with the retry numberCopyright © 2019. All rights reserved.