Class ForkedMain


  • class ForkedMain
    extends java.lang.Object
    Main program entry point for forked JVM instance
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  ForkedMain.HangupThread
      Hangup thread will detach us from the host VM properly, in three cases: - normal shutdown - shutdown with benchmark exception - any System.exit call The need to intercept System.exit calls is the reason to register ourselves as the shutdown hook.
      private static class  ForkedMain.ShutdownTimeoutThread
      Shutdown timeout thread will forcefully exit the VM in two cases: - stray non-daemon thread prevents the VM from exiting - all user threads have finished, but we are stuck in some shutdown hook or finalizer In all other "normal" cases, VM will exit before the timeout expires.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.Throwable exception  
      private static boolean gracefullyFinished  
      private static java.util.concurrent.atomic.AtomicBoolean hangupFuse  
      private static java.util.concurrent.atomic.AtomicReference<BinaryLinkClient> linkRef  
      private static java.io.PrintStream nakedErr  
    • Constructor Summary

      Constructors 
      Constructor Description
      ForkedMain()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void hangup()
      Report our latest status to the host VM, and say goodbye.
      static void main​(java.lang.String[] argv)
      Application main entry point
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • hangupFuse

        private static final java.util.concurrent.atomic.AtomicBoolean hangupFuse
      • linkRef

        private static final java.util.concurrent.atomic.AtomicReference<BinaryLinkClient> linkRef
      • gracefullyFinished

        private static volatile boolean gracefullyFinished
      • exception

        private static volatile java.lang.Throwable exception
      • nakedErr

        private static volatile java.io.PrintStream nakedErr
    • Constructor Detail

      • ForkedMain

        ForkedMain()
    • Method Detail

      • main

        public static void main​(java.lang.String[] argv)
        Application main entry point
        Parameters:
        argv - Command line arguments
      • hangup

        static void hangup()
        Report our latest status to the host VM, and say goodbye.