Class ExponentialBackoffStrategy

java.lang.Object
de.hybris.platform.util.backoff.ExponentialBackoffStrategy
All Implemented Interfaces:
BackoffStrategy

public class ExponentialBackoffStrategy extends Object implements BackoffStrategy
  • Constructor Details

    • ExponentialBackoffStrategy

      public ExponentialBackoffStrategy()
    • ExponentialBackoffStrategy

      public ExponentialBackoffStrategy(int numberOfRetries, Duration defaultTimeToWait, double multiplier)
  • Method Details

    • shouldRetry

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

      public 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