public RouteManager(ICoordinationManager coordinationManager) { if (coordinationManager == null) { throw new ArgumentNullException(nameof(coordinationManager)); } _coordinationManager = coordinationManager; }
public CoordinationManagerSkeleton(ICoordinationManagerFactory coordinationManagerFactory) { if (coordinationManagerFactory == null) { throw new ArgumentNullException(nameof(coordinationManagerFactory)); } _coordinationManager = coordinationManagerFactory.CreateCoordinationManager(); Assert(_coordinationManager != null); }
public EndPointMap(ICoordinationManager coordinationManager, IAddressConversion <TAddress> addressConversion) { if (coordinationManager == null) { throw new ArgumentNullException(nameof(coordinationManager)); } if (addressConversion == null) { throw new ArgumentNullException(nameof(addressConversion)); } _coordinationManager = coordinationManager; _addressConversion = addressConversion; }
public ClientConnectionManager(ICoordinationManager coordinationManager, IDateTimeProvider dateTimeProvider, IOptions <ClientConnectionOptions> clientConnectionOptionsAccessor, IOptions <ClientConnectionManagerOptions> clientConnectionManagerOptionsAccessor, ILogger <ClientConnectionManager> logger = null) { if (coordinationManager == null) { throw new ArgumentNullException(nameof(coordinationManager)); } if (dateTimeProvider == null) { throw new ArgumentNullException(nameof(dateTimeProvider)); } if (clientConnectionOptionsAccessor == null) { throw new ArgumentNullException(nameof(clientConnectionOptionsAccessor)); } if (clientConnectionManagerOptionsAccessor == null) { throw new ArgumentNullException(nameof(clientConnectionManagerOptionsAccessor)); } _coordinationManager = coordinationManager; _dateTimeProvider = dateTimeProvider; _logger = logger; _clientConnectionOptions = clientConnectionOptionsAccessor.Value ?? new ClientConnectionOptions(); _clientConnectionManagerOptions = clientConnectionManagerOptionsAccessor.Value ?? new ClientConnectionManagerOptions(); Timeout = _clientConnectionOptions.Timeout <= TimeSpan.Zero ? ClientConnectionOptions.DefaultTimeout : _clientConnectionOptions.Timeout; BasePath = new CoordinationEntryPath(string.IsNullOrEmpty(_clientConnectionManagerOptions.BasePath) ? ClientConnectionManagerOptions.DefaultBasePath : _clientConnectionManagerOptions.BasePath); GarbageCollectionDelayMax = _clientConnectionManagerOptions.GarbageCollectionDelayMax <= TimeSpan.Zero ? ClientConnectionManagerOptions.DefaultGarbageCollectionDelayMax : _clientConnectionManagerOptions.GarbageCollectionDelayMax; _garbageCollectionProcess = new AsyncProcess(GarbageCollection, start: true); }
internal void SetCoordinationManagerStub(ICoordinationManager coordinationManager, IProxy <CoordinationManagerSkeleton> proxy) { _coordinationManager = coordinationManager; _proxy = proxy; }