Package akka.dispatch
Class Dispatcher
- java.lang.Object
-
- akka.dispatch.MessageDispatcher
-
- akka.dispatch.Dispatcher
-
- All Implemented Interfaces:
BatchingExecutor
,java.util.concurrent.Executor
,scala.concurrent.ExecutionContext
,scala.concurrent.ExecutionContextExecutor
- Direct Known Subclasses:
BalancingDispatcher
,PinnedDispatcher
public class Dispatcher extends MessageDispatcher
At first glance this var does not seem to be updated anywhere, but in fact it is, via the esUpdaterAtomicReferenceFieldUpdater
below.
-
-
Constructor Summary
Constructors Constructor Description Dispatcher(MessageDispatcherConfigurator _configurator, java.lang.String id, int throughput, scala.concurrent.duration.Duration throughputDeadlineTime, ExecutorServiceFactoryProvider executorServiceFactoryProvider, scala.concurrent.duration.FiniteDuration shutdownTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Mailbox
createMailbox(Cell actor, MailboxType mailboxType)
INTERNAL APIprotected void
dispatch(ActorCell receiver, Envelope invocation)
INTERNAL APIprotected void
executeTask(TaskInvocation invocation)
INTERNAL APIprotected ExecutorServiceDelegate
executorService()
java.lang.String
id()
Identifier of this dispatcher, corresponds to the full key of the dispatcher configuration.protected boolean
registerForExecution(Mailbox mbox, boolean hasMessageHint, boolean hasSystemMessageHint)
Returns if it was registeredprotected void
shutdown()
INTERNAL APIscala.concurrent.duration.FiniteDuration
shutdownTimeout()
When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down, defaulting to your akka configs "akka.actor.default-dispatcher.shutdown-timeout" or default specified in reference.confprotected void
systemDispatch(ActorCell receiver, SystemMessage invocation)
INTERNAL APIint
throughput()
INTERNAL APIscala.concurrent.duration.Duration
throughputDeadlineTime()
INTERNAL APIjava.lang.String
toString()
-
Methods inherited from class akka.dispatch.MessageDispatcher
actors, attach, configurator, debug, detach, eventStream, inhabitants, isThroughputDeadlineTimeDefined, mailboxes, printActors, register, reportFailure, RESCHEDULED, resubmitOnBlock, resume, SCHEDULED, suspend, unbatchedExecute, unregister, UNSCHEDULED
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface akka.dispatch.BatchingExecutor
batchable, execute
-
-
-
-
Constructor Detail
-
Dispatcher
public Dispatcher(MessageDispatcherConfigurator _configurator, java.lang.String id, int throughput, scala.concurrent.duration.Duration throughputDeadlineTime, ExecutorServiceFactoryProvider executorServiceFactoryProvider, scala.concurrent.duration.FiniteDuration shutdownTimeout)
-
-
Method Detail
-
createMailbox
protected Mailbox createMailbox(Cell actor, MailboxType mailboxType)
INTERNAL API- Specified by:
createMailbox
in classMessageDispatcher
- Parameters:
actor
- (undocumented)mailboxType
- (undocumented)- Returns:
- (undocumented)
-
dispatch
protected void dispatch(ActorCell receiver, Envelope invocation)
INTERNAL API- Specified by:
dispatch
in classMessageDispatcher
- Parameters:
receiver
- (undocumented)invocation
- (undocumented)
-
executeTask
protected void executeTask(TaskInvocation invocation)
INTERNAL API- Specified by:
executeTask
in classMessageDispatcher
- Parameters:
invocation
- (undocumented)
-
executorService
protected final ExecutorServiceDelegate executorService()
-
id
public java.lang.String id()
Description copied from class:MessageDispatcher
Identifier of this dispatcher, corresponds to the full key of the dispatcher configuration.- Specified by:
id
in classMessageDispatcher
- Returns:
- (undocumented)
-
registerForExecution
protected boolean registerForExecution(Mailbox mbox, boolean hasMessageHint, boolean hasSystemMessageHint)
Returns if it was registeredINTERNAL API
- Specified by:
registerForExecution
in classMessageDispatcher
- Parameters:
mbox
- (undocumented)hasMessageHint
- (undocumented)hasSystemMessageHint
- (undocumented)- Returns:
- (undocumented)
-
shutdown
protected void shutdown()
INTERNAL API- Specified by:
shutdown
in classMessageDispatcher
-
shutdownTimeout
public scala.concurrent.duration.FiniteDuration shutdownTimeout()
Description copied from class:MessageDispatcher
When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down, defaulting to your akka configs "akka.actor.default-dispatcher.shutdown-timeout" or default specified in reference.confINTERNAL API
- Specified by:
shutdownTimeout
in classMessageDispatcher
- Returns:
- (undocumented)
-
systemDispatch
protected void systemDispatch(ActorCell receiver, SystemMessage invocation)
INTERNAL API- Specified by:
systemDispatch
in classMessageDispatcher
- Parameters:
receiver
- (undocumented)invocation
- (undocumented)
-
throughput
public int throughput()
Description copied from class:MessageDispatcher
INTERNAL API- Specified by:
throughput
in classMessageDispatcher
- Returns:
- (undocumented)
-
throughputDeadlineTime
public scala.concurrent.duration.Duration throughputDeadlineTime()
Description copied from class:MessageDispatcher
INTERNAL API- Specified by:
throughputDeadlineTime
in classMessageDispatcher
- Returns:
- (undocumented)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-