public class CallingThreadDispatcher
extends akka.dispatch.MessageDispatcher
Suspending and resuming are global actions for one actor, meaning they can affect different threads, which leads to complications. If messages are queued (thread-locally) during the suspendSwitch period, the only thread to run them upon resume is the thread actually calling the resume method. Hence, all thread-local queues which are not currently being drained (possible, since suspend-queue-resume might happen entirely during an invocation on a different thread) are scooped up into the current thread-local queue which is then executed. It is possible to suspend an actor from within its call stack.
Constructor and Description |
---|
CallingThreadDispatcher(akka.dispatch.MessageDispatcherConfigurator _configurator) |
Modifier and Type | Method and Description |
---|---|
protected CallingThreadMailbox |
createMailbox(akka.actor.Cell actor,
akka.dispatch.MailboxType mailboxType) |
protected void |
dispatch(akka.actor.ActorCell receiver,
akka.dispatch.Envelope handle) |
protected void |
executeTask(akka.dispatch.TaskInvocation invocation) |
java.lang.String |
id() |
static java.lang.String |
Id() |
akka.event.LoggingAdapter |
log() |
protected void |
register(akka.actor.ActorCell actor) |
protected boolean |
registerForExecution(akka.dispatch.Mailbox mbox,
boolean hasMessageHint,
boolean hasSystemMessageHint) |
protected void |
resume(akka.actor.ActorCell actor) |
protected void |
shutdown() |
protected scala.concurrent.duration.FiniteDuration |
shutdownTimeout() |
protected void |
suspend(akka.actor.ActorCell actor) |
protected void |
systemDispatch(akka.actor.ActorCell receiver,
akka.dispatch.sysmsg.SystemMessage message) |
protected int |
throughput() |
protected scala.concurrent.duration.FiniteDuration |
throughputDeadlineTime() |
protected void |
unregister(akka.actor.ActorCell actor) |
actors, akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_blockContext_$eq, akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_tasksLocal_$eq, akka$dispatch$BatchingExecutor$$_blockContext, akka$dispatch$BatchingExecutor$$_tasksLocal, akka$dispatch$MessageDispatcher$$addInhabitants, akka$dispatch$MessageDispatcher$$ifSensibleToDoSoThenScheduleShutdown, akka$dispatch$MessageDispatcher$$scheduleShutdownAction, akka$dispatch$MessageDispatcher$$shutdownSchedule, akka$dispatch$MessageDispatcher$$updateShutdownSchedule, attach, batchable, configurator, debug, detach, eventStream, execute, inhabitants, isThroughputDeadlineTimeDefined, mailboxes, prepare, printActors, reportFailure, RESCHEDULED, resubmitOnBlock, SCHEDULED, unbatchedExecute, UNSCHEDULED
public CallingThreadDispatcher(akka.dispatch.MessageDispatcherConfigurator _configurator)
public static java.lang.String Id()
public akka.event.LoggingAdapter log()
public java.lang.String id()
id
in class akka.dispatch.MessageDispatcher
protected CallingThreadMailbox createMailbox(akka.actor.Cell actor, akka.dispatch.MailboxType mailboxType)
createMailbox
in class akka.dispatch.MessageDispatcher
protected void shutdown()
shutdown
in class akka.dispatch.MessageDispatcher
protected int throughput()
throughput
in class akka.dispatch.MessageDispatcher
protected scala.concurrent.duration.FiniteDuration throughputDeadlineTime()
throughputDeadlineTime
in class akka.dispatch.MessageDispatcher
protected boolean registerForExecution(akka.dispatch.Mailbox mbox, boolean hasMessageHint, boolean hasSystemMessageHint)
registerForExecution
in class akka.dispatch.MessageDispatcher
protected scala.concurrent.duration.FiniteDuration shutdownTimeout()
shutdownTimeout
in class akka.dispatch.MessageDispatcher
protected void register(akka.actor.ActorCell actor)
register
in class akka.dispatch.MessageDispatcher
protected void unregister(akka.actor.ActorCell actor)
unregister
in class akka.dispatch.MessageDispatcher
protected void suspend(akka.actor.ActorCell actor)
suspend
in class akka.dispatch.MessageDispatcher
protected void resume(akka.actor.ActorCell actor)
resume
in class akka.dispatch.MessageDispatcher
protected void systemDispatch(akka.actor.ActorCell receiver, akka.dispatch.sysmsg.SystemMessage message)
systemDispatch
in class akka.dispatch.MessageDispatcher
protected void dispatch(akka.actor.ActorCell receiver, akka.dispatch.Envelope handle)
dispatch
in class akka.dispatch.MessageDispatcher
protected void executeTask(akka.dispatch.TaskInvocation invocation)
executeTask
in class akka.dispatch.MessageDispatcher