https://sling.apache.org/documentation/bundles/sling-health-check-tool.html
for migration guide.@Deprecated
@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 java.lang.String |
ASYNC_CRON_EXPRESSION
Deprecated.
Optional service property: If this property is set the health check
will be executed asynchronously using the cron expression provided.
|
static java.lang.String |
MBEAN_NAME
Deprecated.
Optional service property: the name of the MBean for registering
the health check as an MBean.
|
static java.lang.String |
NAME
Deprecated.
Optional service property: the name of a health check.
|
static java.lang.String |
RESULT_CACHE_TTL_IN_MS
Deprecated.
Optional service property: TTL for health check
Result . |
static java.lang.String |
TAGS
Deprecated.
Optional service property: tags for categorizing the health check
services.
|
static java.lang.String |
WARNINGS_STICK_FOR_MINUTES
Deprecated.
Optional service property: If given, warning results (that is WARN,
CRITICAL or HEALTH_CHECK_ERROR) from the past executions will be
taken into account as well for the given minutes (use
Integer.MAX_VALUE for indefinitely).
|
Modifier and Type | Method and Description |
---|---|
Result |
execute()
Deprecated.
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 java.lang.String NAME
static final java.lang.String MBEAN_NAME
static final java.lang.String TAGS
static final java.lang.String ASYNC_CRON_EXPRESSION
static final java.lang.String RESULT_CACHE_TTL_IN_MS
Result
.
The value of this property must be of type Long
and is
specified in ms.static final java.lang.String WARNINGS_STICK_FOR_MINUTES
Copyright © 2022 The Apache Software Foundation. All rights reserved.