Class NoRetryStrategy

  • All Implemented Interfaces:
    RetryStrategy

    public final class NoRetryStrategy
    extends java.lang.Object
    implements RetryStrategy
    Specifies that no retries will be made.
    • Constructor Summary

      Constructors 
      Constructor Description
      NoRetryStrategy()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canRetry​(int retryAttempt)
      Returns true if the given retry attempt will be allowed by this strategy.
      int getDelayMillis​(int retryAttempt)
      Return the number of milliseconds to delay the next retry attempt.
      int getMaxRetryAttempts()
      Return the maximum number of retry attempts for this strategy.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoRetryStrategy

        public NoRetryStrategy()
    • Method Detail

      • canRetry

        public boolean canRetry​(int retryAttempt)
        Description copied from interface: RetryStrategy
        Returns true if the given retry attempt will be allowed by this strategy.
        Specified by:
        canRetry in interface RetryStrategy
        Parameters:
        retryAttempt - The retry attempt number, starting at 1 (i.e. the second overall attempt, or first retry is attempt 1).
        Returns:
        True if this attempt can be retried, otherwise false.
      • getDelayMillis

        public int getDelayMillis​(int retryAttempt)
        Description copied from interface: RetryStrategy
        Return the number of milliseconds to delay the next retry attempt.
        Specified by:
        getDelayMillis in interface RetryStrategy
        Parameters:
        retryAttempt - The retry attempt number, starting at 1 (i.e. the second overall attempt/first retry is #1).
        Returns:
        The number of milliseconds to delay the next retry attempt.
      • getMaxRetryAttempts

        public int getMaxRetryAttempts()
        Description copied from interface: RetryStrategy
        Return the maximum number of retry attempts for this strategy.
        Specified by:
        getMaxRetryAttempts in interface RetryStrategy
        Returns:
        The number of retry attempts that this strategy will attempt.