Akka.Remote.EndpointRegistry.RegisterReadOnlyEndpoint C# (CSharp) Метод

RegisterReadOnlyEndpoint() публичный Метод

public RegisterReadOnlyEndpoint ( Akka.Actor.Address address, IActorRef endpoint, int uid ) : IActorRef
address Akka.Actor.Address
endpoint IActorRef
uid int
Результат IActorRef
        public IActorRef RegisterReadOnlyEndpoint(Address address, IActorRef endpoint, int uid)
        {
            _addressToReadonly[address] = Tuple.Create(endpoint, uid);
            _readonlyToAddress[endpoint] = address;
            return endpoint;
        }

Usage Example

Пример #1
0
 private void AcceptPendingReader(ActorRef takingOverFrom)
 {
     if (pendingReadHandoffs.ContainsKey(takingOverFrom))
     {
         var handle = pendingReadHandoffs[takingOverFrom];
         pendingReadHandoffs.Remove(takingOverFrom);
         eventPublisher.NotifyListeners(new AssociatedEvent(handle.LocalAddress, handle.RemoteAddress, inbound: true));
         var endpoint = CreateEndpoint(handle.RemoteAddress, handle.LocalAddress,
                                       _transportMapping[handle.LocalAddress], settings, false, handle, refuseUid: null);
         endpoints.RegisterReadOnlyEndpoint(handle.RemoteAddress, endpoint);
     }
 }