From what I remember, it ActorRegistrywas singleton in earlier versions of Akka, and from what I see in the code now, it is no longer . Now ActorRegistrythis is the last class, with an instance created for the Actor companion object:
object Actor extends Logging {
...
val registry = new ActorRegistry
...
}
class LocalActorRef {
...
def initializeActorInstance = {
...
Actor.registry.register(this)
...
}
...
def stop = {
...
Actor.remote.unregister(this)
...
}
...
}
This way you can create multiple registry instances.
-, , / ActorRegistry start/stop, , / Actor/LocalActorRef ( start/stop, , , ) / ActorRegistry.