internal void ClientAdded(GrainId clientId) { // Use a ActivationId that is hashed from clientId, and not random ActivationId. // That way, when we refresh it in the directiry, it's the same one. var addr = GetClientActivationAddress(clientId); scheduler.QueueTask( () => ExecuteWithRetries(() => grainDirectory.RegisterAsync(addr, singleActivation: false), ErrorCode.ClientRegistrarFailedToRegister, String.Format("Directory.RegisterAsync {0} failed.", addr)), this).Ignore(); }
/// <summary> /// Registers a client object on this gateway. /// </summary> public async Task <ActivationAddress> RegisterClientObserver(GrainId grainId, Guid clientId) { localMessageCenter.RecordProxiedGrain(grainId, clientId); var addr = ActivationAddress.NewActivationAddress(myAddress, grainId); await grainDirectory.RegisterAsync(addr); return(addr); }