public class EventDispatcher
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
static int |
CONCURRENT_DISPATCHER_KEEP_ALIVE_SECONDS |
static int |
DEFAULT_DISPATCHER_POOL_SIZE |
| Constructor and Description |
|---|
EventDispatcher(int queueLength,
java.util.function.Supplier<java.util.concurrent.ThreadPoolExecutor> concurrentDispatcherSupplier) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.concurrent.ThreadPoolExecutor |
createConcurrentEventDispatcherPool(int coreSize,
int maxCoreSize,
int queueLength,
java.lang.String parentThreadName) |
java.util.Map<java.lang.String,java.lang.Long> |
getEventQueueStatistics() |
long |
getEventsProcessed() |
long |
getEventsScheduled() |
int |
getQueueLength() |
void |
queue(QueuedEvent ev,
FireEventRequestController request) |
void |
registerIncomingEvent() |
void |
registerProcessedEvent() |
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic static final int CONCURRENT_DISPATCHER_KEEP_ALIVE_SECONDS
public static final int DEFAULT_DISPATCHER_POOL_SIZE
public EventDispatcher(int queueLength,
java.util.function.Supplier<java.util.concurrent.ThreadPoolExecutor> concurrentDispatcherSupplier)
public static java.util.concurrent.ThreadPoolExecutor createConcurrentEventDispatcherPool(int coreSize,
int maxCoreSize,
int queueLength,
java.lang.String parentThreadName)
public void queue(QueuedEvent ev, FireEventRequestController request) throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic int getQueueLength()
public long getEventsProcessed()
public long getEventsScheduled()
public java.util.Map<java.lang.String,java.lang.Long> getEventQueueStatistics()
public void registerIncomingEvent()
public void registerProcessedEvent()