Class PausedExecutorService

    • Constructor Detail

      • PausedExecutorService

        public PausedExecutorService()
    • Method Detail

      • runAll

        public int runAll()
        Execute all posted tasks and block until they are complete.
        Returns:
        the number of tasks executed
      • runNext

        public boolean runNext()
        Executes the next queued task. Will be ignored if called from the executor service thread to prevent deadlocks.
        Returns:
        true if task was run, false if queue was empty
      • hasQueuedTasks

        public boolean hasQueuedTasks()
        Returns:
        true if there are queued pending tasks
      • shutdown

        public void shutdown()
      • isShutdown

        public boolean isShutdown()
      • isTerminated

        public boolean isTerminated()
      • execute

        public void execute​(@NonNull
                            Runnable command)