Class ThreadDump

java.lang.Object
io.dropwizard.metrics5.jvm.ThreadDump

public class ThreadDump extends Object
A convenience class for getting a thread dump.
  • Constructor Details

  • Method Details

    • dump

      public void dump(OutputStream out)
      Dumps all of the threads' current information, including synchronization, to an output stream.
      Parameters:
      out - an output stream
    • dump

      public void dump(boolean lockedMonitors, boolean lockedSynchronizers, OutputStream out)
      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. See ThreadMXBean.dumpAllThreads(boolean, boolean)
      Parameters:
      lockedMonitors - dump all locked monitors if true
      lockedSynchronizers - dump all locked ownable synchronizers if true
      out - an output stream