Interface BackoffStrategy

    • Field Detail

      • RETRIES_ATTEMPTED_CEILING

        static final int RETRIES_ATTEMPTED_CEILING
        Max permitted retry times. To prevent exponentialDelay from overflow, there must be 2 ^ retriesAttempted <= 2 ^ 31 - 1, which means retriesAttempted <= 30, so that is the ceil for retriesAttempted.
    • Method Detail

      • computeDelayBeforeNextRetry

        Duration computeDelayBeforeNextRetry​(RetryPolicyContext context)
        Compute the delay before the next retry request. This strategy is only consulted when there will be a next retry.
        Parameters:
        context - Context about the state of the last request and information about the number of requests made.
        Returns:
        Amount of time in milliseconds to wait before the next attempt. Must be non-negative (can be zero).
      • calculateExponentialDelay

        default int calculateExponentialDelay​(int retriesAttempted,
                                              Duration baseDelay,
                                              Duration maxBackoffTime)
      • defaultThrottlingStrategy

        static BackoffStrategy defaultThrottlingStrategy()