@FunctionalInterface public interface RetryStrategy
Modifier and Type | Method and Description |
---|---|
static RetryStrategy |
failFast()
This strategy indicates no retries should be processed.
|
Optional<java.time.Duration> |
nextRetry(int retryCount)
A wait period until the next retry.
|
static RetryStrategy |
repeat(int numberOfRetries,
java.time.Duration delay)
This strategy retries a certain number of times, with a fixed delay between attempts.
|
Optional<java.time.Duration> nextRetry(int retryCount)
Optional.empty()
indicates no retry should be processed, and action should be failed.retryCount
- the number of retries that have already been been processed.static RetryStrategy failFast()
static RetryStrategy repeat(int numberOfRetries, java.time.Duration delay)
numberOfRetries
- the number of retriesdelay
- the delayCopyright © 2019. All rights reserved.