public class ExponentialDelayRestartBackoffTimeStrategy extends Object implements RestartBackoffTimeStrategy
If the tasks are running smoothly for some time, backoff is reset to its initial value.
Modifier and Type | Class and Description |
---|---|
static class |
ExponentialDelayRestartBackoffTimeStrategy.ExponentialDelayRestartBackoffTimeStrategyFactory
The factory for creating
ExponentialDelayRestartBackoffTimeStrategy . |
RestartBackoffTimeStrategy.Factory
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart()
Returns whether a restart should be conducted.
|
static ExponentialDelayRestartBackoffTimeStrategy.ExponentialDelayRestartBackoffTimeStrategyFactory |
createFactory(Configuration configuration) |
long |
getBackoffTime()
Returns the delay to do the restarting.
|
boolean |
notifyFailure(Throwable cause)
Notify the strategy about the task failure cause.
|
String |
toString() |
public boolean canRestart()
RestartBackoffTimeStrategy
canRestart
in interface RestartBackoffTimeStrategy
public long getBackoffTime()
RestartBackoffTimeStrategy
getBackoffTime
in interface RestartBackoffTimeStrategy
public boolean notifyFailure(Throwable cause)
RestartBackoffTimeStrategy
notifyFailure
in interface RestartBackoffTimeStrategy
cause
- of the task failurepublic static ExponentialDelayRestartBackoffTimeStrategy.ExponentialDelayRestartBackoffTimeStrategyFactory createFactory(Configuration configuration)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.