Package com.yahoo.protect
Class Process
- java.lang.Object
-
- com.yahoo.protect.Process
-
public final class Process extends java.lang.Object
A class for interacting with the global state of the running VM.- Author:
- Steinar Knutsen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Process.ShutdownError
-
Constructor Summary
Constructors Constructor Description Process()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
dumpThreads()
static void
logAndDie(java.lang.String message)
Die with a message, without dumping thread statestatic void
logAndDie(java.lang.String message, boolean dumpThreads)
Die with a message, optionally dumping thread statestatic void
logAndDie(java.lang.String message, java.lang.Throwable thrown)
Die with a message containing an exception, without dumping thread statestatic void
logAndDie(java.lang.String message, java.lang.Throwable thrown, boolean dumpThreads)
Log message as severe error, then forcibly exit runtime, without running exit handlers or otherwise waiting for cleanup.
-
-
-
Method Detail
-
logAndDie
public static void logAndDie(java.lang.String message)
Die with a message, without dumping thread state
-
logAndDie
public static void logAndDie(java.lang.String message, boolean dumpThreads)
Die with a message, optionally dumping thread state
-
logAndDie
public static void logAndDie(java.lang.String message, java.lang.Throwable thrown)
Die with a message containing an exception, without dumping thread state
-
logAndDie
public static void logAndDie(java.lang.String message, java.lang.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 exitthrown
- 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
-
dumpThreads
public static void dumpThreads()
-
-