Package org.akka.essentials.grid

Examples of org.akka.essentials.grid.Task


        // used when the new routee gets added to the server
        // we stop the currently running actor's on each client
        getContext().stop(getSelf());
      }
    } else if (message instanceof Task) {
      Task task = (Task) message;
      // check whether we have processed enough messages
      if (messageProcessedCounter == 100) {
        // tell the server, enough messages for me and shut me down
        getContext().stop(getSelf());
        getContext().system().shutdown();
      } else {
        log.info("Work Packet from server->" + task.getTaskNumber());
        messageProcessedCounter++;
        getSender().tell(new TaskFinished(task.getTaskNumber()));
      }
    }
  }
View Full Code Here


      if (((String) message).compareTo("SendWork") == 0) {
        log.info("About to send work packets to workers");
        if (workerRouterActor != null) {
          for (int i = 0; i < workerAddressMap.size(); i++) {
            count++;
            workerRouterActor.tell(new Task(count), this.getSelf());
          }
          log.info("Work Packets send upto->" + count);
          // let the workscheduler know that you finished with sending
          // work packets
          workSchedulerActor.tell("Work Packets send", getContext()
View Full Code Here

TOP

Related Classes of org.akka.essentials.grid.Task

Copyright © 2018 www.massapicom. 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.