Package com.google.cloud
Class RetryOption
- java.lang.Object
-
- com.google.cloud.RetryOption
-
- All Implemented Interfaces:
Serializable
@BetaApi public class RetryOption extends Object implements Serializable
This class represents an options wrapper around theRetrySettings
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
int
hashCode()
static RetryOption
initialRetryDelay(org.threeten.bp.Duration initialRetryDelay)
SeeRetrySettings.getInitialRetryDelay()
.static RetryOption
jittered(boolean jittered)
SeeRetrySettings.isJittered()
()}.static RetryOption
maxAttempts(int maxAttempts)
SeeRetrySettings.getMaxAttempts()
.static RetryOption
maxRetryDelay(org.threeten.bp.Duration maxRetryDelay)
SeeRetrySettings.getMaxRetryDelay()
.static com.google.api.gax.retrying.RetrySettings
mergeToSettings(com.google.api.gax.retrying.RetrySettings settings, RetryOption... options)
Creates a newRetrySettings
instance, merging provided settings and multipleRetryOptions
, each of which represents a single property inRetrySettings
.static RetryOption
retryDelayMultiplier(double retryDelayMultiplier)
SeeRetrySettings.getRetryDelayMultiplier()
.static RetryOption
totalTimeout(org.threeten.bp.Duration totalTimeout)
SeeRetrySettings.getTotalTimeout()
.
-
-
-
Method Detail
-
totalTimeout
public static RetryOption totalTimeout(org.threeten.bp.Duration totalTimeout)
SeeRetrySettings.getTotalTimeout()
.
-
initialRetryDelay
public static RetryOption initialRetryDelay(org.threeten.bp.Duration initialRetryDelay)
SeeRetrySettings.getInitialRetryDelay()
.
-
retryDelayMultiplier
public static RetryOption retryDelayMultiplier(double retryDelayMultiplier)
SeeRetrySettings.getRetryDelayMultiplier()
.
-
maxRetryDelay
public static RetryOption maxRetryDelay(org.threeten.bp.Duration maxRetryDelay)
SeeRetrySettings.getMaxRetryDelay()
.
-
maxAttempts
public static RetryOption maxAttempts(int maxAttempts)
SeeRetrySettings.getMaxAttempts()
.
-
jittered
public static RetryOption jittered(boolean jittered)
SeeRetrySettings.isJittered()
()}.
-
mergeToSettings
public static com.google.api.gax.retrying.RetrySettings mergeToSettings(com.google.api.gax.retrying.RetrySettings settings, RetryOption... options)
Creates a newRetrySettings
instance, merging provided settings and multipleRetryOptions
, each of which represents a single property inRetrySettings
. It is an alternative way of initializingRetrySettings
instances.- Parameters:
settings
- retry settingsoptions
- zero or more Retry- Returns:
- new
RetrySettings
instance, which is a result of mergingoptions
intosettings
, i.e. each element inoptions
, if present, overrides corresponding property insettings
-
-