Package org.apache.cassandra.utils
Class JVMStabilityInspector
- java.lang.Object
-
- org.apache.cassandra.utils.JVMStabilityInspector
-
public final class JVMStabilityInspector extends java.lang.ObjectResponsible for deciding whether to kill the JVM if it gets in an "unstable" state (think OOM).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJVMStabilityInspector.Killerstatic interfaceJVMStabilityInspector.OnKillHookThis class is usually used to avoid JVM exit when running junit tests.
-
Field Summary
Fields Modifier and Type Field Description static JVMStabilityInspector.OnKillHookkillerHook
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidinspectCommitLogThrowable(java.lang.Throwable t)static voidinspectThrowable(java.lang.Throwable t)Certain Throwables and Exceptions represent "Die" conditions for the server.static voidinspectThrowable(java.lang.Throwable t, java.util.function.Consumer<java.lang.Throwable> fn)static voidkillCurrentJVM(java.lang.Throwable t, boolean quiet)static JVMStabilityInspector.KillerreplaceKiller(JVMStabilityInspector.Killer newKiller)static voiduncaughtException(java.lang.Thread thread, java.lang.Throwable t)static voiduserFunctionTimeout(java.lang.Throwable t)
-
-
-
Field Detail
-
killerHook
public static JVMStabilityInspector.OnKillHook killerHook
-
-
Method Detail
-
uncaughtException
public static void uncaughtException(java.lang.Thread thread, java.lang.Throwable t)
-
inspectThrowable
public static void inspectThrowable(java.lang.Throwable t) throws java.lang.OutOfMemoryErrorCertain 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:
java.lang.OutOfMemoryError
-
inspectCommitLogThrowable
public static void inspectCommitLogThrowable(java.lang.Throwable t)
-
inspectThrowable
public static void inspectThrowable(java.lang.Throwable t, java.util.function.Consumer<java.lang.Throwable> fn) throws java.lang.OutOfMemoryError- Throws:
java.lang.OutOfMemoryError
-
killCurrentJVM
public static void killCurrentJVM(java.lang.Throwable t, boolean quiet)
-
userFunctionTimeout
public static void userFunctionTimeout(java.lang.Throwable t)
-
replaceKiller
public static JVMStabilityInspector.Killer replaceKiller(JVMStabilityInspector.Killer newKiller)
-
-