@ConsumerType
public interface HealthCheck
Result
.
Clients should not look up health checks directly but
rather use the HealthCheckExecutor
service and executed checks based on tags.
If the MBEAN_NAME
service registration property is set,
the health check is registered as an mbean and can be invoked
by getting the MBean from the JMX registry.Modifier and Type | Field and Description |
---|---|
static String |
ASYNC_CRON_EXPRESSION
Optional service property: If this property is set the health check
will be executed asynchronously using the cron expression provided.
|
static String |
MBEAN_NAME
Optional service property: the name of the MBean for registering
the health check as an MBean.
|
static String |
NAME
Optional service property: the name of a health check.
|
static String |
RESULT_CACHE_TTL_IN_MS
Optional service property: TTL for health check
Result . |
static String |
TAGS
Optional service property: tags for categorizing the health check
services.
|
Modifier and Type | Method and Description |
---|---|
Result |
execute()
Execute this health check and return a
Result
This is meant to execute quickly, access to external
systems, for example, should be managed asynchronously. |
static final String NAME
static final String MBEAN_NAME
static final String TAGS
static final String ASYNC_CRON_EXPRESSION
static final String RESULT_CACHE_TTL_IN_MS
Result
.
The value of this property must be of type Long
and is
specified in ms.Copyright © 2017 The Apache Software Foundation. All rights reserved.