implement remote routers

- split out actual routing functionality into *Like traits to be
  reusable
- make RemoteRouterConfig which only differs in how remote placement is
  initiated
- teach RemoteDeployer how to convert local RouterConfig in case config
  key “target.nodes” is set
- IT WORKS! All tests GREEN
- oh, yeah, had to make ActorPath serializable ...
This commit is contained in:
Roland 2011-12-13 01:09:05 +01:00
parent 0a7e5fe296
commit d1a26a9e28
8 changed files with 226 additions and 29 deletions

View file

@ -57,7 +57,7 @@ class RemoteActorRefProvider(
terminationFuture.onComplete(_ remote.server.shutdown())
}
def actorOf(system: ActorSystemImpl, props: Props, supervisor: InternalActorRef, path: ActorPath, systemService: Boolean): InternalActorRef =
def actorOf(system: ActorSystemImpl, props: Props, supervisor: InternalActorRef, path: ActorPath, systemService: Boolean, deploy: Option[Deploy] = None): InternalActorRef =
if (systemService) local.actorOf(system, props, supervisor, path, systemService)
else {
@ -97,7 +97,7 @@ class RemoteActorRefProvider(
}
val elems = path.elements
val deployment = (elems.head match {
val deployment = deploy orElse (elems.head match {
case "user" deployer.lookup(elems.drop(1).mkString("/", "/", ""))
case "remote" lookupRemotes(elems)
case _ None