ExecutorService

Extends
Executor
Methods
4
Fields
None

Methods

MethodReturnsDescription
submit(() -> ())ScheduledFutureRun task at the next invoke point; the future answers isDone() once it ran and cancel(...) before. After shutdown() it is `Rejected…
shutdown()()Refuse new tasks and cancel the periodic ones; delayed one-shots still run, as ScheduledThreadPoolExecutor's do by default.
isShutdown()booleanWhether shutdown() (or shutdownNow()) was called.
isTerminated()booleanWhether it is shut down and no task of it is left to run.

Method details

submit

submit: (ExecutorService, () -> ()) -> ScheduledFuture

Run task at the next invoke point; the future answers isDone() once it ran and cancel(...) before. After shutdown() it is RejectedExecutionException.

shutdown

shutdown: (ExecutorService) -> ()

Refuse new tasks and cancel the periodic ones; delayed one-shots still run, as ScheduledThreadPoolExecutor's do by default.