Class FixedDelay

java.lang.Object
com.azure.core.http.policy.FixedDelay
All Implemented Interfaces:
RetryStrategy

public class FixedDelay extends Object implements RetryStrategy
A fixed-delay implementation of RetryStrategy that has a fixed delay duration between each retry attempt.
  • Constructor Details

  • Method Details

    • getMaxRetries

      public int getMaxRetries()
      Description copied from interface: RetryStrategy
      Max number of retry attempts to be make.
      Specified by:
      getMaxRetries in interface RetryStrategy
      Returns:
      The max number of retry attempts.
    • calculateRetryDelay

      public Duration calculateRetryDelay(int retryAttempts)
      Description copied from interface: RetryStrategy
      Computes the delay between each retry.
      Specified by:
      calculateRetryDelay in interface RetryStrategy
      Parameters:
      retryAttempts - The number of retry attempts completed so far.
      Returns:
      The delay duration before the next retry.