Package akka.routing

Examples of akka.routing.RandomPool


  public void demonstrateDispatcher() {
    //#dispatchers
    Props props =
      // “head” router actor will run on "router-dispatcher" dispatcher
      // Worker routees will run on "pool-dispatcher" dispatcher 
      new RandomPool(5).withDispatcher("router-dispatcher").props(
        Props.create(Worker.class));
    ActorRef router = system.actorOf(props, "poolWithDispatcher");
    //#dispatchers
  }
View Full Code Here

TOP

Related Classes of akka.routing.RandomPool

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.