@Test void testDidNotReachMaxRetries_retriesCountEqualsMaxRetries_returnsFalse() { ExponentialBackoffPolicy exponentialBackoffPolicy = ExponentialBackoffPolicy .builder() .maxRetries(5) .build(); assertTrue(exponentialBackoffPolicy.reachedMaxRetries(5)); }
public boolean reachedMaxRetries(final int retriesCount) { return maxRetries != UNLIMITED_RETRIES && retriesCount >= maxRetries; }
ExponentialBackoffPolicy { public boolean reachedMaxRetries(final int retriesCount) { return maxRetries != UNLIMITED_RETRIES && retriesCount >= maxRetries; } }
ExponentialBackoffPolicy { public boolean reachedMaxRetries(final int retriesCount) { return maxRetries != UNLIMITED_RETRIES && retriesCount >= maxRetries; } @Builder  ExponentialBackoffPolicy(final Duration initialDelay,
                                    final Duration maxDelay,
                                    final int maxRetries,
                                    final int backoffMultiplier); private  ExponentialBackoffPolicy(); }
ExponentialBackoffPolicy { public boolean reachedMaxRetries(final int retriesCount) { return maxRetries != UNLIMITED_RETRIES && retriesCount >= maxRetries; } @Builder  ExponentialBackoffPolicy(final Duration initialDelay,
                                    final Duration maxDelay,
                                    final int maxRetries,
                                    final int backoffMultiplier); private  ExponentialBackoffPolicy(); Duration nextDelay(final Duration currentDelay); boolean reachedMaxRetries(final int retriesCount); }
ExponentialBackoffPolicy { public boolean reachedMaxRetries(final int retriesCount) { return maxRetries != UNLIMITED_RETRIES && retriesCount >= maxRetries; } @Builder  ExponentialBackoffPolicy(final Duration initialDelay,
                                    final Duration maxDelay,
                                    final int maxRetries,
                                    final int backoffMultiplier); private  ExponentialBackoffPolicy(); Duration nextDelay(final Duration currentDelay); boolean reachedMaxRetries(final int retriesCount); static final ExponentialBackoffPolicy DEFAULT; static final int UNLIMITED_RETRIES; }