Package org.gcube.common.health.api
Enum Class Status
- All Implemented Interfaces:
Serializable,Comparable<Status>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionReady, with reduced performance or a missing part (e.g. a cache not reachable).Not ready.Not computed yet.Ready. -
Method Summary
Modifier and TypeMethodDescriptionstatic StatusReturns the status of a JSON value; the names of the constants (UP) are accepted too.booleanisReady()Returns whether the status is ready:upordegraded.value()Returns the value of the status in JSON, in lowerCamelCase as every enumerated value of the Information System.static StatusReturns the enum constant of this class with the specified name.static Status[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UP
Ready. -
DEGRADED
Ready, with reduced performance or a missing part (e.g. a cache not reachable). -
DOWN
Not ready. -
NOT_CALCULATED
Not computed yet.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
value
Returns the value of the status in JSON, in lowerCamelCase as every enumerated value of the Information System.- Returns:
- the value, e.g.
up
-
isReady
public boolean isReady()Returns whether the status is ready:upordegraded.- Returns:
truewhen ready
-
fromValue
Returns the status of a JSON value; the names of the constants (UP) are accepted too.- Parameters:
value- the value- Returns:
- the status
-