You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/02/06 12:23:15 UTC

svn commit: r1565170 - /qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java

Author: rgodfrey
Date: Thu Feb  6 11:23:15 2014
New Revision: 1565170

URL: http://svn.apache.org/r1565170
Log:
removing unused statistics in SimpleAMQQueue

Modified:
    qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java

Modified: qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=1565170&r1=1565169&r2=1565170&view=diff
==============================================================================
--- qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java (original)
+++ qpid/branches/java-broker-amqp-1-0-management/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java Thu Feb  6 11:23:15 2014
@@ -118,9 +118,7 @@ public class SimpleAMQQueue implements A
     private final AtomicLong _persistentMessageDequeueSize = new AtomicLong();
     private final AtomicLong _persistentMessageEnqueueCount = new AtomicLong();
     private final AtomicLong _persistentMessageDequeueCount = new AtomicLong();
-    private final AtomicInteger _consumerCountHigh = new AtomicInteger(0);
     private final AtomicLong _unackedMsgCount = new AtomicLong(0);
-    private final AtomicLong _unackedMsgCountHigh = new AtomicLong(0);
     private final AtomicLong _unackedMsgBytes = new AtomicLong();
 
     private final AtomicInteger _bindingCountHigh = new AtomicInteger();
@@ -452,13 +450,6 @@ public class SimpleAMQQueue implements A
 
             _consumerList.add(consumer);
 
-            //Increment consumerCountHigh if necessary. (un)registerConsumer are both
-            //synchronized methods so we don't need additional synchronization here
-            if(_consumerCountHigh.get() < getConsumerCount())
-            {
-                _consumerCountHigh.incrementAndGet();
-            }
-
             if (isDeleted())
             {
                 consumer.queueDeleted();
@@ -945,11 +936,6 @@ public class SimpleAMQQueue implements A
         return _consumerList.size();
     }
 
-    public int getConsumerCountHigh()
-    {
-        return _consumerCountHigh.get();
-    }
-
     public int getActiveConsumerCount()
     {
         return _activeSubscriberCount.get();
@@ -2086,11 +2072,6 @@ public class SimpleAMQQueue implements A
         return getName();
     }
 
-    public long getUnackedMessageCountHigh()
-    {
-        return _unackedMsgCountHigh.get();
-    }
-
     public long getUnackedMessageCount()
     {
         return _unackedMsgCount.get();
@@ -2109,17 +2090,8 @@ public class SimpleAMQQueue implements A
 
     private void incrementUnackedMsgCount(QueueEntry entry)
     {
-        long unackedMsgCount = _unackedMsgCount.incrementAndGet();
+        _unackedMsgCount.incrementAndGet();
         _unackedMsgBytes.addAndGet(entry.getSize());
-
-        long unackedMsgCountHigh;
-        while(unackedMsgCount > (unackedMsgCountHigh = _unackedMsgCountHigh.get()))
-        {
-            if(_unackedMsgCountHigh.compareAndSet(unackedMsgCountHigh, unackedMsgCount))
-            {
-                break;
-            }
-        }
     }
 
     public LogActor getLogActor()



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org