public class Executor
extends java.lang.Object
| 构造器和说明 |
|---|
Executor() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
execute(java.lang.Runnable runnable)
Sends a runnable to the executor service.
|
static java.util.concurrent.Future |
futureCallable(java.util.concurrent.Callable callable)
Sends a callable to the executor service and
returns a Future.
|
static java.util.concurrent.ExecutorService |
getExecutor()
If the executor is null creates a
new executor.
|
static void |
setThreadCount(int count)
Changes the amount of threads the
scheduler will be able to use.
|
static void |
shutdown()
Shuts the executor service down and resets
the executor to a null state.
|
static boolean |
status()
Returns the status of the executor.
|
public static java.util.concurrent.ExecutorService getExecutor()
public static void execute(java.lang.Runnable runnable)
runnable - the runnable to be queuedpublic static java.util.concurrent.Future futureCallable(java.util.concurrent.Callable callable)
callable - the callable to be queuedpublic static void shutdown()
public static boolean status()
public static void setThreadCount(int count)
count - the thread count