public class BladeState
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static BladeState |
ABORTED |
protected int |
code
integer value uniquely representing a blade state
|
static BladeState |
COMPLETED |
static BladeState |
DEPLOYED |
static BladeState |
DEPLOYING |
static BladeState |
INCOHERENT |
static BladeState |
INITIALIZED |
static BladeState |
INITIALIZING |
protected java.lang.String |
label
an explicit state name (running, stopping, stopped...)
|
static BladeState |
NONE |
static BladeState |
RESUMING |
static BladeState |
RUNNING |
static BladeState |
STARTING |
static BladeState |
STOPPED |
static BladeState |
STOPPING |
static BladeState |
SUSPENDED |
static BladeState |
SUSPENDING |
static BladeState |
UNDEPLOYED |
Modifier | Constructor and Description |
---|---|
protected |
BladeState(java.lang.String label)
Creates a BladeState instance with the provided
state label (unique name), and associates a
unique code to this object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
equality is based on the state code value
|
static BladeState |
get(int code)
Gets the blade state instance associated to a state code
|
int |
getCode()
Gets the unique code representing this blade state.
|
static BladeState |
getGlobalState(java.util.Collection<BladeState> states)
Return the global state resulting from some individual states.
|
static boolean |
isRunning(java.util.Collection<BladeState> states)
Determines if the global state resulting from some individual states
is "running", i.e.
|
static boolean |
isStationaryState(java.util.Collection<BladeState> states)
Determines if the global state resulting from some
individual states is a stationary state or a transitional state.
|
java.lang.String |
toString()
Gets the explicit name of this state (e.g.
|
public static final BladeState UNDEPLOYED
public static final BladeState DEPLOYING
public static final BladeState DEPLOYED
public static final BladeState INITIALIZING
public static final BladeState INITIALIZED
public static final BladeState STARTING
public static final BladeState RUNNING
public static final BladeState SUSPENDING
public static final BladeState SUSPENDED
public static final BladeState RESUMING
public static final BladeState COMPLETED
public static final BladeState STOPPING
public static final BladeState STOPPED
public static final BladeState ABORTED
public static final BladeState INCOHERENT
public static final BladeState NONE
protected int code
protected transient java.lang.String label
protected BladeState(java.lang.String label)
get(int)
instead.label
- an explicit, and preferably unique and short, name describing
this state.public static BladeState get(int code)
code
- the code representing a blade statepublic static BladeState getGlobalState(java.util.Collection<BladeState> states)
states
- individual states.public static boolean isStationaryState(java.util.Collection<BladeState> states)
states
- individual statespublic static boolean isRunning(java.util.Collection<BladeState> states)
states
- individual statespublic java.lang.String toString()
toString
in class java.lang.Object
public int getCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object