public abstract class MultiThreadDispatcher extends AbstractLifecycleDispatcher
| Modifier and Type | Class and Description |
|---|---|
protected class |
MultiThreadDispatcher.MultiThreadTask |
AbstractLifecycleDispatcher.Taskcontext, DEFAULT_BUFFER_SIZE| Modifier | Constructor and Description |
|---|---|
protected |
MultiThreadDispatcher(int numberThreads,
int backlog) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractLifecycleDispatcher.Task |
allocateRecursiveTask() |
protected AbstractLifecycleDispatcher.Task |
allocateTask() |
long |
backlogSize()
Request the capacity for the underlying shared state structure.
|
int |
poolSize() |
protected void |
scheduleLater(AbstractLifecycleDispatcher.Task task) |
boolean |
supportsOrdering()
Inspect if the dispatcher supports ordered dispatching:
Single threaded dispatchers naturally preserve event ordering on dispatch.
|
protected AbstractLifecycleDispatcher.Task |
tryAllocateTask() |
alive, awaitAndShutdown, dispatch, execute, execute, forceShutdown, getContext, inContext, route, shutdown, toString, tryDispatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitremainingSlotsawaitAndShutdownprotected MultiThreadDispatcher(int numberThreads,
int backlog)
public boolean supportsOrdering()
Dispatcherpublic long backlogSize()
DispatcherRingBufferDispatcher will return
RingBuffer.getBufferSize().
public int poolSize()
protected void scheduleLater(AbstractLifecycleDispatcher.Task task)
scheduleLater in class AbstractLifecycleDispatcherprotected AbstractLifecycleDispatcher.Task allocateRecursiveTask()
allocateRecursiveTask in class AbstractLifecycleDispatcherprotected AbstractLifecycleDispatcher.Task allocateTask()
allocateTask in class AbstractLifecycleDispatcherprotected AbstractLifecycleDispatcher.Task tryAllocateTask() throws InsufficientCapacityException
tryAllocateTask in class AbstractLifecycleDispatcherInsufficientCapacityException