/** * remove current <remoteId,actor> mappings if present. * return map containing removed mappings (for reconnection) * @param act * */ public void unpublishActor(Actor act) { Long integer = publishedActorMappingReverse.get(act.getActorRef()); if ( integer != null ) { Log.Debug(this, ""+act.getClass().getSimpleName()+" unpublished"); publishedActorMap.remove(integer); publishedActorMappingReverse.remove(act.getActorRef()); act.__removeRemoteConnection(this); if ( act instanceof RemotedActor) { String connectionIdentifier = getSocketRef().getConnectionIdentifier(); ((RemotedActor) act).hasBeenUnpublished(connectionIdentifier); } } }
/** * remove current <remoteId,actor> mappings if present. * return map containing removed mappings (for reconnection) * @param act * */ public void unpublishActor(Actor act) { Long integer = publishedActorMappingReverse.get(act.getActorRef()); if ( integer != null ) { Log.Debug(this, ""+act.getClass().getSimpleName()+" unpublished"); publishedActorMap.remove(integer); publishedActorMappingReverse.remove(act.getActorRef()); act.__removeRemoteConnection(this); if ( act instanceof RemotedActor) { String connectionIdentifier = getSocketRef().getConnectionIdentifier(); ((RemotedActor) act).hasBeenUnpublished(connectionIdentifier); } } }
/** * cleanup after (virtual) connection close */ public void cleanUp() { conf.clearCaches(); stopRemoteRefs(); publishedActorMappingReverse.keySet().forEach((act) -> { if (act instanceof Actor) unpublishActor((Actor) act); }); getFacadeProxy().__removeRemoteConnection(this); }
/** * cleanup after (virtual) connection close */ public void cleanUp() { conf.clearCaches(); stopRemoteRefs(); publishedActorMappingReverse.keySet().forEach((act) -> { if (act instanceof Actor) unpublishActor((Actor) act); }); getFacadeProxy().__removeRemoteConnection(this); }