예제 #1
0
        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();
        }
예제 #2
0
        /// <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);
        }