public class SynchronousExecutorService extends AbstractExecutorService
ExecutorService
which always invokes
the task in the caller thread (just a thread pool facade).
There is no task queue, and no thread pool. The task will thus always be executed
by the caller thread in a fully synchronous method invocation.
This implementation is very simple and does not support waiting for tasks to complete during shutdown.Constructor and Description |
---|
SynchronousExecutorService() |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long time,
TimeUnit unit) |
void |
execute(Runnable runnable) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
public SynchronousExecutorService()
public void shutdown()
public List<Runnable> shutdownNow()
public boolean isShutdown()
public boolean isTerminated()
public boolean awaitTermination(long time, TimeUnit unit) throws InterruptedException
InterruptedException
Apache Camel