- All Superinterfaces:
Executor
Extends
Executor
with additional features.- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> List
<T> callAll
(Collection<? extends Callable<? extends T>> tasks) Calls all of the tasks concurrently, waiting for them to all complete.void
void
runAll
(Collection<? extends Runnable> tasks) Runs all of the tasks concurrently, waiting for them to all complete.Future
<?> Submits to the executor.Future
<?> Submits to the executor after the provided delay.<T> Future
<T> Submits to the executor, returning the provided value on success.<T> Future
<T> Submits to the executor after the provided delay, returning the provided value on success.<T> Future
<T> Submits to the executor.<T> Future
<T> Submits to the executor after the provided delay.
-
Method Details
-
execute
-
submit
Submits to the executor.- Throws:
IllegalStateException
- if already closed.- See Also:
-
callAll
<T> List<T> callAll(Collection<? extends Callable<? extends T>> tasks) throws IllegalStateException, InterruptedException, ExecutionException Calls all of the tasks concurrently, waiting for them to all complete. If there is only one task, it is called on the current thread. Rather than just have the current thread waiting, the last task is called by the current thread.- Parameters:
tasks
- Only iterated once in this implementation- Throws:
IllegalStateException
- if already closed.InterruptedException
ExecutionException
- See Also:
-
submit
Submits to the executor after the provided delay.- Parameters:
delay
- if less than zero, will use zero delay- Throws:
IllegalStateException
- if already closed.- See Also:
-
submit
Submits to the executor, returning the provided value on success.- Throws:
IllegalStateException
- if already closed.- See Also:
-
submit
Submits to the executor.- Throws:
IllegalStateException
- if already closed.- See Also:
-
runAll
void runAll(Collection<? extends Runnable> tasks) throws IllegalStateException, InterruptedException, ExecutionException Runs all of the tasks concurrently, waiting for them to all complete. If there is only one task, it is ran on the current thread. Rather than just have the current thread waiting, the last task is ran by the current thread.- Parameters:
tasks
- Only iterated once in this implementation- Throws:
IllegalStateException
- if already closed.InterruptedException
ExecutionException
- See Also:
-
submit
Submits to the executor after the provided delay, returning the provided value on success.- Parameters:
delay
- if less than zero, will use zero delay- Throws:
IllegalStateException
- if already closed.- See Also:
-
submit
Submits to the executor after the provided delay.- Parameters:
delay
- if less than zero, will use zero delay- Throws:
IllegalStateException
- if already closed.- See Also:
-