class Dispatcher extends MessageDispatcher
The event-based
binds a set of Actors to a thread pool backed up by a
Dispatcher
BlockingQueue
.
The preferred way of creating dispatchers is to define configuration of it and use the
the lookup
method in akka.dispatch.Dispatchers.
- Source
- Dispatcher.scala
- Alphabetic
- By Inheritance
- Dispatcher
- MessageDispatcher
- ExecutionContextExecutor
- ExecutionContext
- BatchingExecutor
- Executor
- AbstractMessageDispatcher
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Dispatcher(_configurator: MessageDispatcherConfigurator, id: String, throughput: Int, throughputDeadlineTime: Duration, executorServiceFactoryProvider: ExecutorServiceFactoryProvider, shutdownTimeout: FiniteDuration)
- 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
Value Members
- final def attach(actor: ActorCell): Unit
Attaches the specified actor instance to this dispatcher, which includes scheduling it to run for the first time (Create() is expected to have been enqueued by the ActorCell upon mailbox creation).
Attaches the specified actor instance to this dispatcher, which includes scheduling it to run for the first time (Create() is expected to have been enqueued by the ActorCell upon mailbox creation).
- Definition Classes
- MessageDispatcher
- def batchable(runnable: Runnable): Boolean
Override this to define which runnables will be batched.
Override this to define which runnables will be batched.
- Definition Classes
- BatchingExecutor
- val configurator: MessageDispatcherConfigurator
- Definition Classes
- MessageDispatcher
- final def detach(actor: ActorCell): Unit
Detaches the specified actor instance from this dispatcher
Detaches the specified actor instance from this dispatcher
- Definition Classes
- MessageDispatcher
- val eventStream: EventStream
- Definition Classes
- MessageDispatcher
- def execute(runnable: Runnable): Unit
- Definition Classes
- BatchingExecutor → Executor
- val id: String
Identifier of this dispatcher, corresponds to the full key of the dispatcher configuration.
Identifier of this dispatcher, corresponds to the full key of the dispatcher configuration.
- Definition Classes
- Dispatcher → MessageDispatcher
- final def inhabitants: Long
- Definition Classes
- MessageDispatcher
- val mailboxes: Mailboxes
- Definition Classes
- MessageDispatcher
- def reportFailure(t: Throwable): Unit
- Definition Classes
- MessageDispatcher → ExecutionContext
- val shutdownTimeout: FiniteDuration
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
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
INTERNAL API
- Definition Classes
- Dispatcher → MessageDispatcher
- val throughput: Int
INTERNAL API
INTERNAL API
- Definition Classes
- Dispatcher → MessageDispatcher
- val throughputDeadlineTime: Duration
INTERNAL API
INTERNAL API
- Definition Classes
- Dispatcher → MessageDispatcher
- val toString: String
- Definition Classes
- Dispatcher → AnyRef → Any
Deprecated Value Members
- def prepare(): ExecutionContext
- Definition Classes
- ExecutionContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.12.0) preparation of ExecutionContexts will be removed