Created
November 23, 2010 20:54
-
-
Save remeniuk/712507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case RegisterActor(actor) => | |
log.debug("Registering remote actor [%s]" format(actor)) | |
if(!isActorInRegistry(actor.uuid) && !isLinkToLocal(actor)) | |
ActorRegistry.register( // Hack for 0.10, 1.0-M1 | |
RemoteClient.actorFor(actor.uuid.toString, actor.className, actor.hostname, actor.port) | |
) // RemoteActorRefs will register themselves in 1.0-M1+ | |
case UnregisterActor(actor) => { | |
log.debug("Unregistering remote actor [%s]" format(actor)) | |
ActorRegistry.foreach{act => | |
if(act.uuid == actor.uuid){ | |
ActorRegistry.unregister(act) | |
}} | |
Option(linkedRegistries.get(RegistryLink(actor.hostname, actor.port))) match{ | |
case Some(_) => removeLinkToRegistry(RegistryLink(actor.hostname, actor.port)) | |
case None => log.debug("[%s] is not a registry link" format(actor.uuid)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment