Enum 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 a Machine can take on.

    The service state, is the operational state of the service running on the machine. This is different from the MachineState, which is the execution state of the Machine as reported by the infrastructure.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      BOOTING
      The service is being bootstrapped and may not (yet) be operational.
      IN_SERVICE
      The service is operational and ready to accept work (health checks pass).
      OUT_OF_SERVICE
      The service is unhealthy and is in need of repair.
      UNHEALTHY
      The service is not functioning properly (health checks fail).
      UNKNOWN
      The 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 ServiceState valueOf​(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.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • 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 name
        java.lang.NullPointerException - if the argument is null