Initial commit of dispatcher key refactoring, for review. See #1458
* Changed signatures and constructor of MessageDispatcherConfigurator * Changed Dispatchers.lookup, keep configurators instead of dispatchers * Removed most of the Dispatchers.newX methods, newDispatcher is still there because of priority mailbox * How should we make it easy to configure priority mailbox? * Changed tons tests * Documentation and ScalaDoc is not updated yet * Some tests in ActorModelSpec are temporary ignored due to failure
This commit is contained in:
parent
92bb4c5afb
commit
f772b0183e
53 changed files with 627 additions and 496 deletions
|
|
@ -4,7 +4,6 @@
|
|||
package akka.docs.actor.mailbox;
|
||||
|
||||
//#imports
|
||||
import akka.dispatch.MessageDispatcher;
|
||||
import akka.actor.UntypedActorFactory;
|
||||
import akka.actor.UntypedActor;
|
||||
import akka.actor.Props;
|
||||
|
|
@ -40,12 +39,12 @@ public class DurableMailboxDocTestBase {
|
|||
@Test
|
||||
public void configDefinedDispatcher() {
|
||||
//#dispatcher-config-use
|
||||
MessageDispatcher dispatcher = system.dispatcherFactory().lookup("my-dispatcher");
|
||||
ActorRef myActor = system.actorOf(new Props().withDispatcher(dispatcher).withCreator(new UntypedActorFactory() {
|
||||
public UntypedActor create() {
|
||||
return new MyUntypedActor();
|
||||
}
|
||||
}), "myactor");
|
||||
ActorRef myActor = system.actorOf(
|
||||
new Props().withDispatcher("my-dispatcher").withCreator(new UntypedActorFactory() {
|
||||
public UntypedActor create() {
|
||||
return new MyUntypedActor();
|
||||
}
|
||||
}), "myactor");
|
||||
//#dispatcher-config-use
|
||||
myActor.tell("test");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue