public final class SameThreadExecutorService
extends java.util.concurrent.AbstractExecutorService
ExecutorService
that executes tasks immediately in the calling thread during submit.Modifier and Type | Field and Description |
---|---|
private boolean |
shutdown |
Constructor and Description |
---|
SameThreadExecutorService() |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
private void |
checkShutdown() |
void |
execute(java.lang.Runnable command) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
public void execute(java.lang.Runnable command)
public java.util.List<java.lang.Runnable> shutdownNow()
public void shutdown()
public boolean isTerminated()
public boolean isShutdown()
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.lang.InterruptedException
private void checkShutdown()