Package com.codahale.metrics.health
Class AsyncHealthCheckDecorator
- java.lang.Object
-
- com.codahale.metrics.health.HealthCheck
-
- com.codahale.metrics.health.AsyncHealthCheckDecorator
-
- All Implemented Interfaces:
Runnable
public class AsyncHealthCheckDecorator extends HealthCheck implements Runnable
A health check decorator to manage asynchronous executions.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck
HealthCheck.Result, HealthCheck.ResultBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HealthCheck.Resultcheck()Perform a check of the application component.HealthCheckgetHealthCheck()voidrun()-
Methods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
-
-
-
Method Detail
-
check
protected HealthCheck.Result check() throws Exception
Description copied from class:HealthCheckPerform a check of the application component.- Specified by:
checkin classHealthCheck- Returns:
- if the component is healthy, a healthy
HealthCheck.Result; otherwise, an unhealthyHealthCheck.Resultwith a descriptive error message or exception - Throws:
Exception- if there is an unhandled error during the health check; this will result in a failed health check
-
getHealthCheck
public HealthCheck getHealthCheck()
-
-