Class TimedAttemptSettings (2.51.0)

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
Type Description
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
Type Description
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
Type Description
long

getGlobalSettings()

public abstract RetrySettings getGlobalSettings()

Returns global (attempt-independent) retry settings.

Returns
Type Description
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
Type Description
int

getRandomizedRetryDelay()

public final Duration getRandomizedRetryDelay()

This method is obsolete. Use #getRandomizedRetryDelayDuration() instead

Returns
Type Description
org.threeten.bp.Duration

getRandomizedRetryDelayDuration()

public abstract Duration getRandomizedRetryDelayDuration()

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
Type Description
Duration

getRetryDelay()

public final Duration getRetryDelay()

This method is obsolete. Use #getRetryDelayDuration() instead

Returns
Type Description
org.threeten.bp.Duration

getRetryDelayDuration()

public abstract Duration getRetryDelayDuration()

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

Returns
Type Description
Duration

getRpcTimeout()

public final Duration getRpcTimeout()

This method is obsolete. Use #getRpcTimeoutDuration() instead

Returns
Type Description
org.threeten.bp.Duration

getRpcTimeoutDuration()

public abstract Duration getRpcTimeoutDuration()

Returns rpc timeout used for this attempt.

Returns
Type Description
Duration

toBuilder()

public abstract TimedAttemptSettings.Builder toBuilder()
Returns
Type Description
TimedAttemptSettings.Builder