Class JVMStabilityInspector


  • public final class JVMStabilityInspector
    extends java.lang.Object
    Responsible for deciding whether to kill the JVM if it gets in an "unstable" state (think OOM).
    • 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.OutOfMemoryError
        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:
        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)