Interface ExecutorServiceManager

    • Method Detail

      • start

        void start()
      • shutdownGracefully

        void shutdownGracefully()
      • shutdownNow

        void shutdownNow()
      • isShutdown

        boolean isShutdown()
      • isTerminated

        boolean isTerminated()
        Returns true if all tasks have completed following shut down. Note that isTerminated is never true unless either shutdown or shutdownNow was called first.
        Returns:
        true if all tasks have completed following shut down
      • awaitTermination

        boolean awaitTermination​(long timeout,
                                 TimeUnit unit)
                          throws InterruptedException
        Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
        Parameters:
        timeout - the maximum time to wait
        unit - the time unit of the timeout argument
        Returns:
        true if this executor terminated and false if the timeout elapsed before termination
        Throws:
        InterruptedException - if interrupted while waiting