public class ExecutorService
extends java.lang.Object
EventTypes can be submitted,
and a Runnable that handles the object that is added to the queue.
In order to create a new service, create an instance of this class and
then do: instance.startExecutorService("myService");. When done
call shutdown().
In order to use the service created above, call
submit(EventHandler).
| Modifier and Type | Class and Description |
|---|---|
static class |
ExecutorService.ExecutorStatus
A snapshot of the status of a particular executor.
|
static class |
ExecutorService.RunningEventStatus
The status of a particular event that is in the middle of being
handled by an executor.
|
| Constructor and Description |
|---|
ExecutorService(java.lang.String servername)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<java.lang.String,ExecutorService.ExecutorStatus> |
getAllExecutorStatuses() |
java.util.concurrent.ThreadPoolExecutor |
getExecutorThreadPool(ExecutorType type) |
void |
shutdown() |
void |
startExecutorService(ExecutorType type,
int maxThreads) |
void |
startExecutorService(java.lang.String name,
int maxThreads)
Start an executor service with a given name.
|
void |
submit(EventHandler eh) |
public ExecutorService(java.lang.String servername)
servername - Name of the hosting server.public void startExecutorService(java.lang.String name,
int maxThreads)
name - Name of the service to start.public void shutdown()
public java.util.concurrent.ThreadPoolExecutor getExecutorThreadPool(ExecutorType type)
public void startExecutorService(ExecutorType type, int maxThreads)
public void submit(EventHandler eh)
public java.util.Map<java.lang.String,ExecutorService.ExecutorStatus> getAllExecutorStatuses()