Class TimedAttemptSettings (2.19.2)

public abstract class TimedAttemptSettings

Timed attempt execution settings. Defines time-specific properties of a retry attempt.

Inheritance

java.lang.Object > TimedAttemptSettings

Static Methods

newBuilder()

public static TimedAttemptSettings.Builder newBuilder()
Returns
TypeDescription
TimedAttemptSettings.Builder

Constructors

TimedAttemptSettings()

public TimedAttemptSettings()

Methods

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.

Returns
TypeDescription
int

getFirstAttemptStartTimeNanos()

public abstract long getFirstAttemptStartTimeNanos()

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

Returns
TypeDescription
long

getGlobalSettings()

public abstract RetrySettings getGlobalSettings()

Returns global (attempt-independent) retry settings.

Returns
TypeDescription
RetrySettings

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 to #getAttemptCount() for unary RPCs.

Returns
TypeDescription
int

getRandomizedRetryDelay()

public abstract Duration getRandomizedRetryDelay()

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

Returns
TypeDescription
org.threeten.bp.Duration

getRetryDelay()

public abstract Duration getRetryDelay()

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

Returns
TypeDescription
org.threeten.bp.Duration

getRpcTimeout()

public abstract Duration getRpcTimeout()

Returns rpc timeout used for this attempt.

Returns
TypeDescription
org.threeten.bp.Duration

toBuilder()

public abstract TimedAttemptSettings.Builder toBuilder()
Returns
TypeDescription
TimedAttemptSettings.Builder