Package com.google.api.core
Enum ApiService.State
- java.lang.Object
-
- java.lang.Enum<ApiService.State>
-
- com.google.api.core.ApiService.State
-
- All Implemented Interfaces:
Serializable
,Comparable<ApiService.State>
- Enclosing interface:
- ApiService
@BetaApi public static enum ApiService.State extends Enum<ApiService.State>
The lifecycle states of a service.The ordering of the
ApiService.State
enum is defined such that if there is a state transition fromA -> B
thenA.compareTo(B) < 0
. N.B. The converse is not true, i.e. ifA.compareTo(B) < 0
then there is not guaranteed to be a valid state transitionA -> B
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAILED
A service in this state has encountered a problem and may not be operational.NEW
A service in this state is inactive.RUNNING
A service in this state is operational.STARTING
A service in this state is transitioning toRUNNING
.STOPPING
A service in this state is transitioning toTERMINATED
.TERMINATED
A service in this state has completed execution normally.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApiService.State
valueOf(String name)
Returns the enum constant of this type with the specified name.static ApiService.State[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FAILED
public static final ApiService.State FAILED
A service in this state has encountered a problem and may not be operational. It cannot be started nor stopped.
-
NEW
public static final ApiService.State NEW
A service in this state is inactive. It does minimal work and consumes minimal resources.
-
RUNNING
public static final ApiService.State RUNNING
A service in this state is operational.
-
STARTING
public static final ApiService.State STARTING
A service in this state is transitioning toRUNNING
.
-
STOPPING
public static final ApiService.State STOPPING
A service in this state is transitioning toTERMINATED
.
-
TERMINATED
public static final ApiService.State TERMINATED
A service in this state has completed execution normally. It does minimal work and consumes minimal resources.
-
-
Method Detail
-
values
public static ApiService.State[] 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 (ApiService.State c : ApiService.State.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApiService.State 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
-
-