Class ExponentialBackoffStrategy

    • Constructor Detail

      • ExponentialBackoffStrategy

        public ExponentialBackoffStrategy()
      • ExponentialBackoffStrategy

        public ExponentialBackoffStrategy​(int numberOfRetries,
                                          java.time.Duration defaultTimeToWait,
                                          double multiplier)
    • Method Detail

      • shouldRetry

        public boolean shouldRetry()
        Specified by:
        shouldRetry in interface BackoffStrategy
        Returns:
        true if there are tries left
      • errorOccurred

        public java.time.Duration errorOccurred()
        Description copied from interface: BackoffStrategy
        Informs back-off mechanism about failure
        Specified by:
        errorOccurred in interface BackoffStrategy
        Returns:
        back-off time adjusted by fail
      • resetBackOffState

        public void resetBackOffState()
        Description copied from interface: BackoffStrategy
        Reset back off state. Call this method after successful attempts if you want to reuse the class
        Specified by:
        resetBackOffState in interface BackoffStrategy