Package com.tangosol.util
Interface HealthCheck
-
public interface HealthCheckA class that can return its health statusApplications can implement custom health checks and register them with the Coherence Management framework using
Registry.register(HealthCheck).Custom health checks, and built-in Coherence health checks will then appear as Coherence MBeans and can also be queried using the Coherence REST management and health APIs.
- Since:
- 22.06
- Author:
- Jonathan Knight 2022.02.14
- See Also:
Registry.register(HealthCheck),Registry.unregister(HealthCheck),Registry.getHealthChecks()
-
-
Field Summary
Fields Modifier and Type Field Description static StringPATH_HEALTHZThe http request path for the healthz endpoint.static StringPATH_LIVEThe http request path for the live endpoint.static StringPATH_READYThe http request path for the ready endpoint.static StringPATH_SAFEThe http request path for the safe endpoint.static StringPATH_STARTEDThe http request path for the started endpoint.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description StringgetName()Returns the unique name of this health check.booleanisLive()Returns {@link true} if the resource represented by thisHealthCheckis alive, otherwise returnsfalse.default booleanisMemberHealthCheck()Returntrueif thisHealthCheckshould be included when working out this Coherence member's health status.booleanisReady()Returns {@link true} if the resource represented by thisHealthCheckis ready, otherwise returnsfalse.booleanisSafe()Returns {@link true} if the resource represented by thisHealthCheckis in a safe state to allow a rolling upgrade to proceed, otherwise returnsfalse.booleanisStarted()Returns {@link true} if the resource represented by thisHealthCheckis started, otherwise returnsfalse.
-
-
-
Field Detail
-
PATH_READY
static final String PATH_READY
The http request path for the ready endpoint.- See Also:
- Constant Field Values
-
PATH_LIVE
static final String PATH_LIVE
The http request path for the live endpoint.- See Also:
- Constant Field Values
-
PATH_HEALTHZ
static final String PATH_HEALTHZ
The http request path for the healthz endpoint.- See Also:
- Constant Field Values
-
PATH_STARTED
static final String PATH_STARTED
The http request path for the started endpoint.- See Also:
- Constant Field Values
-
PATH_SAFE
static final String PATH_SAFE
The http request path for the safe endpoint.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Returns the unique name of this health check.- Returns:
- the unique name of this health check
-
isMemberHealthCheck
default boolean isMemberHealthCheck()
Returntrueif thisHealthCheckshould be included when working out this Coherence member's health status.- Returns:
trueif thisHealthCheckshould be included in the member's health status
-
isReady
boolean isReady()
Returns {@link true} if the resource represented by thisHealthCheckis ready, otherwise returnsfalse.The concept of what "ready" means may vary for different types of resources.
- Returns:
- {@link true} if the resource represented by this
HealthCheckis ready, otherwisefalse
-
isLive
boolean isLive()
Returns {@link true} if the resource represented by thisHealthCheckis alive, otherwise returnsfalse.The concept of what "alive" means may vary for different types of resources.
- Returns:
- {@link true} if the resource represented by this
HealthCheckis alive, otherwise returnsfalse
-
isStarted
boolean isStarted()
Returns {@link true} if the resource represented by thisHealthCheckis started, otherwise returnsfalse.The concept of what "started" means may vary for different types of resources.
- Returns:
- {@link true} if the resource represented by this
HealthCheckis started, otherwise returnsfalse
-
isSafe
boolean isSafe()
Returns {@link true} if the resource represented by thisHealthCheckis in a safe state to allow a rolling upgrade to proceed, otherwise returnsfalse.The concept of what "safe" means may vary for different types of resources.
- Returns:
- {@link true} if the resource represented by this
HealthCheckis in a safe state to allow a rolling upgrade to proceed, otherwise returnsfalse
-
-