public MessageQueueSingleDistributor(MessageQueueSingle messageQueue, ServiceQueueRotationAlgorithm rotationAlgorithm)
 {
     if (messageQueue == null)
     {
         throw new ArgumentNullException("messageQueue");
     }
     _messageQueue = messageQueue;
     _rotationFunc = GetRotationFunc(rotationAlgorithm);
 }
Esempio n. 2
0
        public ServiceQueue(ServiceQueueRotationAlgorithm rotationAlgorithm)
        {
            _messageQueue            = new MessageQueueSingle();
            _messageQueueDistributor = new MessageQueueSingleDistributor(_messageQueue, rotationAlgorithm);

            _servers             = new ConcurrentDictionary <RedFoxEndpoint, ISocketAccepter>();
            _readerClientSockets = new ConcurrentDictionary <ISocket, IMessageFrameWriter>();
            _writerClientSockets = new ConcurrentDictionary <ISocket, MessageFrameReceiver>();

            _disposedToken = _disposedCancellationTokenSource.Token;
        }
Esempio n. 3
0
        public ServiceQueue(ServiceQueueRotationAlgorithm rotationAlgorithm)
        {
            _messageQueue = new MessageQueueSingle();
            _messageQueueDistributor = new MessageQueueSingleDistributor(_messageQueue, rotationAlgorithm);

            _servers = new ConcurrentDictionary<RedFoxEndpoint, ISocketAccepter>();
            _readerClientSockets = new ConcurrentDictionary<ISocket, IMessageFrameWriter>();
            _writerClientSockets = new ConcurrentDictionary<ISocket, MessageFrameReceiver>();

            _disposedToken = _disposedCancellationTokenSource.Token;
        }
 public MessageQueueSingleDistributor(MessageQueueSingle messageQueue, ServiceQueueRotationAlgorithm rotationAlgorithm)
 {
     if (messageQueue == null) throw new ArgumentNullException("messageQueue");
     _messageQueue = messageQueue;
     _rotationFunc = GetRotationFunc(rotationAlgorithm);
 }