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 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, tryDispatch
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
remainingSlots
awaitAndShutdown
protected final List<AbstractLifecycleDispatcher.Task> tailRecursionPile
protected final int backlog
protected int tailRecurseSeq
protected int tailRecursionPileSize
public boolean supportsOrdering()
Dispatcher
public long backlogSize()
Dispatcher
RingBufferDispatcher
will return
RingBuffer.getBufferSize()
.
public int getTailRecursionPileSize()
protected void expandTailRecursionPile(int amount)
protected AbstractLifecycleDispatcher.Task allocateRecursiveTask()
allocateRecursiveTask
in class AbstractLifecycleDispatcher
protected abstract AbstractLifecycleDispatcher.Task allocateTask()
allocateTask
in class AbstractLifecycleDispatcher
Copyright © 2017. All rights reserved.