Exemplo n.º 1
0
        public void ReadResponseAsync(Action <Exception, RedisResponse> callBack)
        {
            var item = new PipelineItem(callBack);

            _responsesQueue.Enqueue(item);
            TryRunReceiveProcess();
        }
Exemplo n.º 2
0
        public void ExecuteCommandAsync(byte[][] args, PipelineItem item)
        {
            if (_requestsQueue.Count > MaxQueueSize)
            {
                SpinWait.SpinUntil(() => _requestsQueue.Count < MaxQueueSize);
            }

            if (_pipelineException != null)
            {
                item.CallBack(_pipelineException, null);
            }
            else if (_pipelineIsInOneWayMode != 0 && !item.IsOneWay)
            {
                item.CallBack(new RedisException("Pipeline is in OneWay mode"), null);
            }
            else
            {
                _requestsQueue.Enqueue(item);
                TryStartSendProcess();
            }
        }
Exemplo n.º 3
0
 public void ReadResponseAsync(Action<Exception, RedisResponse> callBack)
 {
     var item = new PipelineItem(callBack);
     _responsesQueue.Enqueue(item);
     TryRunReceiveProcess();
 }
Exemplo n.º 4
0
        public void ExecuteCommandAsync(byte[][] args,PipelineItem item)
        {
            if (_requestsQueue.Count > MaxQueueSize)
                SpinWait.SpinUntil(() => _requestsQueue.Count < MaxQueueSize);

            if (_pipelineException != null)
                item.CallBack(_pipelineException, null);
            else if (_pipelineIsInOneWayMode != 0 && !item.IsOneWay)
                item.CallBack(new RedisException("Pipeline is in OneWay mode"), null);
            else
            {
                _requestsQueue.Enqueue(item);
                TryStartSendProcess();
            }
        }