public override Task Initialize(IStreamQueueMapper queueMapper) { if (queueMapper == null) { throw new ArgumentNullException("queueMapper"); } if (!(queueMapper is IConsistentRingStreamQueueMapper)) { throw new ArgumentException("queueMapper for ConsistentRingQueueBalancer should implement IConsistentRingStreamQueueMapper", "queueMapper"); } streamQueueMapper = (IConsistentRingStreamQueueMapper)queueMapper; return(base.Initialize(queueMapper)); }
public override Task Initialize(string strProviderName, IStreamQueueMapper queueMapper) { if (queueMapper == null) { throw new ArgumentNullException("queueMapper"); } if (!(queueMapper is IConsistentRingStreamQueueMapper)) { throw new ArgumentException("queueMapper for ConsistentRingQueueBalancer should implement IConsistentRingStreamQueueMapper", "queueMapper"); } streamQueueMapper = (IConsistentRingStreamQueueMapper)queueMapper; return(Task.CompletedTask); }
public SQSAdapter(IConsistentRingStreamQueueMapper streamQueueMapper, string dataConnectionString, string deploymentId, string providerName) { if (string.IsNullOrEmpty(dataConnectionString)) { throw new ArgumentNullException("dataConnectionString"); } if (string.IsNullOrEmpty(deploymentId)) { throw new ArgumentNullException("deploymentId"); } DataConnectionString = dataConnectionString; DeploymentId = deploymentId; Name = providerName; this.streamQueueMapper = streamQueueMapper; }
public SQSAdapter(SerializationManager serializationManager, IConsistentRingStreamQueueMapper streamQueueMapper, ILoggerFactory loggerFactory, string dataConnectionString, string serviceId, string providerName) { if (string.IsNullOrEmpty(dataConnectionString)) { throw new ArgumentNullException("dataConnectionString"); } if (string.IsNullOrEmpty(serviceId)) { throw new ArgumentNullException(nameof(serviceId)); } this.loggerFactory = loggerFactory; this.serializationManager = serializationManager; DataConnectionString = dataConnectionString; this.ServiceId = serviceId; Name = providerName; this.streamQueueMapper = streamQueueMapper; }
public ConsistentRingQueueBalancer( IConsistentRingProviderForGrains ringProvider, IStreamQueueMapper queueMapper) { if (ringProvider == null) { throw new ArgumentNullException("ringProvider"); } if (queueMapper == null) { throw new ArgumentNullException("queueMapper"); } if (!(queueMapper is IConsistentRingStreamQueueMapper)) { throw new ArgumentException("queueMapper for ConsistentRingQueueBalancer should implement IConsistentRingStreamQueueMapper", "queueMapper"); } streamQueueMapper = (IConsistentRingStreamQueueMapper)queueMapper; myRange = ringProvider.GetMyRange(); ringProvider.SubscribeToRangeChangeEvents(this); }
public ConsistentRingQueueBalancer( IConsistentRingProviderForGrains ringProvider, IStreamQueueMapper queueMapper) { if (ringProvider == null) { throw new ArgumentNullException("ringProvider"); } if (queueMapper == null) { throw new ArgumentNullException("queueMapper"); } if (!(queueMapper is IConsistentRingStreamQueueMapper)) { throw new ArgumentException("queueMapper for ConsistentRingQueueBalancer should implement IConsistentRingStreamQueueMapper", "queueMapper"); } streamQueueMapper = (IConsistentRingStreamQueueMapper)queueMapper; myRange = ringProvider.GetMyRange(); ringProvider.SubscribeToRangeChangeEvents(this); }