Package top.wcpe.beacon.agent.api
Enum Class HealthLevel
- All Implemented Interfaces:
Serializable,Comparable<HealthLevel>,Constable
健康等级(FR-147)。
与控制面线上小写值 healthy / degraded / unhealthy 一一对应;
线上字符串到本枚举的映射只发生在 agent 适配器内,业务插件只见强类型枚举。
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthLevelReturns the enum constant of this class with the specified name.static HealthLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
HEALTHY
健康:score ≥ healthyMin,正常可调度。 -
DEGRADED
亚健康:degradedMin ≤ score < healthyMin,仍可调度、仅排序靠后。 -
UNHEALTHY
不健康:score < degradedMin,不可调度。
-
-
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
-