Interface TimedRetryAlgorithm (2.60.0)

publicinterface TimedRetryAlgorithm

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

Methods

createFirstAttempt()

publicabstractTimedAttemptSettingscreateFirstAttempt()
Returns
Type Description
TimedAttemptSettings

createNextAttempt(TimedAttemptSettings prevSettings)

publicabstractTimedAttemptSettingscreateNextAttempt(TimedAttemptSettingsprevSettings)

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)

publicabstractbooleanshouldRetry(TimedAttemptSettingsnextAttemptSettings)

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

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.