@Test public void testLogInterval() { NeedsLogInterval builder = Retry.builder().maxRetries(10).retryAfter(15, MILLISECONDS) .incrementBy(10, MILLISECONDS).maxWait(16, MINUTES).backOffFactor(1); builder.logInterval(10, DAYS); builder.logInterval(10, HOURS); builder.logInterval(10, NANOSECONDS); builder.logInterval(0, DAYS); builder.logInterval(0, HOURS); builder.logInterval(0, NANOSECONDS); assertThrows("Log interval must not be negative", IllegalArgumentException.class, () -> builder.logInterval(-1, NANOSECONDS)); }
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();  }