Removing erronous use of uuid and replaced with id

This commit is contained in:
Viktor Klang 2010-09-07 12:54:10 +02:00
parent 456fd074d4
commit 0085dd6504
2 changed files with 5 additions and 6 deletions

View file

@ -829,9 +829,8 @@ class LocalActorRef private[akka](
actor.shutdown actor.shutdown
ActorRegistry.unregister(this) ActorRegistry.unregister(this)
if (isRemotingEnabled) { if (isRemotingEnabled) {
remoteAddress.foreach { address => if(remoteAddress.isDefined)
RemoteClientModule.unregister(address, uuid) RemoteClientModule.unregister(remoteAddress.get, uuid)
}
RemoteServerModule.unregister(this) RemoteServerModule.unregister(this)
} }
nullOutActorRefReferencesFor(actorInstance.get) nullOutActorRefReferencesFor(actorInstance.get)

View file

@ -276,7 +276,7 @@ class RemoteServer extends Logging with ListenerManagement {
/** /**
* Register Remote Actor by the Actor's 'uuid' field. It starts the Actor if it is not started already. * Register Remote Actor by the Actor's 'uuid' field. It starts the Actor if it is not started already.
*/ */
def register(actorRef: ActorRef): Unit = register(actorRef.uuid,actorRef) def register(actorRef: ActorRef): Unit = register(actorRef.id,actorRef)
/** /**
* Register Remote Actor by a specific 'id' passed as argument. * Register Remote Actor by a specific 'id' passed as argument.
@ -295,13 +295,13 @@ class RemoteServer extends Logging with ListenerManagement {
} }
/** /**
* Unregister Remote Actor that is registered using its 'uuid' field (not custom ID). * Unregister Remote Actor that is registered using its 'id' field (not custom ID).
*/ */
def unregister(actorRef: ActorRef):Unit = synchronized { def unregister(actorRef: ActorRef):Unit = synchronized {
if (_isRunning) { if (_isRunning) {
log.debug("Unregistering server side remote actor [%s] with id [%s:%s]", actorRef.actorClass.getName, actorRef.id, actorRef.uuid) log.debug("Unregistering server side remote actor [%s] with id [%s:%s]", actorRef.actorClass.getName, actorRef.id, actorRef.uuid)
val actorMap = actors() val actorMap = actors()
actorMap remove actorRef.uuid actorMap remove actorRef.id
if (actorRef.registeredInRemoteNodeDuringSerialization) actorMap remove actorRef.uuid if (actorRef.registeredInRemoteNodeDuringSerialization) actorMap remove actorRef.uuid
} }
} }