Package io.dropwizard.metrics5.jvm
Class ThreadDeadlockDetector
java.lang.Object
io.dropwizard.metrics5.jvm.ThreadDeadlockDetector
public class ThreadDeadlockDetector extends Object
A utility class for detecting deadlocked threads.
-
Constructor Summary
Constructors Constructor Description ThreadDeadlockDetector()Creates a new detector.ThreadDeadlockDetector(ThreadMXBean threads)Creates a new detector using the givenThreadMXBean. -
Method Summary
Modifier and Type Method Description Set<String>getDeadlockedThreads()Returns 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
-