@Test public void testMaxRetries() { NeedsRetries builder = Retry.builder(); builder.maxRetries(10); builder.maxRetries(0); assertThrows("Should not allow negative retries", IllegalArgumentException.class, () -> builder.maxRetries(-1)); }
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();  }