Package org.apache.cassandra.utils
Class JVMStabilityInspector
java.lang.Object
org.apache.cassandra.utils.JVMStabilityInspector
Responsible for deciding whether to kill the JVM if it gets in an "unstable" state (think OOM).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interfaceThis class is usually used to avoid JVM exit when running junit tests. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidCertain Throwables and Exceptions represent "Die" conditions for the server.static voidinspectThrowable(Throwable t, Consumer<Throwable> fn, boolean isUncaughtException) static voidkillCurrentJVM(Throwable t, boolean quiet) static JVMStabilityInspector.KillerreplaceKiller(JVMStabilityInspector.Killer newKiller) static voiduncaughtException(Thread thread, Throwable t) static void
-
Field Details
-
killerHook
-
-
Method Details
-
uncaughtException
-
inspectThrowable
Certain Throwables and Exceptions represent "Die" conditions for the server. This recursively checks the input Throwable's cause hierarchy until null.- Parameters:
t- The Throwable to check for server-stop conditions- Throws:
OutOfMemoryError
-
inspectCommitLogThrowable
-
inspectThrowable
public static void inspectThrowable(Throwable t, Consumer<Throwable> fn, boolean isUncaughtException) throws OutOfMemoryError - Throws:
OutOfMemoryError
-
killCurrentJVM
-
userFunctionTimeout
-
replaceKiller
-