java.lang.Object
java.util.concurrent.AbstractExecutorService
org.apache.lucene.util.SameThreadExecutorService
- All Implemented Interfaces:
AutoCloseable,Executor,ExecutorService
An
ExecutorService that executes tasks immediately in the calling thread during submit.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) private voidvoidbooleanbooleanvoidshutdown()Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.ExecutorService
close
-
Field Details
-
shutdown
private volatile boolean shutdown
-
-
Constructor Details
-
SameThreadExecutorService
public SameThreadExecutorService()
-
-
Method Details
-
execute
-
shutdownNow
-
shutdown
public void shutdown() -
isTerminated
public boolean isTerminated() -
isShutdown
public boolean isShutdown() -
awaitTermination
- Throws:
InterruptedException
-
checkShutdown
private void checkShutdown()
-