Class FibonacciRetryStrategy

  • All Implemented Interfaces:
    RetryStrategy

    public class FibonacciRetryStrategy
    extends java.lang.Object
    implements RetryStrategy
    A Fibonacci sequence with an upper bound. Once the upper limit is hit, all subsequent calls to `next()` will return the provided limit.
    • Constructor Summary

      Constructors 
      Constructor Description
      FibonacciRetryStrategy​(int start, int upperBound, int maxJitter)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int next()
      Gets the amount of time to wait in millis before retrying
      • Methods inherited from class java.lang.Object

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

      • FibonacciRetryStrategy

        public FibonacciRetryStrategy​(int start,
                                      int upperBound,
                                      int maxJitter)
    • Method Detail

      • next

        public int next()
        Description copied from interface: RetryStrategy
        Gets the amount of time to wait in millis before retrying
        Specified by:
        next in interface RetryStrategy
        Returns:
        millis to wait before retrying