Class AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy<OUT>
- java.lang.Object
-
- org.apache.flink.streaming.util.retryable.AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy<OUT>
-
- All Implemented Interfaces:
Serializable
,AsyncRetryStrategy<OUT>
- Enclosing class:
- AsyncRetryStrategies
public static class AsyncRetryStrategies.ExponentialBackoffDelayRetryStrategy<OUT> extends Object implements AsyncRetryStrategy<OUT>
ExponentialBackoffDelayRetryStrategy.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExponentialBackoffDelayRetryStrategy(int maxAttempts, long initialDelay, long maxRetryDelay, double multiplier, Predicate<Collection<OUT>> resultPredicate, Predicate<Throwable> exceptionPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRetry(int currentAttempts)
long
getBackoffTimeMillis(int currentAttempts)
AsyncRetryPredicate<OUT>
getRetryPredicate()
-
-
-
Constructor Detail
-
ExponentialBackoffDelayRetryStrategy
public ExponentialBackoffDelayRetryStrategy(int maxAttempts, long initialDelay, long maxRetryDelay, double multiplier, Predicate<Collection<OUT>> resultPredicate, Predicate<Throwable> exceptionPredicate)
-
-
Method Detail
-
canRetry
public boolean canRetry(int currentAttempts)
- Specified by:
canRetry
in interfaceAsyncRetryStrategy<OUT>
- Returns:
- whether the next attempt can happen
-
getBackoffTimeMillis
public long getBackoffTimeMillis(int currentAttempts)
- Specified by:
getBackoffTimeMillis
in interfaceAsyncRetryStrategy<OUT>
- Returns:
- the delay time of next attempt
-
getRetryPredicate
public AsyncRetryPredicate<OUT> getRetryPredicate()
- Specified by:
getRetryPredicate
in interfaceAsyncRetryStrategy<OUT>
- Returns:
- the defined retry predicate
AsyncRetryPredicate
-
-