Package org.apache.flink.util.concurrent
Class IncrementalDelayRetryStrategy
- java.lang.Object
-
- org.apache.flink.util.concurrent.IncrementalDelayRetryStrategy
-
- All Implemented Interfaces:
RetryStrategy
public class IncrementalDelayRetryStrategy extends Object implements RetryStrategy
An implementation ofRetryStrategythat retries at an incremental delay with a cap.
-
-
Constructor Summary
Constructors Constructor Description IncrementalDelayRetryStrategy(int remainingRetries, Duration currentRetryDelay, Duration increment, Duration maxRetryDelay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryStrategygetNextRetryStrategy()intgetNumRemainingRetries()DurationgetRetryDelay()
-
-
-
Constructor Detail
-
IncrementalDelayRetryStrategy
public IncrementalDelayRetryStrategy(int remainingRetries, Duration currentRetryDelay, Duration increment, Duration maxRetryDelay)- Parameters:
remainingRetries- number of times to retrycurrentRetryDelay- the current delay between retriesincrement- the delay increment between retriesmaxRetryDelay- the max delay between retries
-
-
Method Detail
-
getNumRemainingRetries
public int getNumRemainingRetries()
- Specified by:
getNumRemainingRetriesin interfaceRetryStrategy- Returns:
- the number of remaining retries
-
getRetryDelay
public Duration getRetryDelay()
- Specified by:
getRetryDelayin interfaceRetryStrategy- Returns:
- the current delay if we need to retry
-
getNextRetryStrategy
public RetryStrategy getNextRetryStrategy()
- Specified by:
getNextRetryStrategyin interfaceRetryStrategy- Returns:
- the next retry strategy to current delay if we need to retry
-
-