@FunctionalInterface public interface RetryPolicy
Modifier and Type | Method and Description |
---|---|
static RetryPolicy |
constantDelay(long delay)
Create a constant delay retry policy.
|
long |
delay(Throwable failure,
int retryCount)
Compute a delay in milliseconds before retry is executed.
|
static RetryPolicy |
exponentialDelayWithJitter(long initialDelay,
long maxDelay)
Create an exponential delay with jitter retry policy.
|
static RetryPolicy |
linearDelay(long initialDelay,
long maxDelay)
Create a linear delay retry policy.
|
static RetryPolicy constantDelay(long delay)
delay
- the constant delay in millisecondsstatic RetryPolicy linearDelay(long initialDelay, long maxDelay)
initialDelay
- the initial delay in millisecondsmaxDelay
- maximum delay in millisecondsstatic RetryPolicy exponentialDelayWithJitter(long initialDelay, long maxDelay)
Based on Full Jitter in Exponential Backoff And Jitter.
initialDelay
- the initial delay in millisecondsmaxDelay
- maximum delay in millisecondslong delay(Throwable failure, int retryCount)
failure
- the failure passed to the operation Promise
retryCount
- the number of times operation has been retried alreadyCopyright © 2024 Eclipse. All rights reserved.