Moved method for creating a RoutedActorRef from 'Routing.actorOf' to 'Actor.actorOf'

This commit is contained in:
Jonas Bonér 2011-10-11 11:55:59 +02:00
parent 84f4840926
commit e20866c982
11 changed files with 54 additions and 55 deletions

View file

@ -9,6 +9,7 @@ import static akka.actor.Actors.poisonPill;
import static java.util.Arrays.asList;
import akka.actor.ActorRef;
import akka.actor.Actors;
import akka.actor.UntypedActor;
import akka.actor.UntypedActorFactory;
import akka.routing.RoutedProps;
@ -110,7 +111,7 @@ public class Pi {
workers.add(worker);
}
router = Routing.actorOf(new RoutedProps().withRoundRobinRouter().withLocalConnections(workers), "pi");
router = Actors.provider().actorOf(new RoutedProps().withRoundRobinRouter().withLocalConnections(workers), "pi");
}
// message handler

View file

@ -58,7 +58,7 @@ object Pi extends App {
val workers = Vector.fill(nrOfWorkers)(actorOf[Worker])
// wrap them with a load-balancing router
val router = Routing.actorOf(RoutedProps().withRoundRobinRouter.withLocalConnections(workers), "pi")
val router = Actor.actorOf(RoutedProps().withRoundRobinRouter.withLocalConnections(workers), "pi")
// message handler
def receive = {