Package org.apache.camel.util.concurrent
Class SynchronousExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
org.apache.camel.util.concurrent.SynchronousExecutorService
- All Implemented Interfaces:
Executor
,ExecutorService
A synchronous
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long time, TimeUnit unit) void
boolean
boolean
void
shutdown()
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
-
Constructor Details
-
SynchronousExecutorService
public SynchronousExecutorService()
-
-
Method Details
-
shutdown
-
shutdownNow
-
isShutdown
-
isTerminated
-
awaitTermination
- Throws:
InterruptedException
-
execute
-