@Test void interval_cannotBeNull() { assertThrows(IllegalArgumentException.class, () -> ConditionalRetry.builder(1, mock(Logger.class), new RethrowExceptionHandler()) .interval(null)); }
public ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit) { Assert.isTrue(interval, value -> value > 0, "interval must not be zero"); this.interval = timeUnit.toMillis(interval); this.maxInterval = this.interval; return this; }
ConditionalRetryBuilder { public ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit) { Assert.isTrue(interval, value -> value > 0, "interval must not be zero"); this.interval = timeUnit.toMillis(interval); this.maxInterval = this.interval; return this; } }
ConditionalRetryBuilder { public ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit) { Assert.isTrue(interval, value -> value > 0, "interval must not be zero"); this.interval = timeUnit.toMillis(interval); this.maxInterval = this.interval; return this; } ConditionalRetryBuilder(int maxAttempts, Logger logger, ExceptionHandler exceptionHandler); }
ConditionalRetryBuilder { public ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit) { Assert.isTrue(interval, value -> value > 0, "interval must not be zero"); this.interval = timeUnit.toMillis(interval); this.maxInterval = this.interval; return this; } ConditionalRetryBuilder(int maxAttempts, Logger logger, ExceptionHandler exceptionHandler); ConditionalRetryBuilder statusCode(int statusCode); ConditionalRetryBuilder exception(Class<? extends Throwable> throwable); ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit); ConditionalRetryBuilder interval(RetryInterval interval); ConditionalRetryBuilder multiplier(long multiplier); ConditionalRetryBuilder maxInterval(long maxInterval, TimeUnit timeUnit); ConditionalRetryBuilder useRetryAfter(); ConditionalRetryBuilder condition(RetryCondition condition); Retry build(); }
ConditionalRetryBuilder { public ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit) { Assert.isTrue(interval, value -> value > 0, "interval must not be zero"); this.interval = timeUnit.toMillis(interval); this.maxInterval = this.interval; return this; } ConditionalRetryBuilder(int maxAttempts, Logger logger, ExceptionHandler exceptionHandler); ConditionalRetryBuilder statusCode(int statusCode); ConditionalRetryBuilder exception(Class<? extends Throwable> throwable); ConditionalRetryBuilder interval(long interval, TimeUnit timeUnit); ConditionalRetryBuilder interval(RetryInterval interval); ConditionalRetryBuilder multiplier(long multiplier); ConditionalRetryBuilder maxInterval(long maxInterval, TimeUnit timeUnit); ConditionalRetryBuilder useRetryAfter(); ConditionalRetryBuilder condition(RetryCondition condition); Retry build();  }