public class FailureRateRestartBackoffTimeStrategy extends Object implements RestartBackoffTimeStrategy
Modifier and Type | Class and Description |
---|---|
static class |
FailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactory
The factory for creating
FailureRateRestartBackoffTimeStrategy . |
RestartBackoffTimeStrategy.Factory
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart()
Returns whether a restart should be conducted.
|
static FailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactory |
createFactory(Configuration configuration) |
long |
getBackoffTime()
Returns the delay to do the restarting.
|
void |
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 void notifyFailure(Throwable cause)
RestartBackoffTimeStrategy
notifyFailure
in interface RestartBackoffTimeStrategy
cause
- of the task failurepublic static FailureRateRestartBackoffTimeStrategy.FailureRateRestartBackoffTimeStrategyFactory createFactory(Configuration configuration)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.