Class TimedAttemptSettings.Builder (2.19.2)

public abstract static class TimedAttemptSettings.Builder

Inheritance

java.lang.Object > TimedAttemptSettings.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract TimedAttemptSettings build()
Returns
TypeDescription
TimedAttemptSettings

setAttemptCount(int value)

public abstract TimedAttemptSettings.Builder setAttemptCount(int value)

Set the attempt count. It is a zero-based value (first attempt will have this value set to 0).

Parameter
NameDescription
valueint
Returns
TypeDescription
TimedAttemptSettings.Builder

setFirstAttemptStartTimeNanos(long value)

public abstract TimedAttemptSettings.Builder setFirstAttemptStartTimeNanos(long value)

Set the start time of the first attempt. Note that this value is dependent on the actual ApiClock used during the process.

Parameter
NameDescription
valuelong
Returns
TypeDescription
TimedAttemptSettings.Builder

setGlobalSettings(RetrySettings value)

public abstract TimedAttemptSettings.Builder setGlobalSettings(RetrySettings value)

Sets global (attempt-independent) retry settings.

Parameter
NameDescription
valueRetrySettings
Returns
TypeDescription
TimedAttemptSettings.Builder

setOverallAttemptCount(int value)

public abstract TimedAttemptSettings.Builder setOverallAttemptCount(int value)

Set the overall attempt count. It is a zero-based value (first attempt will have this value set to 0).

Parameter
NameDescription
valueint
Returns
TypeDescription
TimedAttemptSettings.Builder

setRandomizedRetryDelay(Duration value)

public abstract TimedAttemptSettings.Builder setRandomizedRetryDelay(Duration value)

Sets randomized attempt delay. By default this value is calculated based on the retryDelay value, and is used as the actual attempt execution delay.

Parameter
NameDescription
valueorg.threeten.bp.Duration
Returns
TypeDescription
TimedAttemptSettings.Builder

setRetryDelay(Duration value)

public abstract TimedAttemptSettings.Builder setRetryDelay(Duration value)

Sets the calculated retry delay. Note that the actual delay used for retry scheduling may be different (randomized, based on this value).

Parameter
NameDescription
valueorg.threeten.bp.Duration
Returns
TypeDescription
TimedAttemptSettings.Builder

setRpcTimeout(Duration value)

public abstract TimedAttemptSettings.Builder setRpcTimeout(Duration value)

Sets rpc timeout used for this attempt.

Parameter
NameDescription
valueorg.threeten.bp.Duration
Returns
TypeDescription
TimedAttemptSettings.Builder