Class InlineExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
org.apache.tomcat.util.threads.InlineExecutorService
- All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService
An executor service that runs tasks inline on the calling thread. Useful for testing
and scenarios where asynchronous execution is not required.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) voidbooleanbooleanvoidshutdown()Methods inherited from class AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ExecutorService
close
-
Constructor Details
-
InlineExecutorService
public InlineExecutorService()Creates a new inline executor service.
-
-
Method Details
-
shutdown
public void shutdown() -
shutdownNow
-
isShutdown
public boolean isShutdown() -
isTerminated
public boolean isTerminated() -
awaitTermination
- Throws:
InterruptedException
-
execute
-