Class RetryOption (2.12.0)

public class RetryOption implements 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.

Inheritance

Object > RetryOption

Implements

Serializable

Static Methods

initialRetryDelay(Duration initialRetryDelay)

public static RetryOption initialRetryDelay(Duration initialRetryDelay)
Parameter
NameDescription
initialRetryDelayorg.threeten.bp.Duration
Returns
TypeDescription
RetryOption

jittered(boolean jittered)

public static RetryOption jittered(boolean jittered)
Parameter
NameDescription
jitteredboolean
Returns
TypeDescription
RetryOption

maxAttempts(int maxAttempts)

public static RetryOption maxAttempts(int maxAttempts)
Parameter
NameDescription
maxAttemptsint
Returns
TypeDescription
RetryOption

maxRetryDelay(Duration maxRetryDelay)

public static RetryOption maxRetryDelay(Duration maxRetryDelay)
Parameter
NameDescription
maxRetryDelayorg.threeten.bp.Duration
Returns
TypeDescription
RetryOption

mergeToSettings(RetrySettings settings, RetryOption[] options)

public 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. It is an alternative way of initializing RetrySettings instances.

Parameters
NameDescription
settingsRetrySettings

retry settings

optionsRetryOption[]

zero or more Retry

Returns
TypeDescription
RetrySettings

new RetrySettings instance, which is a result of merging options into settings, i.e. each element in options, if present, overrides corresponding property in settings

retryDelayMultiplier(double retryDelayMultiplier)

public static RetryOption retryDelayMultiplier(double retryDelayMultiplier)
Parameter
NameDescription
retryDelayMultiplierdouble
Returns
TypeDescription
RetryOption

totalTimeout(Duration totalTimeout)

public static RetryOption totalTimeout(Duration totalTimeout)
Parameter
NameDescription
totalTimeoutorg.threeten.bp.Duration
Returns
TypeDescription
RetryOption

Methods

equals(Object o)

public boolean equals(Object o)
Parameter
NameDescription
oObject
Returns
TypeDescription
boolean
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides