Enum Class Status

java.lang.Object
java.lang.Enum<Status>
org.gcube.common.health.api.Status
All Implemented Interfaces:
Serializable, Comparable<Status>, Constable

public enum Status extends Enum<Status>
  • Enum Constant Details

    • UP

      public static final Status UP
      Ready.
    • DEGRADED

      public static final Status DEGRADED
      Ready, with reduced performance or a missing part (e.g. a cache not reachable).
    • DOWN

      public static final Status DOWN
      Not ready.
    • NOT_CALCULATED

      public static final Status NOT_CALCULATED
      Not computed yet.
  • Method Details

    • values

      public static Status[] 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

      public static Status valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • value

      public String 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: up or degraded.
      Returns:
      true when ready
    • fromValue

      public static Status fromValue(String value)
      Returns the status of a JSON value; the names of the constants (UP) are accepted too.
      Parameters:
      value - the value
      Returns:
      the status