public interface TimedRetryAlgorithm
TimedAttemptSettings.
Future will be
canceled.
TimedAttemptSettings for each subsequent retry attempt.
| Modifier and Type | Method and Description |
|---|---|
TimedAttemptSettings |
createFirstAttempt()
Creates a first attempt
TimedAttemptSettings. |
TimedAttemptSettings |
createNextAttempt(TimedAttemptSettings prevSettings)
Creates a next attempt
TimedAttemptSettings, which defines properties of the next
attempt. |
boolean |
shouldRetry(TimedAttemptSettings nextAttemptSettings)
Returns
true if another attempt should be made, or false otherwise. |
TimedAttemptSettings createFirstAttempt()
TimedAttemptSettings.TimedAttemptSettings createNextAttempt(TimedAttemptSettings prevSettings)
TimedAttemptSettings, which defines properties of the next
attempt.prevSettings - previous attempt settingsnull if the implementing algorithm does not provide
specific settings for the next attemptboolean shouldRetry(TimedAttemptSettings nextAttemptSettings) throws CancellationException
true if another attempt should be made, or false otherwise.nextAttemptSettings - attempt settings, which will be used for the next attempt, if
acceptedCancellationException - if the retrying process should be canceled