Пример #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;
                        }
                    }
                }
            }
        }
Пример #2
0
 /// <summary>
 /// Decrement the Number of client requests logged on server.
 /// </summary>
 public void DecrementRequestLogCount()
 {
     if (_requestLogCount != null)
     {
         lock (_requestLogCount)
         {
             _requestLogCount.Decrement();
         }
     }
 }
Пример #3
0
 public void DecrementEventQueueCountStats()
 {
     if (_pcEventQueueCount != null)
     {
         lock (_pcEventQueueCount)
         {
             _pcEventQueueCount.Decrement();
         }
     }
 }
Пример #4
0
 public void DecrementResponsesQueueCountStats()
 {
     if (_pcResponseQueueCount != null)
     {
         lock (_pcResponseQueueCount)
         {
             _pcResponseQueueCount.Decrement();
         }
     }
 }