public class FixedDelayRestartStrategy extends Object implements RestartStrategy
ExecutionGraph a fixed number of times
with a fixed time delay in between.| Modifier and Type | Class and Description |
|---|---|
static class |
FixedDelayRestartStrategy.FixedDelayRestartStrategyFactory |
| Constructor and Description |
|---|
FixedDelayRestartStrategy(int maxNumberRestartAttempts,
long delayBetweenRestartAttempts) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canRestart()
True if the restart strategy can be applied to restart the
ExecutionGraph. |
static FixedDelayRestartStrategy.FixedDelayRestartStrategyFactory |
createFactory(org.apache.flink.configuration.Configuration configuration)
Creates a FixedDelayRestartStrategy from the given Configuration.
|
int |
getCurrentRestartAttempt() |
void |
restart(RestartCallback restarter,
ScheduledExecutor executor)
Called by the ExecutionGraph to eventually trigger a full recovery.
|
String |
toString() |
public FixedDelayRestartStrategy(int maxNumberRestartAttempts,
long delayBetweenRestartAttempts)
public int getCurrentRestartAttempt()
public boolean canRestart()
RestartStrategyExecutionGraph.canRestart in interface RestartStrategypublic void restart(RestartCallback restarter, ScheduledExecutor executor)
RestartStrategyThe thread that calls this method is not supposed to block/sleep.
restart in interface RestartStrategyrestarter - The hook to restart the ExecutionGraphexecutor - An scheduled executor to delay the restartpublic static FixedDelayRestartStrategy.FixedDelayRestartStrategyFactory createFactory(org.apache.flink.configuration.Configuration configuration) throws Exception
configuration - Configuration containing the parameter values for the restart strategyExceptionCopyright © 2014–2019 The Apache Software Foundation. All rights reserved.