Class ThreadDeadlockHealthCheck
java.lang.Object
io.dropwizard.metrics5.health.jvm.ThreadDeadlockHealthCheck
- All Implemented Interfaces:
HealthCheck
A health check which returns healthy if no threads are deadlocked.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.dropwizard.metrics5.health.HealthCheck
HealthCheck.Result, HealthCheck.ResultBuilder -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new health check.ThreadDeadlockHealthCheck(io.dropwizard.metrics5.jvm.ThreadDeadlockDetector detector) Creates a new health check with the given detector. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.dropwizard.metrics5.health.HealthCheck
clock, execute
-
Constructor Details
-
ThreadDeadlockHealthCheck
public ThreadDeadlockHealthCheck()Creates a new health check. -
ThreadDeadlockHealthCheck
public ThreadDeadlockHealthCheck(io.dropwizard.metrics5.jvm.ThreadDeadlockDetector detector) Creates a new health check with the given detector.- Parameters:
detector- a thread deadlock detector
-
-
Method Details
-
check
Description copied from interface:HealthCheckPerform a check of the application component.- Specified by:
checkin interfaceHealthCheck- 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
-