akka.dispatch
Class PinnedDispatcher
java.lang.Object
akka.dispatch.MessageDispatcher
akka.dispatch.Dispatcher
akka.dispatch.PinnedDispatcher
- All Implemented Interfaces:
- scala.concurrent.ExecutionContext
public class PinnedDispatcher
- extends Dispatcher
Dedicates a unique thread for each actor passed in as reference. Served through its messageQueue.
The preferred way of creating dispatchers is to define configuration of it and use the
the lookup
method in Dispatchers
.
Nested classes/interfaces inherited from interface scala.concurrent.ExecutionContext |
scala.concurrent.ExecutionContext.Implicits$ |
Method Summary |
java.lang.ThreadLocal<scala.collection.immutable.List<java.lang.Runnable>> |
_tasksLocal()
|
boolean |
batchable(java.lang.Runnable runnable)
Override this to define which runnables will be batched. |
void |
execute(java.lang.Runnable runnable)
|
protected void |
register(akka.actor.ActorCell actorCell)
If you override it, you must call it. |
protected void |
unregister(akka.actor.ActorCell actor)
If you override it, you must call it. |
Methods inherited from class akka.dispatch.Dispatcher |
createMailbox, dispatch, executeTask, executorService, id, mailboxType, registerForExecution, shutdown, shutdownTimeout, systemDispatch, throughput, throughputDeadlineTime, toString |
Methods inherited from class akka.dispatch.MessageDispatcher |
actors, attach, debug, defaultDispatcher, detach, inhabitants, isThroughputDeadlineTimeDefined, prerequisites, printActors, reportFailure, RESCHEDULED, resume, SCHEDULED, suspend, unbatchedExecute, UNSCHEDULED |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface scala.concurrent.ExecutionContext |
execute, prepare |
PinnedDispatcher
public PinnedDispatcher(DispatcherPrerequisites _prerequisites,
akka.actor.ActorCell _actor,
java.lang.String _id,
MailboxType _mailboxType,
scala.concurrent.duration.FiniteDuration _shutdownTimeout,
ThreadPoolConfig _threadPoolConfig)
register
protected void register(akka.actor.ActorCell actorCell)
- Description copied from class:
MessageDispatcher
- If you override it, you must call it. But only ever once. See "attach" for only invocation.
INTERNAL API
- Overrides:
register
in class MessageDispatcher
unregister
protected void unregister(akka.actor.ActorCell actor)
- Description copied from class:
MessageDispatcher
- If you override it, you must call it. But only ever once. See "detach" for the only invocation
INTERNAL API
- Overrides:
unregister
in class MessageDispatcher
_tasksLocal
public java.lang.ThreadLocal<scala.collection.immutable.List<java.lang.Runnable>> _tasksLocal()
execute
public void execute(java.lang.Runnable runnable)
- Specified by:
execute
in interface java.util.concurrent.Executor
batchable
public boolean batchable(java.lang.Runnable runnable)
- Override this to define which runnables will be batched.