@Test void multiplier_cannotBeZero() { assertThrows(IllegalStateException.class, () -> ConditionalRetry.builder(1, mock(Logger.class), new RethrowExceptionHandler()) .multiplier(0)); }
public ConditionalRetryBuilder multiplier(long multiplier) { Assert.isTrue(multiplier, value -> value > 0, "multiplier must not be zero"); this.multiplier = multiplier; return this; }
ConditionalRetryBuilder { public ConditionalRetryBuilder multiplier(long multiplier) { Assert.isTrue(multiplier, value -> value > 0, "multiplier must not be zero"); this.multiplier = multiplier; return this; } }
ConditionalRetryBuilder { public ConditionalRetryBuilder multiplier(long multiplier) { Assert.isTrue(multiplier, value -> value > 0, "multiplier must not be zero"); this.multiplier = multiplier; return this; } ConditionalRetryBuilder(int maxAttempts, Logger logger, ExceptionHandler exceptionHandler); }
ConditionalRetryBuilder { public ConditionalRetryBuilder multiplier(long multiplier) { Assert.isTrue(multiplier, value -> value > 0, "multiplier must not be zero"); this.multiplier = multiplier; 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 multiplier(long multiplier) { Assert.isTrue(multiplier, value -> value > 0, "multiplier must not be zero"); this.multiplier = multiplier; 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();  }