public class PerExecutionDelayRetry extends Object implements RetryStrategy
Constructor and Description |
---|
PerExecutionDelayRetry(int maxRetries,
List<Long> delays)
Initializes with the maximum attempts and the delays to wait after a
failure.
|
Modifier and Type | Method and Description |
---|---|
List<Long> |
getDelays() |
int |
getMaxRetries() |
int |
getRemainingRetries() |
Instant |
nextDate(Instant executionStartTime,
Instant executionFailureTime)
Indicate the next date when the next retry should operate.
|
boolean |
terminated()
Indicate that retries should stop now.
|
public boolean terminated()
RetryStrategy
terminated
in interface RetryStrategy
public Instant nextDate(Instant executionStartTime, Instant executionFailureTime)
RetryStrategy
nextDate
in interface RetryStrategy
executionStartTime
- the date and time when the action has been startedexecutionFailureTime
- the date and time when the action has failedpublic int getRemainingRetries()
public int getMaxRetries()
Copyright © 2021. All rights reserved.