public class SynchronousExecutor extends AbstractExecutorService
| Constructor and Description |
|---|
SynchronousExecutor(ExecutorService executor) |
SynchronousExecutor(ExecutorService executor,
boolean reverse) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long time,
TimeUnit unit) |
void |
execute(Runnable task) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks)
Executes the specified tasks serially, until the first successful result, then the remainder using the executor with which this executor was created.
|
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
newTaskFor, newTaskForpublic SynchronousExecutor(ExecutorService executor)
public SynchronousExecutor(ExecutorService executor, boolean reverse)
public boolean awaitTermination(long time, TimeUnit unit) throws InterruptedException
public boolean isShutdown()
ExecutorService.isShutdown()public boolean isTerminated()
ExecutorService.isTerminated()public void shutdown()
ExecutorService.shutdown()public List<Runnable> shutdownNow()
ExecutorService.shutdownNow()public void execute(Runnable task)
Executor.execute(java.lang.Runnable)public Future<?> submit(Runnable task)
submit in interface ExecutorServicesubmit in class AbstractExecutorServiceAbstractExecutorService.submit(java.lang.Runnable)public <T> Future<T> submit(Runnable task, T result)
submit in interface ExecutorServicesubmit in class AbstractExecutorServiceAbstractExecutorService.submit(java.lang.Runnable, java.lang.Object)public <T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServicesubmit in class AbstractExecutorServiceAbstractExecutorService.submit(java.util.concurrent.Callable)public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll in interface ExecutorServiceinvokeAll in class AbstractExecutorServiceInterruptedExceptionAbstractExecutorService.invokeAll(java.util.Collection)public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll in interface ExecutorServiceinvokeAll in class AbstractExecutorServiceInterruptedExceptionAbstractExecutorService.invokeAll(java.util.Collection, long, java.util.concurrent.TimeUnit)public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny in interface ExecutorServiceinvokeAny in class AbstractExecutorServiceInterruptedExceptionExecutionExceptionAbstractExecutorService.invokeAny(java.util.Collection)public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException
invokeAny in interface ExecutorServiceinvokeAny in class AbstractExecutorServiceInterruptedExceptionExecutionExceptionAbstractExecutorService.invokeAny(java.util.Collection, long, java.util.concurrent.TimeUnit)Copyright © 2004–2014 Paul Ferraro. All rights reserved.