public interface RetryState
Retryable operation.| Modifier and Type | Method and Description |
|---|---|
boolean |
canRetry(Throwable exception)
Should a retry attempt occur.
|
default void |
close(Throwable exception)
Closes the
RetryState. |
int |
currentAttempt() |
Duration |
getDelay() |
int |
getMaxAttempts() |
Optional<Duration> |
getMaxDelay() |
OptionalDouble |
getMultiplier() |
Duration |
getOverallDelay() |
default void |
open()
Opens the retry state.
|
boolean canRetry(Throwable exception)
exception - The errorint getMaxAttempts()
int currentAttempt()
OptionalDouble getMultiplier()
Duration getDelay()
Duration getOverallDelay()
default void open()
default void close(@Nullable Throwable exception)
RetryState.exception - An exception if an error occurred or null if the operation completed as expected