Package com.yahoo.container.protect
Class ProcessTerminator
- java.lang.Object
-
- com.yahoo.container.protect.ProcessTerminator
-
public class ProcessTerminator extends Object
An injectable terminator of the Java vm. Components that encounters conditions where the vm should be terminated should request an instance of this injected. That makes termination testable as tests can create subclasses of this which register the termination request rather than terminating.- Author:
- bratseth
-
-
Constructor Summary
Constructors Constructor Description ProcessTerminator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
logAndDie(String message)
Logs and dies without taking a thread dumpvoid
logAndDie(String message, boolean dumpThreads)
Logs and dies
-
-
-
Method Detail
-
logAndDie
public void logAndDie(String message)
Logs and dies without taking a thread dump
-
logAndDie
public void logAndDie(String message, boolean dumpThreads)
Logs and dies- Parameters:
dumpThreads
- if true the stack trace of all threads is dumped to the log with level info before shutting down
-
-