Package com.codahale.metrics.health.jvm
Class ThreadDeadlockHealthCheck
java.lang.Object
com.codahale.metrics.health.HealthCheck
com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck
A health check which returns healthy if no threads are deadlocked.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck
HealthCheck.Result, HealthCheck.ResultBuilder -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new health check.ThreadDeadlockHealthCheck(com.codahale.metrics.jvm.ThreadDeadlockDetector detector) Creates a new health check with the given detector. -
Method Summary
Modifier and TypeMethodDescriptionprotected HealthCheck.Resultcheck()Perform a check of the application component.Methods inherited from class com.codahale.metrics.health.HealthCheck
clock, execute
-
Constructor Details
-
ThreadDeadlockHealthCheck
public ThreadDeadlockHealthCheck()Creates a new health check. -
ThreadDeadlockHealthCheck
public ThreadDeadlockHealthCheck(com.codahale.metrics.jvm.ThreadDeadlockDetector detector) Creates a new health check with the given detector.- Parameters:
detector- a thread deadlock detector
-
-
Method Details
-
check
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
-