Exemple #1
0
        public void PubSubCounterSetter(string counterType, PerformanceOperator counterOperation)
        {
            if (_pubsubCounterList != null && _pubsubCounterList.Count > 0 && _pubsubCounterList.ContainsKey(counterType))
            {
                PerformanceCounterBase performanceCounter = _pubsubCounterList[counterType];
                if (performanceCounter != null)
                {
                    lock (performanceCounter)
                    {
                        switch (counterOperation)
                        {
                        case PerformanceOperator.Increment:
                            performanceCounter.Increment();
                            break;

                        case PerformanceOperator.Decrement:
                            if (performanceCounter.Value != 0)
                            {
                                performanceCounter.Decrement();
                            }
                            break;
                        }
                    }
                }
            }
        }
 /// <summary>
 /// Decrement the Number of client requests logged on server.
 /// </summary>
 public void DecrementRequestLogCount()
 {
     if (_requestLogCount != null)
     {
         lock (_requestLogCount)
         {
             _requestLogCount.Decrement();
         }
     }
 }
 public void DecrementEventQueueCountStats()
 {
     if (_pcEventQueueCount != null)
     {
         lock (_pcEventQueueCount)
         {
             _pcEventQueueCount.Decrement();
         }
     }
 }
 public void DecrementResponsesQueueCountStats()
 {
     if (_pcResponseQueueCount != null)
     {
         lock (_pcResponseQueueCount)
         {
             _pcResponseQueueCount.Decrement();
         }
     }
 }