Interface Shutdownable

    • Method Detail

      • shutdown

        void shutdown()
        Starts the shutdown process. It is recommended to perform the actual shutdown activity in a separate thread from the thread that calls shutdown
      • waitForShutdown

        void waitForShutdown()
                      throws java.lang.InterruptedException,
                             java.lang.IllegalStateException
        Waits for shutdown to complete
        Throws:
        java.lang.InterruptedException - when the wait is interrupted
        java.lang.IllegalStateException - when the method is invoked when the shutdown has yet to be started
      • waitForShutdown

        void waitForShutdown​(long timeoutInMs)
                      throws java.lang.InterruptedException,
                             java.lang.IllegalStateException,
                             java.util.concurrent.TimeoutException
        Waits for shutdown to complete with a timeout
        Parameters:
        timeoutInMs - number of milliseconds to wait before throwing TimeoutException
        Throws:
        java.lang.InterruptedException - when the wait is interrupted
        java.lang.IllegalStateException - when the method is invoked when the shutdown has yet to be started
        java.util.concurrent.TimeoutException - when the operation times out
      • shutdownNow

        static boolean shutdownNow​(java.lang.Object object)