Package com.google.api.gax.retrying
Class TimedAttemptSettings.Builder
- java.lang.Object
-
- com.google.api.gax.retrying.TimedAttemptSettings.Builder
-
- Enclosing class:
- TimedAttemptSettings
public abstract static class TimedAttemptSettings.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract TimedAttemptSettingsbuild()abstract TimedAttemptSettings.BuildersetAttemptCount(int value)Set the attempt count.abstract TimedAttemptSettings.BuildersetFirstAttemptStartTimeNanos(long value)Set the start time of the first attempt.abstract TimedAttemptSettings.BuildersetGlobalSettings(RetrySettings value)Sets global (attempt-independent) retry settings.abstract TimedAttemptSettings.BuildersetOverallAttemptCount(int value)Set the overall attempt count.abstract TimedAttemptSettings.BuildersetRandomizedRetryDelay(org.threeten.bp.Duration value)Sets randomized attempt delay.abstract TimedAttemptSettings.BuildersetRetryDelay(org.threeten.bp.Duration value)Sets the calculated retry delay.abstract TimedAttemptSettings.BuildersetRpcTimeout(org.threeten.bp.Duration value)Sets rpc timeout used for this attempt.
-
-
-
Method Detail
-
setGlobalSettings
public abstract TimedAttemptSettings.Builder setGlobalSettings(RetrySettings value)
Sets global (attempt-independent) retry settings.
-
setRetryDelay
public abstract TimedAttemptSettings.Builder setRetryDelay(org.threeten.bp.Duration value)
Sets the calculated retry delay. Note that the actual delay used for retry scheduling may be different (randomized, based on this value).
-
setRpcTimeout
public abstract TimedAttemptSettings.Builder setRpcTimeout(org.threeten.bp.Duration value)
Sets rpc timeout used for this attempt.
-
setRandomizedRetryDelay
public abstract TimedAttemptSettings.Builder setRandomizedRetryDelay(org.threeten.bp.Duration value)
Sets randomized attempt delay. By default this value is calculated based on theretryDelayvalue, and is used as the actual attempt execution delay.
-
setAttemptCount
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).
-
setOverallAttemptCount
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).
-
setFirstAttemptStartTimeNanos
public abstract TimedAttemptSettings.Builder setFirstAttemptStartTimeNanos(long value)
Set the start time of the first attempt. Note that this value is dependent on the actualApiClockused during the process.
-
build
public abstract TimedAttemptSettings build()
-
-