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 ofRetryStrategy
that 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 RetryStrategy
getNextRetryStrategy()
int
getNumRemainingRetries()
Duration
getRetryDelay()
-
-
-
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:
getNumRemainingRetries
in interfaceRetryStrategy
- Returns:
- the number of remaining retries
-
getRetryDelay
public Duration getRetryDelay()
- Specified by:
getRetryDelay
in interfaceRetryStrategy
- Returns:
- the current delay if we need to retry
-
getNextRetryStrategy
public RetryStrategy getNextRetryStrategy()
- Specified by:
getNextRetryStrategy
in interfaceRetryStrategy
- Returns:
- the next retry strategy to current delay if we need to retry
-
-