Class Threads

    • Method Detail

      • dumpAllThreads

        public static void dumpAllThreads​(org.slf4j.Logger logger)
        Creates a dump of all the threads' state and stack traces similar to what JVM produces when signal SIGQUIT is send to the process on Unix machine.

        Note: This is a best effort to dump as much information as possible because the Java API doesn't provide means to get all the information that is produced by jstack program for example.

        Parameters:
        logger - the logger where the collected information will be written
      • dumpSingleThread

        public static void dumpSingleThread​(org.slf4j.Logger logger,
                                            Thread thread)
        Creates a dump of the threads' state and stack traces similar to the one that the JVM produces when signal SIGQUIT is send to the process on Unix machine.

        Note: This is a best effort to dump as much information as possible because the Java API doesn't provide means to get all the information that is produced by jstack program for example.

        Parameters:
        logger - the logger where the collected information will be written
        thread - the thread to dump