Object
AbstractExecutorService
SameThreadExecutorService
- All Implemented Interfaces:
AutoCloseable
,Executor
,ExecutorService
Executes all tasks on same thread which submits them.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long timeout, TimeUnit unit) void
boolean
boolean
void
shutdown()
Methods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ExecutorService
close
-
Constructor Details
-
SameThreadExecutorService
public SameThreadExecutorService()
-
-
Method Details
-
shutdown
public void shutdown() -
shutdownNow
-
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
awaitTermination
- Throws:
InterruptedException
-
execute
-