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
Attaches the specified actorRef to this dispatcher
Attaches the specified actorRef to this dispatcher
Creates and returns a mailbox for the given actor.
Creates and returns a mailbox for the given actor.
Detaches the specified actorRef from this dispatcher
Detaches the specified actorRef from this dispatcher
Will be called when the dispatcher is to queue an invocation for execution
Will be called when the dispatcher is to queue an invocation for execution
the mailbox associated with the actor
Returns the "current" emptiness status of the mailbox for the specified actor
Returns the "current" emptiness status of the mailbox for the specified actor
Returns the size of the mailbox for the specified actor
Returns the size of the mailbox for the specified actor
Name of this dispatcher.
Name of this dispatcher.
Called one time every time an actor is detached from this dispatcher and this dispatcher has no actors left attached
Called one time every time an actor is detached from this dispatcher and this dispatcher has no actors left attached
Called one time every time an actor is attached to this dispatcher and this dispatcher was previously shutdown
Called one time every time an actor is attached to this dispatcher and this dispatcher was previously shutdown
Traverses the list of actors (uuids) currently being attached to this dispatcher and stops those actors
Traverses the list of actors (uuids) currently being attached to this dispatcher and stops those actors
After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference
After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference
Returns the amount of tasks queued for execution
Returns the amount of tasks queued for execution
positive integer indicates the dispatcher will only process so much messages at a time from the mailbox, without checking the mailboxes of other actors.
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
When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down, in Ms defaulting to your akka configs "akka.
When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down, in Ms defaulting to your akka configs "akka.actor.dispatcher-shutdown-timeout" or otherwise, 1 Second
Returns the amount of futures queued for execution
Returns the amount of futures queued for execution
Will be removed for Akka 2.0, use 'tasks' instead
Default settings are:
The dispatcher has a fluent builder interface to build up a thread pool to suite your use-case. There is a default thread pool defined but make use of the builder if you need it. Here are some examples.
Scala API.
Example usage:
val dispatcher = new ExecutorBasedEventDrivenDispatcher("name") dispatcher .withNewThreadPoolWithBoundedBlockingQueue(100) .setCorePoolSize(16) .setMaxPoolSize(128) .setKeepAliveTimeInMillis(60000) .buildThreadPoolJava API.
Example usage:
ExecutorBasedEventDrivenDispatcher dispatcher = new ExecutorBasedEventDrivenDispatcher("name"); dispatcher .withNewThreadPoolWithBoundedBlockingQueue(100) .setCorePoolSize(16) .setMaxPoolSize(128) .setKeepAliveTimeInMillis(60000) .buildThreadPool();But the preferred way of creating dispatchers is to use the
akka.dispatch.Dispatchers
factory object.