Enum Class HealthLevel

java.lang.Object
java.lang.Enum<HealthLevel>
top.wcpe.beacon.agent.api.HealthLevel
All Implemented Interfaces:
Serializable, Comparable<HealthLevel>, Constable

public enum HealthLevel extends Enum<HealthLevel>
健康等级(FR-147)。

与控制面线上小写值 healthy / degraded / unhealthy 一一对应; 线上字符串到本枚举的映射只发生在 agent 适配器内,业务插件只见强类型枚举。

  • Enum Constant Details

    • HEALTHY

      public static final HealthLevel HEALTHY
      健康:score ≥ healthyMin,正常可调度。
    • DEGRADED

      public static final HealthLevel DEGRADED
      亚健康:degradedMin ≤ score < healthyMin,仍可调度、仅排序靠后。
    • UNHEALTHY

      public static final HealthLevel UNHEALTHY
      不健康:score < degradedMin,不可调度。
  • Method Details

    • values

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