Package com.google.cloud
Class RetryOption
java.lang.Object
com.google.cloud.RetryOption
- All Implemented Interfaces:
Serializable
This class represents an options wrapper around the
RetrySettings class and is an
alternative way of initializing it. The retry options are usually provided in a form of varargs
for methods that wait for changes in the status of a resource, do poll operations or retry on
failures.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()static RetryOptioninitialRetryDelay(org.threeten.bp.Duration initialRetryDelay) This method is obsolete.static RetryOptioninitialRetryDelayDuration(Duration initialRetryDelay) static RetryOptionjittered(boolean jittered) SeeRetrySettings.isJittered()()}.static RetryOptionmaxAttempts(int maxAttempts) static RetryOptionmaxRetryDelay(org.threeten.bp.Duration maxRetryDelay) This method is obsolete.static RetryOptionmaxRetryDelayDuration(Duration maxRetryDelay) static RetrySettingsmergeToSettings(RetrySettings settings, RetryOption... options) Creates a newRetrySettingsinstance, merging provided settings and multipleRetryOptions, each of which represents a single property inRetrySettings.static RetryOptionretryDelayMultiplier(double retryDelayMultiplier) static RetryOptiontotalTimeout(org.threeten.bp.Duration totalTimeout) This method is obsolete.static RetryOptiontotalTimeoutDuration(Duration totalTimeout)
-
Method Details
-
totalTimeout
@ObsoleteApi("Use totalTimeouDuration() instead") public static RetryOption totalTimeout(org.threeten.bp.Duration totalTimeout) This method is obsolete. UsetotalTimeoutDuration(java.time.Duration)instead -
totalTimeoutDuration
-
initialRetryDelay
@ObsoleteApi("Use initialRetryDelayDuration() instead") public static RetryOption initialRetryDelay(org.threeten.bp.Duration initialRetryDelay) This method is obsolete. UseinitialRetryDelayDuration(java.time.Duration)instead -
initialRetryDelayDuration
-
retryDelayMultiplier
-
maxRetryDelay
@ObsoleteApi("Use maxRetryDelayDuration() instead") public static RetryOption maxRetryDelay(org.threeten.bp.Duration maxRetryDelay) This method is obsolete. UsemaxRetryDelayDuration(java.time.Duration)instead -
maxRetryDelayDuration
-
maxAttempts
-
jittered
SeeRetrySettings.isJittered()()}. -
equals
-
hashCode
public int hashCode() -
mergeToSettings
Creates a newRetrySettingsinstance, merging provided settings and multipleRetryOptions, each of which represents a single property inRetrySettings. It is an alternative way of initializingRetrySettingsinstances.- Parameters:
settings- retry settingsoptions- zero or more Retry- Returns:
- new
RetrySettingsinstance, which is a result of mergingoptionsintosettings, i.e. each element inoptions, if present, overrides corresponding property insettings
-