public final class SameThreadExecutorService
extends java.util.concurrent.AbstractExecutorService
Simple implementation of a ExecutorService executing all tasks in the caller thread.
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit) |
static java.util.concurrent.ExecutorService |
create()
Creates new executor service instance.
|
void |
execute(java.lang.Runnable command) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
java.util.List<java.lang.Runnable> |
shutdownNow() |
public static java.util.concurrent.ExecutorService create()
Creates new executor service instance.
public boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic boolean isShutdown()
public boolean isTerminated()
public void shutdown()
public java.util.List<java.lang.Runnable> shutdownNow()
public void execute(java.lang.Runnable command)