@BetaApi public class RetryOption extends Object implements Serializable
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.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
static RetryOption |
initialRetryDelay(org.threeten.bp.Duration initialRetryDelay)
|
static RetryOption |
jittered(boolean jittered)
See
RetrySettings.isJittered() ()}. |
static RetryOption |
maxAttempts(int maxAttempts)
|
static RetryOption |
maxRetryDelay(org.threeten.bp.Duration maxRetryDelay)
|
static RetrySettings |
mergeToSettings(RetrySettings settings,
RetryOption... options)
Creates a new
RetrySettings instance, merging provided settings and multiple RetryOptions , each of which represents a single property in RetrySettings . |
static RetryOption |
retryDelayMultiplier(double retryDelayMultiplier)
|
static RetryOption |
totalTimeout(org.threeten.bp.Duration totalTimeout)
|
public static RetryOption totalTimeout(org.threeten.bp.Duration totalTimeout)
public static RetryOption initialRetryDelay(org.threeten.bp.Duration initialRetryDelay)
public static RetryOption retryDelayMultiplier(double retryDelayMultiplier)
public static RetryOption maxRetryDelay(org.threeten.bp.Duration maxRetryDelay)
public static RetryOption maxAttempts(int maxAttempts)
public static RetryOption jittered(boolean jittered)
RetrySettings.isJittered()
()}.public static RetrySettings mergeToSettings(RetrySettings settings, RetryOption... options)
RetrySettings
instance, merging provided settings and multiple RetryOptions
, each of which represents a single property in RetrySettings
. It is an
alternative way of initializing RetrySettings
instances.settings
- retry settingsoptions
- zero or more RetryRetrySettings
instance, which is a result of merging options
into
settings
, i.e. each element in options
, if present, overrides corresponding
property in settings
Copyright © 2019 Google LLC. All rights reserved.