public static final class ProcessTerminatingFaultHandler.Builder extends Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ProcessTerminatingFaultHandler |
build() |
ProcessTerminatingFaultHandler.Builder |
setAction(Runnable action)
Set the
Runnable to run when handling a fault. |
ProcessTerminatingFaultHandler.Builder |
setShouldHalt(boolean value)
Set if halt or exit should be used.
|
public ProcessTerminatingFaultHandler.Builder setShouldHalt(boolean value)
value is false Exit.exit is called, otherwise Exit.halt is
called. The default value is true.
The default implementation of Exit.exit calls Runtime.exit which
blocks on all of the shutdown hooks executing.
The default implementation of Exit.halt calls Runtime.halt which
forcibly terminates the JVM.public ProcessTerminatingFaultHandler.Builder setAction(Runnable action)
Runnable to run when handling a fault.public ProcessTerminatingFaultHandler build()