rename app: ActorSystem to system everywhere

This commit is contained in:
Roland 2011-11-17 12:36:35 +01:00
parent c31695bef4
commit d381b72061
69 changed files with 344 additions and 343 deletions

View file

@ -24,7 +24,7 @@
// public class Pi {
// private static final ActorSystem app = new ActorSystem();
// private static final ActorSystem system = new ActorSystem();
// public static void main(String[] args) throws Exception {
// Pi pi = new Pi();
@ -109,11 +109,11 @@
// LinkedList<ActorRef> workers = new LinkedList<ActorRef>();
// for (int i = 0; i < nrOfWorkers; i++) {
// ActorRef worker = app.actorOf(Worker.class);
// ActorRef worker = system.actorOf(Worker.class);
// workers.add(worker);
// }
// router = app.actorOf(new RoutedProps().withRoundRobinRouter().withLocalConnections(workers), "pi");
// router = system.actorOf(new RoutedProps().withRoundRobinRouter().withLocalConnections(workers), "pi");
// }
// // message handler
@ -167,7 +167,7 @@
// final CountDownLatch latch = new CountDownLatch(1);
// // create the master
// ActorRef master = app.actorOf(new UntypedActorFactory() {
// ActorRef master = system.actorOf(new UntypedActorFactory() {
// public UntypedActor create() {
// return new Master(nrOfWorkers, nrOfMessages, nrOfElements, latch);
// }

View file

@ -12,7 +12,7 @@
// object Pi extends App {
// val app = ActorSystem()
// val system = ActorSystem()
// calculate(nrOfWorkers = 4, nrOfElements = 10000, nrOfMessages = 10000)
@ -56,10 +56,10 @@
// var start: Long = _
// // create the workers
// val workers = Vector.fill(nrOfWorkers)(app.actorOf[Worker])
// val workers = Vector.fill(nrOfWorkers)(system.actorOf[Worker])
// // wrap them with a load-balancing router
// val router = app.actorOf(RoutedProps().withRoundRobinRouter.withLocalConnections(workers), "pi")
// val router = system.actorOf(RoutedProps().withRoundRobinRouter.withLocalConnections(workers), "pi")
// // message handler
// def receive = {
@ -102,7 +102,7 @@
// val latch = new CountDownLatch(1)
// // create the master
// val master = app.actorOf(new Master(nrOfWorkers, nrOfMessages, nrOfElements, latch))
// val master = system.actorOf(new Master(nrOfWorkers, nrOfMessages, nrOfElements, latch))
// // start the calculation
// master ! Calculate