Merge ClusterActoRef & RoutedActorRef: After merge with master
This commit is contained in:
commit
56d4fc7d7c
14 changed files with 398 additions and 163 deletions
|
|
@ -5,11 +5,11 @@
|
|||
package akka.tutorial.second
|
||||
|
||||
import akka.actor.Actor._
|
||||
import akka.routing.Routing
|
||||
import akka.event.EventHandler
|
||||
import System.{ currentTimeMillis ⇒ now }
|
||||
import akka.routing.Routing.Broadcast
|
||||
import akka.actor.{ Timeout, Channel, Actor, PoisonPill }
|
||||
import akka.routing.{ RoutedProps, Routing }
|
||||
|
||||
object Pi extends App {
|
||||
|
||||
|
|
@ -53,7 +53,11 @@ object Pi extends App {
|
|||
val workers = Vector.fill(nrOfWorkers)(actorOf[Worker].start())
|
||||
|
||||
// wrap them with a load-balancing router
|
||||
val router = Routing.actorOfWithRoundRobin("pi", workers)
|
||||
val router = Routing.actorOf(
|
||||
RoutedProps.apply()
|
||||
.withConnections(workers)
|
||||
.withRoundRobinRouter()
|
||||
.withDeployId("pi"))
|
||||
|
||||
// phase 1, can accept a Calculate message
|
||||
def scatter: Receive = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue