Package com.google.api.gax.retrying
Class TimedAttemptSettings
- java.lang.Object
-
- com.google.api.gax.retrying.TimedAttemptSettings
-
public abstract class TimedAttemptSettings extends Object
Timed attempt execution settings. Defines time-specific properties of a retry attempt.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTimedAttemptSettings.Builder
-
Constructor Summary
Constructors Constructor Description TimedAttemptSettings()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intgetAttemptCount()The attempt count.abstract longgetFirstAttemptStartTimeNanos()The start time of the first attempt.abstract RetrySettingsgetGlobalSettings()Returns global (attempt-independent) retry settings.abstract intgetOverallAttemptCount()The overall attempt count.abstract org.threeten.bp.DurationgetRandomizedRetryDelay()Returns randomized attempt delay.abstract org.threeten.bp.DurationgetRetryDelay()Returns the calculated retry delay.abstract org.threeten.bp.DurationgetRpcTimeout()Returns rpc timeout used for this attempt.static TimedAttemptSettings.BuildernewBuilder()abstract TimedAttemptSettings.BuildertoBuilder()
-
-
-
Method Detail
-
getGlobalSettings
public abstract RetrySettings getGlobalSettings()
Returns global (attempt-independent) retry settings.
-
getRetryDelay
public abstract org.threeten.bp.Duration getRetryDelay()
Returns the calculated retry delay. Note that the actual delay used for retry scheduling may be different (randomized, based on this value).
-
getRpcTimeout
public abstract org.threeten.bp.Duration getRpcTimeout()
Returns rpc timeout used for this attempt.
-
getRandomizedRetryDelay
public abstract org.threeten.bp.Duration getRandomizedRetryDelay()
Returns randomized attempt delay. By default this value is calculated based on theretryDelayvalue, and is used as the actual attempt execution delay.
-
getAttemptCount
public abstract int getAttemptCount()
The attempt count. It is a zero-based value (first attempt will have this value set to 0). For streamed RPCs this will be reset after every successful message.
-
getOverallAttemptCount
public abstract int getOverallAttemptCount()
The overall attempt count. It is a zero-based value (first attempt will have this value set to 0). This will be the sum of all attempt counts for a streaming RPC and will be equal togetAttemptCount()for unary RPCs.
-
getFirstAttemptStartTimeNanos
public abstract long getFirstAttemptStartTimeNanos()
The start time of the first attempt. Note that this value is dependent on the actualApiClockused during the process.
-
toBuilder
public abstract TimedAttemptSettings.Builder toBuilder()
-
newBuilder
public static TimedAttemptSettings.Builder newBuilder()
-
-