Use named parameters to Deploy, avoid strange path param

This commit is contained in:
Patrik Nordwall 2012-09-20 08:50:12 +02:00
parent ab8a690c65
commit a790f5bb32
2 changed files with 4 additions and 2 deletions

View file

@ -178,7 +178,8 @@ private[akka] class ClusterRouteeProvider(
context.actorFor(RootActorPath(target) / settings.routeesPathElements)
} else {
val name = "c" + childNameCounter.incrementAndGet
val deploy = Deploy("", ConfigFactory.empty(), routeeProps.routerConfig, RemoteScope(target))
val deploy = Deploy(config = ConfigFactory.empty(), routerConfig = routeeProps.routerConfig,
scope = RemoteScope(target))
context.asInstanceOf[ActorCell].attachChild(routeeProps.withDeploy(deploy), name, systemService = false)
}
// must register each one, since registered routees are used in selectDeploymentTarget

View file

@ -78,7 +78,8 @@ final class RemoteRouteeProvider(nodes: Iterable[Address], _context: ActorContex
override def createRoutees(nrOfInstances: Int): Unit = {
val refs = IndexedSeq.fill(nrOfInstances) {
val name = "c" + childNameCounter.incrementAndGet
val deploy = Deploy("", ConfigFactory.empty(), routeeProps.routerConfig, RemoteScope(nodeAddressIter.next))
val deploy = Deploy(config = ConfigFactory.empty(), routerConfig = routeeProps.routerConfig,
scope = RemoteScope(nodeAddressIter.next))
// attachChild means that the provider will treat this call as if possibly done out of the wrong
// context and use RepointableActorRef instead of LocalActorRef. Seems like a slightly sub-optimal