public abstract class MultiThreadDispatcher extends AbstractLifecycleDispatcher
Modifier and Type | Class and Description |
---|---|
protected class |
MultiThreadDispatcher.MultiThreadTask |
AbstractLifecycleDispatcher.Task
context, 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, tryDispatch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
remainingSlots
awaitAndShutdown
protected MultiThreadDispatcher(int numberThreads, int backlog)
public boolean supportsOrdering()
Dispatcher
public long backlogSize()
Dispatcher
RingBufferDispatcher
will return
RingBuffer.getBufferSize()
.
public int poolSize()
protected void scheduleLater(AbstractLifecycleDispatcher.Task task)
scheduleLater
in class AbstractLifecycleDispatcher
protected AbstractLifecycleDispatcher.Task allocateRecursiveTask()
allocateRecursiveTask
in class AbstractLifecycleDispatcher
protected AbstractLifecycleDispatcher.Task allocateTask()
allocateTask
in class AbstractLifecycleDispatcher
protected AbstractLifecycleDispatcher.Task tryAllocateTask() throws InsufficientCapacityException
tryAllocateTask
in class AbstractLifecycleDispatcher
InsufficientCapacityException
Copyright © 2016. All rights reserved.