|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object akka.dispatch.MessageDispatcher akka.dispatch.Dispatcher
public class Dispatcher
The event-based Dispatcher
binds a set of Actors to a thread pool backed up by a
BlockingQueue
.
The preferred way of creating dispatchers is to define configuration of it and use the
the lookup
method in Dispatchers
.
param: throughput positive integer indicates the dispatcher will only process so much messages at a time from the mailbox, without checking the mailboxes of other actors. Zero or negative means the dispatcher always continues until the mailbox is empty. Larger values (or zero or negative) increase throughput, smaller values increase fairness
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface scala.concurrent.ExecutionContext |
---|
scala.concurrent.ExecutionContext.Implicits$ |
Constructor Summary | |
---|---|
Dispatcher(MessageDispatcherConfigurator _configurator,
java.lang.String id,
int throughput,
scala.concurrent.duration.Duration throughputDeadlineTime,
ExecutorServiceFactoryProvider executorServiceFactoryProvider,
scala.concurrent.duration.FiniteDuration shutdownTimeout)
|
Method Summary | |
---|---|
protected Mailbox |
createMailbox(Cell actor,
MailboxType mailboxType)
INTERNAL API |
protected void |
dispatch(ActorCell receiver,
Envelope invocation)
INTERNAL API |
protected void |
executeTask(TaskInvocation invocation)
INTERNAL API |
protected 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 registered |
protected void |
shutdown()
INTERNAL API |
scala.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.conf |
protected void |
systemDispatch(ActorCell receiver,
SystemMessage invocation)
INTERNAL API |
int |
throughput()
INTERNAL API |
scala.concurrent.duration.Duration |
throughputDeadlineTime()
INTERNAL API |
java.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 |
Methods inherited from interface scala.concurrent.ExecutionContext |
---|
execute, prepare |
Constructor Detail |
---|
public Dispatcher(MessageDispatcherConfigurator _configurator, java.lang.String id, int throughput, scala.concurrent.duration.Duration throughputDeadlineTime, ExecutorServiceFactoryProvider executorServiceFactoryProvider, scala.concurrent.duration.FiniteDuration shutdownTimeout)
Method Detail |
---|
public java.lang.String id()
MessageDispatcher
id
in class MessageDispatcher
public int throughput()
MessageDispatcher
throughput
in class MessageDispatcher
public scala.concurrent.duration.Duration throughputDeadlineTime()
MessageDispatcher
throughputDeadlineTime
in class MessageDispatcher
public scala.concurrent.duration.FiniteDuration shutdownTimeout()
MessageDispatcher
INTERNAL API
shutdownTimeout
in class MessageDispatcher
protected final ExecutorServiceDelegate executorService()
protected void dispatch(ActorCell receiver, Envelope invocation)
dispatch
in class MessageDispatcher
receiver
- (undocumented)invocation
- (undocumented)protected void systemDispatch(ActorCell receiver, SystemMessage invocation)
systemDispatch
in class MessageDispatcher
receiver
- (undocumented)invocation
- (undocumented)protected void executeTask(TaskInvocation invocation)
executeTask
in class MessageDispatcher
invocation
- (undocumented)protected Mailbox createMailbox(Cell actor, MailboxType mailboxType)
createMailbox
in class MessageDispatcher
actor
- (undocumented)mailboxType
- (undocumented)
protected void shutdown()
shutdown
in class MessageDispatcher
protected boolean registerForExecution(Mailbox mbox, boolean hasMessageHint, boolean hasSystemMessageHint)
INTERNAL API
registerForExecution
in class MessageDispatcher
mbox
- (undocumented)hasMessageHint
- (undocumented)hasSystemMessageHint
- (undocumented)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |