public static class AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy<OUT> extends Object implements AsyncRetryStrategy<OUT>
Constructor and Description |
---|
ExponentialBackoffDelayRetryStrategy(int maxAttempts,
long initialDelay,
long maxRetryDelay,
double multiplier,
java.util.function.Predicate<Collection<OUT>> resultPredicate,
java.util.function.Predicate<Throwable> exceptionPredicate) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRetry(int currentAttempts) |
long |
getBackoffTimeMillis(int currentAttempts) |
AsyncRetryPredicate<OUT> |
getRetryPredicate() |
public ExponentialBackoffDelayRetryStrategy(int maxAttempts, long initialDelay, long maxRetryDelay, double multiplier, java.util.function.Predicate<Collection<OUT>> resultPredicate, java.util.function.Predicate<Throwable> exceptionPredicate)
public boolean canRetry(int currentAttempts)
canRetry
in interface AsyncRetryStrategy<OUT>
public long getBackoffTimeMillis(int currentAttempts)
getBackoffTimeMillis
in interface AsyncRetryStrategy<OUT>
public AsyncRetryPredicate<OUT> getRetryPredicate()
getRetryPredicate
in interface AsyncRetryStrategy<OUT>
AsyncRetryPredicate
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.