=clu #15412 Add paths(system) method to Group router

to be able to use the role correctly in cluster aware routers

This solution is very similar to what we did for nrOfInstances
in Pool routers.
This commit is contained in:
Patrik Nordwall 2015-08-20 17:31:36 +02:00
parent 6420a37250
commit a94f7cdc98
16 changed files with 188 additions and 15 deletions

View file

@ -77,12 +77,14 @@ import akka.routing.Router
import akka.japi.Util.immutableSeq
import com.typesafe.config.Config
final case class RedundancyGroup(override val paths: immutable.Iterable[String], nbrCopies: Int) extends Group {
final case class RedundancyGroup(routeePaths: immutable.Iterable[String], nbrCopies: Int) extends Group {
def this(config: Config) = this(
paths = immutableSeq(config.getStringList("routees.paths")),
routeePaths = immutableSeq(config.getStringList("routees.paths")),
nbrCopies = config.getInt("nbr-copies"))
override def paths(system: ActorSystem): immutable.Iterable[String] = routeePaths
override def createRouter(system: ActorSystem): Router =
new Router(new RedundancyRoutingLogic(nbrCopies))