Package com.couchbase.client.core.state
Enum LifecycleState
- All Implemented Interfaces:
Serializable
,Comparable<LifecycleState>
,java.lang.constant.Constable
public enum LifecycleState extends Enum<LifecycleState>
**Represents common lifecycle states of components.**
The LifecycleState
s are usually combined with the AbstractStateMachine
to build up a state-machine
like, observable component that can be subscribed from external components.
[*] --> Disconnected Disconnected --> Connecting Connecting --> Disconnected Connecting --> Connected Connecting --> Degraded Connected --> Disconnecting Connected --> Degraded Degraded --> Connected Disconnecting -> Disconnected
- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description CONNECTED
The component is connected without degradation.CONNECTING
The component is currently connecting or reconnecting.DEGRADED
The component is connected, but with service degradation.DISCONNECTED
The component is currently disconnected.DISCONNECTING
The component is disconnecting.IDLE
The component is idle and has no associated connections to identify. -
Method Summary
Modifier and Type Method Description static LifecycleState
valueOf(String name)
Returns the enum constant of this type with the specified name.static LifecycleState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DISCONNECTED
The component is currently disconnected. -
CONNECTING
The component is currently connecting or reconnecting. -
CONNECTED
The component is connected without degradation. -
DISCONNECTING
The component is disconnecting. -
DEGRADED
The component is connected, but with service degradation. -
IDLE
The component is idle and has no associated connections to identify. This is most commonly the case with "on demand" services, when no endpoints are registered. In this case "DISCONNECTED" is not the right way to describe its state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-