Class FixedDelay

    • Constructor Detail

      • FixedDelay

        public FixedDelay​(int maxRetries,
                          Duration delay)
        Creates an instance of FixedDelay.
        Parameters:
        maxRetries - The max number of retry attempts that can be made.
        delay - The fixed delay duration between retry attempts.
    • Method Detail

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