Package akka.first.app.java

Source Code of akka.first.app.java.MapReduceApplication

package akka.first.app.java;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.first.app.java.actors.MasterActor;
import akka.first.app.java.messages.Result;

public class MapReduceApplication {

  public static void main(String[] args) throws Exception {

    ActorSystem _system = ActorSystem.create("MapReduceApp");
   
    ActorRef master = _system.actorOf(new Props(MasterActor.class),"master");
   
    master.tell("The quick brown fox tried to jump over the lazy dog and fell on the dog");
    master.tell("Dog is man's best friend");
    master.tell("Dog and Fox belong to the same family");
   
    Thread.sleep(500);
   
    master.tell(new Result(), null);
   
    Thread.sleep(500);
   
    _system.shutdown();
        System.out.println("Java done!");
  }
}
TOP

Related Classes of akka.first.app.java.MapReduceApplication

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.