Enum NoRestartBackoffTimeStrategy
- java.lang.Object
-
- java.lang.Enum<NoRestartBackoffTimeStrategy>
-
- org.apache.flink.runtime.executiongraph.failover.NoRestartBackoffTimeStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<NoRestartBackoffTimeStrategy>
,RestartBackoffTimeStrategy
public enum NoRestartBackoffTimeStrategy extends Enum<NoRestartBackoffTimeStrategy> implements RestartBackoffTimeStrategy
Restart strategy which does not restart tasks when tasks fail.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NoRestartBackoffTimeStrategy.NoRestartBackoffTimeStrategyFactory
The factory for creatingNoRestartBackoffTimeStrategy
.-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.executiongraph.failover.RestartBackoffTimeStrategy
RestartBackoffTimeStrategy.Factory
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRestart()
Returns whether a restart should be conducted.long
getBackoffTime()
Returns the delay to do the restarting.boolean
notifyFailure(Throwable cause)
Notify the strategy about the task failure cause.String
toString()
static NoRestartBackoffTimeStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static NoRestartBackoffTimeStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final NoRestartBackoffTimeStrategy INSTANCE
-
-
Method Detail
-
values
public static NoRestartBackoffTimeStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NoRestartBackoffTimeStrategy c : NoRestartBackoffTimeStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NoRestartBackoffTimeStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
canRestart
public boolean canRestart()
Description copied from interface:RestartBackoffTimeStrategy
Returns whether a restart should be conducted.- Specified by:
canRestart
in interfaceRestartBackoffTimeStrategy
- Returns:
- whether a restart should be conducted
-
getBackoffTime
public long getBackoffTime()
Description copied from interface:RestartBackoffTimeStrategy
Returns the delay to do the restarting.- Specified by:
getBackoffTime
in interfaceRestartBackoffTimeStrategy
- Returns:
- the delay to do the restarting
-
notifyFailure
public boolean notifyFailure(Throwable cause)
Description copied from interface:RestartBackoffTimeStrategy
Notify the strategy about the task failure cause.- Specified by:
notifyFailure
in interfaceRestartBackoffTimeStrategy
- Parameters:
cause
- of the task failure- Returns:
- True means that the current failure is the first one after the most-recent failure handling happened, false means that there has been a failure before that was not handled, yet, and the current failure will be considered in a combined failure handling effort.
-
toString
public String toString()
- Overrides:
toString
in classEnum<NoRestartBackoffTimeStrategy>
-
-