Package io.dropwizard.metrics5.jvm
Class ThreadDeadlockDetector
java.lang.Object
io.dropwizard.metrics5.jvm.ThreadDeadlockDetector
A utility class for detecting deadlocked threads.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new detector.ThreadDeadlockDetector
(ThreadMXBean threads) Creates a new detector using the givenThreadMXBean
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a set of diagnostic stack traces for any deadlocked threads.
-
Constructor Details
-
ThreadDeadlockDetector
public ThreadDeadlockDetector()Creates a new detector. -
ThreadDeadlockDetector
Creates a new detector using the givenThreadMXBean
.- Parameters:
threads
- aThreadMXBean
-
-
Method Details
-
getDeadlockedThreads
Returns a set of diagnostic stack traces for any deadlocked threads. If no threads are deadlocked, returns an empty set.- Returns:
- stack traces for deadlocked threads or an empty set
-