Package org.opends.server.monitors
Class HealthStatus
- java.lang.Object
-
- org.opends.server.monitors.HealthStatus
-
public final class HealthStatus extends Object
An unmodifiable health diagnostic.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HealthStatus
aliveAndHealthy()
Returns the ALIVE and HEALTHYHealthStatus
.static HealthStatus
combine(HealthStatus healthStatus1, HealthStatus healthStatus2)
Creates a newHealthStatus
by combining the providedHealthStatus
errors.List<LocalizableMessage>
getAliveErrors()
Returns the list of serious errors.List<LocalizableMessage>
getHealthyErrors()
Returns the list of transient errors.boolean
isAlive()
boolean
isHealthy()
Returnstrue
if there are no serious errors as provided bygetAliveErrors()
nor transient errors as provided bygetHealthyErrors()
,false
otherwise.static HealthStatus
notAlive(List<LocalizableMessage> errors)
Returns a NOT_ALIVEHealthStatus
.static HealthStatus
notAlive(LocalizableMessage error)
Returns a NOT_ALIVEHealthStatus
.static HealthStatus
notHealthy(List<LocalizableMessage> errors)
Returns a NOT_HEALTHYHealthStatus
.static HealthStatus
notHealthy(LocalizableMessage error)
Returns a NOT_HEALTHYHealthStatus
.
-
-
-
Method Detail
-
aliveAndHealthy
public static HealthStatus aliveAndHealthy()
Returns the ALIVE and HEALTHYHealthStatus
.- Returns:
- the ALIVE and HEALTHY
HealthStatus
.
-
notAlive
public static HealthStatus notAlive(LocalizableMessage error)
Returns a NOT_ALIVEHealthStatus
.- Parameters:
error
- ALocalizableMessage
describing the serious error.- Returns:
- A NOT_ALIVE
HealthStatus
.
-
notHealthy
public static HealthStatus notHealthy(LocalizableMessage error)
Returns a NOT_HEALTHYHealthStatus
.- Parameters:
error
- ALocalizableMessage
describing the transient error.- Returns:
- A NOT_HEALTHY
HealthStatus
.
-
notAlive
public static HealthStatus notAlive(List<LocalizableMessage> errors)
Returns a NOT_ALIVEHealthStatus
.- Parameters:
errors
- A non-empty list of messages describing the serious errors.- Returns:
- A NOT_ALIVE
HealthStatus
.
-
notHealthy
public static HealthStatus notHealthy(List<LocalizableMessage> errors)
Returns a NOT_HEALTHYHealthStatus
.- Parameters:
errors
- A non-empty list of messages describing the transient errors.- Returns:
- A NOT_HEALTHY
HealthStatus
.
-
combine
public static HealthStatus combine(HealthStatus healthStatus1, HealthStatus healthStatus2)
Creates a newHealthStatus
by combining the providedHealthStatus
errors.- Parameters:
healthStatus1
- The first health status to be combined.healthStatus2
- The second health status to be combined.- Returns:
- The combination of the provided health statuses.
-
isAlive
public boolean isAlive()
- Returns:
true
if there are no serious errors,false
otherwise.
-
isHealthy
public boolean isHealthy()
Returnstrue
if there are no serious errors as provided bygetAliveErrors()
nor transient errors as provided bygetHealthyErrors()
,false
otherwise.- Returns:
true
if there are no serious errors nor transient errors,false
otherwise.
-
getAliveErrors
public List<LocalizableMessage> getAliveErrors()
Returns the list of serious errors.- Returns:
- The list of serious errors.
-
getHealthyErrors
public List<LocalizableMessage> getHealthyErrors()
Returns the list of transient errors.- Returns:
- The list of transient errors.
-
-