Interface TimedRetryAlgorithm (2.48.0)

public interface TimedRetryAlgorithm

Same as TimedRetryAlgorithmWithContext, but without methods that accept a RetryingContext. Use TimedRetryAlgorithmWithContext instead of this interface when possible.

Methods

createFirstAttempt()

public abstract TimedAttemptSettings createFirstAttempt()
Returns
Type Description
TimedAttemptSettings

createNextAttempt(TimedAttemptSettings prevSettings)

public abstract TimedAttemptSettings createNextAttempt(TimedAttemptSettings prevSettings)

Same as TimedRetryAlgorithmWithContext#createNextAttempt(RetryingContext, TimedAttemptSettings), but without a RetryingContext.

Use TimedRetryAlgorithmWithContext#createNextAttempt(RetryingContext, TimedAttemptSettings) instead of this method when possible.

Parameter
Name Description
prevSettings TimedAttemptSettings
Returns
Type Description
TimedAttemptSettings

shouldRetry(TimedAttemptSettings nextAttemptSettings)

public abstract boolean shouldRetry(TimedAttemptSettings nextAttemptSettings)

Same as TimedRetryAlgorithmWithContext#shouldRetry(RetryingContext, TimedAttemptSettings), but without a RetryingContext.

Use TimedRetryAlgorithmWithContext#shouldRetry(RetryingContext, TimedAttemptSettings) instead of this method when possible.

Parameter
Name Description
nextAttemptSettings TimedAttemptSettings
Returns
Type Description
boolean
Exceptions
Type Description
CancellationException