@InterfaceAudience.Public @InterfaceStability.Evolving public enum ShutdownMode extends Enum<ShutdownMode>
Enum that lists shutdown modes. Any Service or Object instance
can be shutdown either gracefully or forcibly.
When a Service or Object instance is shutdown gracefully, it can perform some prerequisite operations like notifying another nodes or releasing the connections properly etc...Graceful shutdown may take time.
When a Service or Object instance is shutdown forcibly, it will immediately stop responding to requests and closes all the connections abruptly. This mode is little bit faster.
| Enum Constant and Description |
|---|
FORCED_SHUTDOWN
The Forced_ Shutdown.
|
GRACEFUL_SHUTDOWN
The Graceful_Shutdown.
|
| Modifier and Type | Method and Description |
|---|---|
byte |
getCode()
Gets the code.
|
String |
getDescription()
Gets the description.
|
String |
toString() |
static ShutdownMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ShutdownMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ShutdownMode GRACEFUL_SHUTDOWN
public static final ShutdownMode FORCED_SHUTDOWN
public static ShutdownMode[] values()
for (ShutdownMode c : ShutdownMode.values()) System.out.println(c);
public static ShutdownMode 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 byte getCode()
public String getDescription()
public String toString()
toString in class Enum<ShutdownMode>Copyright © 2016 utils4j. All Rights Reserved.