コード例 #1
0
ファイル: ServiceQueue.cs プロジェクト: kouweizhong/redfoxmq
        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;
        }
コード例 #2
0
ファイル: ServiceQueue.cs プロジェクト: tleviathan/redfoxmq
        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;
        }