Class ThreadDump


  • public class ThreadDump
    extends java.lang.Object
    A convenience class for getting a thread dump.

    Note: Adjusted from Dropwizard metrics to perform grouping of threads.

    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadDump​(java.lang.management.ThreadMXBean threadMXBean)  
      ThreadDump​(java.lang.management.ThreadMXBean threadMXBean, java.util.Comparator<java.util.Map.Entry<java.util.List<java.lang.StackTraceElement>,​java.util.List<java.lang.management.ThreadInfo>>> comparator)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String dump​(boolean lockedMonitors, boolean lockedSynchronizers)
      Dumps all of the threads' current informationas a string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ThreadDump

        public ThreadDump​(java.lang.management.ThreadMXBean threadMXBean)
      • ThreadDump

        public ThreadDump​(java.lang.management.ThreadMXBean threadMXBean,
                          java.util.Comparator<java.util.Map.Entry<java.util.List<java.lang.StackTraceElement>,​java.util.List<java.lang.management.ThreadInfo>>> comparator)
    • Method Detail

      • dump

        public java.lang.String dump​(boolean lockedMonitors,
                                     boolean lockedSynchronizers)
        Dumps all of the threads' current informationas a string.
        Parameters:
        lockedMonitors - if true, dump all locked monitors.
        lockedSynchronizers - if true, dump all locked ownable synchronizers.