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.
  • Constructor Details

    • TimedAttemptSettings

      public TimedAttemptSettings()
  • Method Details

    • getGlobalSettings

      public abstract RetrySettings getGlobalSettings()
      Returns global (attempt-independent) retry settings.
    • getRetryDelay

      @ObsoleteApi("Use getRetryDelayDuration() instead") public final org.threeten.bp.Duration getRetryDelay()
      This method is obsolete. Use getRetryDelayDuration() instead
    • 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).
    • getRpcTimeout

      @ObsoleteApi("Use getRpcTimeoutDuration() instead") public final org.threeten.bp.Duration getRpcTimeout()
      This method is obsolete. Use getRpcTimeoutDuration() instead
    • getRpcTimeoutDuration

      public abstract Duration getRpcTimeoutDuration()
      Returns rpc timeout used for this attempt.
    • getRandomizedRetryDelay

      @ObsoleteApi("Use getRandomizedRetryDelayDuration() instead") public final org.threeten.bp.Duration getRandomizedRetryDelay()
      This method is obsolete. Use getRandomizedRetryDelayDuration() instead
    • 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.
    • 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 to getAttemptCount() for unary RPCs.
    • 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.
    • toBuilder

      public abstract TimedAttemptSettings.Builder toBuilder()
    • newBuilder

      public static TimedAttemptSettings.Builder newBuilder()