Interface PausableExecutorService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addExecutorTerminatedListener​(ExecutorTerminatedListener listener)
      Adds the given listener to the list of listeners that will be notified when the executor terminates.
      void pause()
      Pauses the executor, so that no new task will be executed until resume() is called.
      void removeExecutorTerminatedListener​(ExecutorTerminatedListener listener)
      Removes the given listener from the list of listeners that are notified when the executor terminates.
      void resume()
      Resumes the executor, so that the awaiting tasks are executed.
      • Methods inherited from interface java.util.concurrent.Executor

        execute
      • Methods inherited from interface java.util.concurrent.ExecutorService

        awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow, submit, submit, submit
    • Method Detail

      • pause

        void pause()
        Pauses the executor, so that no new task will be executed until resume() is called.
        See Also:
        resume()
      • resume

        void resume()
        Resumes the executor, so that the awaiting tasks are executed.

        The call to this method has no effect if the executor is not paused.

        See Also:
        pause()