Package org.apache.flink.util.concurrent
Class FixedRetryStrategy
- java.lang.Object
-
- org.apache.flink.util.concurrent.FixedRetryStrategy
-
- All Implemented Interfaces:
RetryStrategy
public class FixedRetryStrategy extends Object implements RetryStrategy
An implementation ofRetryStrategythat retries at a fixed delay.
-
-
Constructor Summary
Constructors Constructor Description FixedRetryStrategy(int remainingRetries, Duration retryDelay)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryStrategygetNextRetryStrategy()intgetNumRemainingRetries()DurationgetRetryDelay()
-
-
-
Constructor Detail
-
FixedRetryStrategy
public FixedRetryStrategy(int remainingRetries, Duration retryDelay)- Parameters:
remainingRetries- number of times to retryretryDelay- 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
-
-