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(Configuration configuration)
Creates a FixedDelayRestartStrategy from the given Configuration.
|
int |
getCurrentRestartAttempt() |
void |
restart(ExecutionGraph executionGraph)
Restarts the given
ExecutionGraph . |
String |
toString() |
public FixedDelayRestartStrategy(int maxNumberRestartAttempts, long delayBetweenRestartAttempts)
public int getCurrentRestartAttempt()
public boolean canRestart()
RestartStrategy
ExecutionGraph
.canRestart
in interface RestartStrategy
public void restart(ExecutionGraph executionGraph)
RestartStrategy
ExecutionGraph
.restart
in interface RestartStrategy
executionGraph
- The ExecutionGraph to be restartedpublic static FixedDelayRestartStrategy.FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception
configuration
- Configuration containing the parameter values for the restart strategyException
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.