Enum ServiceState
- java.lang.Object
-
- java.lang.Enum<ServiceState>
-
- com.elastisys.scale.cloudpool.api.types.ServiceState
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ServiceState>
public enum ServiceState extends java.lang.Enum<ServiceState>
The range of permissible service states that aMachinecan take on. The service state, is the operational state of the service running on the machine. This is different from theMachineState, which is the execution state of theMachineas reported by the infrastructure.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOTINGThe service is being bootstrapped and may not (yet) be operational.IN_SERVICEThe service is operational and ready to accept work (health checks pass).OUT_OF_SERVICEThe service is unhealthy and is in need of repair.UNHEALTHYThe service is not functioning properly (health checks fail).UNKNOWNThe service state of the machine cannot be (or has not yet been) determined.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceStatevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ServiceState[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNKNOWN
public static final ServiceState UNKNOWN
The service state of the machine cannot be (or has not yet been) determined.
-
BOOTING
public static final ServiceState BOOTING
The service is being bootstrapped and may not (yet) be operational.
-
IN_SERVICE
public static final ServiceState IN_SERVICE
The service is operational and ready to accept work (health checks pass).
-
UNHEALTHY
public static final ServiceState UNHEALTHY
The service is not functioning properly (health checks fail).
-
OUT_OF_SERVICE
public static final ServiceState OUT_OF_SERVICE
The service is unhealthy and is in need of repair. It should be considered out of service and not able to accept work until it has recovered. Machines in this service state are not to be considered part of the active machine pool and candidates for being replaced.
-
-
Method Detail
-
values
public static ServiceState[] 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 (ServiceState c : ServiceState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ServiceState valueOf(java.lang.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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
-