Class TimedAttemptSettings


  • public abstract class TimedAttemptSettings
    extends Object
    Timed attempt execution settings. Defines time-specific properties of a retry attempt.
    • Constructor Detail

      • TimedAttemptSettings

        public TimedAttemptSettings()
    • 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 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.