Enum Class HealthStatus
- All Implemented Interfaces:
Serializable,Comparable<HealthStatus>,Constable
Represents the availability state of a monitored microservice.
Determined by the monitoring system based on the service response and comparison of collected metrics against the defined SLA thresholds.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe service is responding but one or more metrics exceed SLA thresholds.The service is not responding to requests or returns a critical error (5xx).The state is unknown — no data is available for evaluation.The service is responding and all metrics are within normal range. -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthStatusReturns the enum constant of this class with the specified name.static HealthStatus[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UP
The service is responding and all metrics are within normal range. -
DEGRADED
The service is responding but one or more metrics exceed SLA thresholds. For example: response time is higher thanmaxResponseTimeMs, or the error rate exceedsmaxErrorRatePercent. -
DOWN
The service is not responding to requests or returns a critical error (5xx). -
UNKNOWN
The state is unknown — no data is available for evaluation. Typical for newly registered services before the first metrics collection.
-
-
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
-