public class ExecutorWrapper
extends java.lang.Object
implements java.lang.AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.ExecutorService |
executor |
protected java.lang.String |
name |
| Constructor and Description |
|---|
ExecutorWrapper(int threads,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
queueRunnable(java.lang.Runnable runnable) |
void |
shutdown() |
static void |
tryQueueRunnables(int threads,
java.lang.String name,
java.lang.Runnable... runnables) |
protected final java.util.concurrent.ExecutorService executor
protected final java.lang.String name
public void queueRunnable(java.lang.Runnable runnable)
public void shutdown()
public void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic static void tryQueueRunnables(int threads,
java.lang.String name,
java.lang.Runnable... runnables)