Class Process


  • public final class Process
    extends Object
    A class for interacting with the global state of the running VM.
    Author:
    Steinar Knutsen
    • Constructor Detail

      • Process

        public Process()
    • Method Detail

      • logAndDie

        public static void logAndDie​(String message)
        Die with a message, without dumping thread state
      • logAndDie

        public static void logAndDie​(String message,
                                     boolean dumpThreads)
        Die with a message, optionally dumping thread state
      • logAndDie

        public static void logAndDie​(String message,
                                     Throwable thrown)
        Die with a message containing an exception, without dumping thread state
      • logAndDie

        public static void logAndDie​(String message,
                                     Throwable thrown,
                                     boolean dumpThreads)
        Log message as severe error, then forcibly exit runtime, without running exit handlers or otherwise waiting for cleanup.
        Parameters:
        message - message to log before exit
        thrown - the throwable that caused the application to exit.
        dumpThreads - if true the stack trace of all threads is dumped to the log with level info before shutting down
      • dumpHeap

        public static void dumpHeap​(String filePath,
                                    boolean live)
      • dumpThreads

        public static void dumpThreads()