public abstract class SingleThreadDispatcher extends AbstractLifecycleDispatcher
| Modifier and Type | Class and Description |
|---|---|
protected class |
SingleThreadDispatcher.SingleThreadTask |
AbstractLifecycleDispatcher.Task| Modifier and Type | Field and Description |
|---|---|
protected int |
backlog |
protected int |
tailRecurseSeq |
protected java.util.List<AbstractLifecycleDispatcher.Task> |
tailRecursionPile |
protected int |
tailRecursionPileSize |
context, DEFAULT_BUFFER_SIZE| Constructor and Description |
|---|
SingleThreadDispatcher(int backlog) |
| Modifier and Type | Method and Description |
|---|---|
protected AbstractLifecycleDispatcher.Task |
allocateRecursiveTask() |
protected abstract AbstractLifecycleDispatcher.Task |
allocateTask() |
long |
backlogSize()
Request the capacity for the underlying shared state structure.
|
protected void |
expandTailRecursionPile(int amount) |
int |
getTailRecursionPileSize() |
boolean |
supportsOrdering()
Inspect if the dispatcher supports ordered dispatching:
Single threaded dispatchers naturally preserve event ordering on dispatch.
|
alive, awaitAndShutdown, dispatch, execute, execute, forceShutdown, getContext, inContext, route, scheduleLater, shutdown, toString, tryAllocateTask, tryDispatchclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitremainingSlotsawaitAndShutdownprotected final java.util.List<AbstractLifecycleDispatcher.Task> tailRecursionPile
protected final int backlog
protected int tailRecurseSeq
protected int tailRecursionPileSize
public boolean supportsOrdering()
Dispatcherpublic long backlogSize()
DispatcherRingBufferDispatcher will return
RingBuffer.getBufferSize().
public int getTailRecursionPileSize()
protected void expandTailRecursionPile(int amount)
protected AbstractLifecycleDispatcher.Task allocateRecursiveTask()
allocateRecursiveTask in class AbstractLifecycleDispatcherprotected abstract AbstractLifecycleDispatcher.Task allocateTask()
allocateTask in class AbstractLifecycleDispatcher