public enum NoRestartBackoffTimeStrategy extends Enum<NoRestartBackoffTimeStrategy> implements RestartBackoffTimeStrategy
Modifier and Type | Class and Description |
---|---|
static class |
NoRestartBackoffTimeStrategy.NoRestartBackoffTimeStrategyFactory
The factory for creating
NoRestartBackoffTimeStrategy . |
RestartBackoffTimeStrategy.Factory
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
canRestart()
Returns whether a restart should be conducted.
|
long |
getBackoffTime()
Returns the delay to do the restarting.
|
void |
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.
|
public static final NoRestartBackoffTimeStrategy INSTANCE
public static NoRestartBackoffTimeStrategy[] values()
for (NoRestartBackoffTimeStrategy c : NoRestartBackoffTimeStrategy.values()) System.out.println(c);
public static NoRestartBackoffTimeStrategy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic 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 String toString()
toString
in class Enum<NoRestartBackoffTimeStrategy>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.