Minor improvements based on feedback. See #1606
This commit is contained in:
parent
e7a0247c0d
commit
d6708184c6
3 changed files with 11 additions and 10 deletions
|
|
@ -175,8 +175,11 @@ class RouteeProvider(ref: RoutedActorRef, val context: ActorContext, val resizer
|
|||
context.self.asInstanceOf[RoutedActorRef].removeRoutees(routees)
|
||||
}
|
||||
|
||||
def createRoutees(props: Props, nrOfInstances: Int, routees: Iterable[String]): IndexedSeq[ActorRef] = (nrOfInstances, routees) match {
|
||||
case (0, Nil) ⇒ throw new IllegalArgumentException("Insufficient information - missing configuration.")
|
||||
def createRoutees(props: Props, nrOfInstances: Int, routees: Iterable[String]): IndexedSeq[ActorRef] =
|
||||
(nrOfInstances, routees) match {
|
||||
case (x, Nil) if x <= 0 ⇒
|
||||
throw new IllegalArgumentException(
|
||||
"Must specify nrOfInstances or routees for [%s]" format context.self.path.toString)
|
||||
case (x, Nil) ⇒ (1 to x).map(_ ⇒ context.actorOf(props))(scala.collection.breakOut)
|
||||
case (_, xs) ⇒ xs.map(context.actorFor(_))(scala.collection.breakOut)
|
||||
}
|
||||
|
|
@ -748,6 +751,7 @@ trait ScatterGatherFirstCompletedLike { this: RouterConfig ⇒
|
|||
|
||||
{
|
||||
case (sender, message) ⇒
|
||||
// FIXME avoid this cast
|
||||
val asker = routeeProvider.context.asInstanceOf[ActorCell].systemImpl.provider.ask(Timeout(within)).get
|
||||
asker.result.pipeTo(sender)
|
||||
message match {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ The "app" in this case refers to the name of the ``ActorSystem``::
|
|||
actor {
|
||||
deployment {
|
||||
/serviceA/retrieval {
|
||||
remote = "akka://app@10.0.0.1:2552”
|
||||
remote = "akka://app@10.0.0.1:2552"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,7 @@ class RemoteDeployer(_settings: ActorSystem.Settings) extends Deployer(_settings
|
|||
if (!str.isEmpty) throw new ConfigurationException("unparseable remote node name " + str)
|
||||
val nodes = deploy.config.getStringList("target.nodes").asScala
|
||||
if (nodes.isEmpty || deploy.routing == NoRouter) d
|
||||
else {
|
||||
val r = new RemoteRouterConfig(deploy.routing, nodes)
|
||||
Some(deploy.copy(routing = r))
|
||||
}
|
||||
else Some(deploy.copy(routing = new RemoteRouterConfig(deploy.routing, nodes)))
|
||||
}
|
||||
case None ⇒ None
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue