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

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

public RemovePolicy ( Akka.Actor.Address address ) : void
address Akka.Actor.Address
Результат void
        public void RemovePolicy(Address address)
        {
            _addressToWritable.Remove(address);
        }

Usage Example

Пример #1
0
        private void CreateAndRegisterEndpoint(AkkaProtocolHandle handle, int?refuseUid)
        {
            var writing = _settings.UsePassiveConnections && !_endpoints.HasWriteableEndpointFor(handle.RemoteAddress);

            _eventPublisher.NotifyListeners(new AssociatedEvent(handle.LocalAddress, handle.RemoteAddress, true));
            var endpoint = CreateEndpoint(
                handle.RemoteAddress,
                handle.LocalAddress,
                _transportMapping[handle.LocalAddress],
                _settings,
                writing,
                handle,
                refuseUid);

            if (writing)
            {
                _endpoints.RegisterWritableEndpoint(handle.RemoteAddress, endpoint, handle.HandshakeInfo.Uid, refuseUid);
            }
            else
            {
                _endpoints.RegisterReadOnlyEndpoint(handle.RemoteAddress, endpoint, handle.HandshakeInfo.Uid);
                if (!_endpoints.HasWriteableEndpointFor(handle.RemoteAddress))
                {
                    _endpoints.RemovePolicy(handle.RemoteAddress);
                }
            }
        }