diff options
-rw-r--r-- | java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java index 44272689fb..1db0c57a62 100644 --- a/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java +++ b/java/broker-core/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java @@ -118,9 +118,7 @@ public class SimpleAMQQueue implements AMQQueue<QueueConsumer>, 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 AMQQueue<QueueConsumer>, _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 AMQQueue<QueueConsumer>, return _consumerList.size(); } - public int getConsumerCountHigh() - { - return _consumerCountHigh.get(); - } - public int getActiveConsumerCount() { return _activeSubscriberCount.get(); @@ -2086,11 +2072,6 @@ public class SimpleAMQQueue implements AMQQueue<QueueConsumer>, return getName(); } - public long getUnackedMessageCountHigh() - { - return _unackedMsgCountHigh.get(); - } - public long getUnackedMessageCount() { return _unackedMsgCount.get(); @@ -2109,17 +2090,8 @@ public class SimpleAMQQueue implements AMQQueue<QueueConsumer>, 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() |