Package com.tangosol.util
Interface HealthCheck
public interface HealthCheck
A class that can return its health status
Applications 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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe http request path for the healthz endpoint.static final StringThe http request path for the live endpoint.static final StringThe http request path for the ready endpoint.static final StringThe http request path for the safe endpoint.static final StringThe http request path for the started endpoint. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the unique name of this health check.booleanisLive()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis alive, otherwise returnsfalse.default booleanReturntrueif thisHealthCheckshould be included when working out this Coherence member's health status.booleanisReady()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis ready, otherwise returnsfalse.booleanisSafe()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis in a safe state to allow a rolling upgrade to proceed, otherwise returnsfalse.booleanReturns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis started, otherwise returnsfalse.
-
Field Details
-
PATH_READY
The http request path for the ready endpoint.- See Also:
-
PATH_LIVE
The http request path for the live endpoint.- See Also:
-
PATH_HEALTHZ
The http request path for the healthz endpoint.- See Also:
-
PATH_STARTED
The http request path for the started endpoint.- See Also:
-
PATH_SAFE
The http request path for the safe endpoint.- See Also:
-
-
Method Details
-
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} if the resource represented by thisinvalid @link
{@link trueHealthCheckis ready, otherwise returnsfalse.The concept of what "ready" means may vary for different types of resources.
- Returns:
-
} if the resource represented by this
invalid @link
{@link trueHealthCheckis ready, otherwisefalse
-
isLive
boolean isLive()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis alive, otherwise returnsfalse.The concept of what "alive" means may vary for different types of resources.
- Returns:
-
} if the resource represented by this
invalid @link
{@link trueHealthCheckis alive, otherwise returnsfalse
-
isStarted
boolean isStarted()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis started, otherwise returnsfalse.The concept of what "started" means may vary for different types of resources.
- Returns:
-
} if the resource represented by this
invalid @link
{@link trueHealthCheckis started, otherwise returnsfalse
-
isSafe
boolean isSafe()Returns} if the resource represented by thisinvalid @link
{@link trueHealthCheckis 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:
-
} if the resource represented by this
invalid @link
{@link trueHealthCheckis in a safe state to allow a rolling upgrade to proceed, otherwise returnsfalse
-