@Test public void testMaxWait() { NeedsMaxWait builder = Retry.builder().maxRetries(10).retryAfter(15, MILLISECONDS).incrementBy(10, MILLISECONDS); builder.maxWait(15, MILLISECONDS); builder.maxWait(16, MILLISECONDS); assertThrows("Max wait time should be greater than or equal to initial wait time", IllegalArgumentException.class, () -> builder.maxWait(14, MILLISECONDS)); }
public static NeedsRetries builder() { return new RetryFactoryBuilder(); }
Retry { public static NeedsRetries builder() { return new RetryFactoryBuilder(); } }
Retry { public static NeedsRetries builder() { return new RetryFactoryBuilder(); } private  Retry(long maxRetries, long startWait, long waitIncrement, long maxWait, long logInterval,
      double backOffFactor); }
Retry { public static NeedsRetries builder() { return new RetryFactoryBuilder(); } private  Retry(long maxRetries, long startWait, long waitIncrement, long maxWait, long logInterval,
      double backOffFactor); @VisibleForTesting void setBackOffFactor(double baskOffFactor); @VisibleForTesting double getWaitFactor(); boolean hasInfiniteRetries(); long getLogInterval(); boolean canRetry(); void useRetry(); boolean hasRetried(); long retriesCompleted(); void waitForNextAttempt(); void logRetry(Logger log, String message, Throwable t); void logRetry(Logger log, String message); static NeedsRetries builder(); }
Retry { public static NeedsRetries builder() { return new RetryFactoryBuilder(); } private  Retry(long maxRetries, long startWait, long waitIncrement, long maxWait, long logInterval,
      double backOffFactor); @VisibleForTesting void setBackOffFactor(double baskOffFactor); @VisibleForTesting double getWaitFactor(); boolean hasInfiniteRetries(); long getLogInterval(); boolean canRetry(); void useRetry(); boolean hasRetried(); long retriesCompleted(); void waitForNextAttempt(); void logRetry(Logger log, String message, Throwable t); void logRetry(Logger log, String message); static NeedsRetries builder();  }