Package io.dropwizard.metrics5.jvm
Class ThreadDump
java.lang.Object
io.dropwizard.metrics5.jvm.ThreadDump
public class ThreadDump extends Object
A convenience class for getting a thread dump.
-
Constructor Summary
Constructors Constructor Description ThreadDump(ThreadMXBean threadMXBean)
-
Method Summary
Modifier and Type Method Description void
dump(boolean lockedMonitors, boolean lockedSynchronizers, OutputStream out)
Dumps all of the threads' current information, optionally including synchronization, to an output stream.void
dump(OutputStream out)
Dumps all of the threads' current information, including synchronization, to an output stream.
-
Constructor Details
-
ThreadDump
-
-
Method Details
-
dump
Dumps all of the threads' current information, including synchronization, to an output stream.- Parameters:
out
- an output stream
-
dump
Dumps all of the threads' current information, optionally including synchronization, to an output stream. Having control over including synchronization info allows using this method (and its wrappers, i.e. ThreadDumpServlet) in environments where getting object monitor and/or ownable synchronizer usage is not supported. It can also speed things up. SeeThreadMXBean.dumpAllThreads(boolean, boolean)
- Parameters:
lockedMonitors
- dump all locked monitors if truelockedSynchronizers
- dump all locked ownable synchronizers if trueout
- an output stream
-