You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2013/05/15 15:02:27 UTC
svn commit: r1482800 -
/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
Author: chirino
Date: Wed May 15 13:02:27 2013
New Revision: 1482800
URL: http://svn.apache.org/r1482800
Log:
reduce the number of times the sendSyncs map is accessed.
Modified:
activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
Modified: activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java?rev=1482800&r1=1482799&r2=1482800&view=diff
==============================================================================
--- activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java (original)
+++ activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java Wed May 15 13:02:27 2013
@@ -800,18 +800,15 @@ public class Queue extends BaseDestinati
ArrayList<SendSync> syncs = new ArrayList<SendSync>(orderedWork.size());;
sendLock.lockInterruptibly();
-
try {
for (Transaction tx : orderedWork) {
- SendSync sync = sendSyncs.get(tx);
+ SendSync sync = sendSyncs.remove(tx);
sync.processSend();
syncs.add(sync);
- sendSyncs.remove(tx);
}
} finally {
sendLock.unlock();
}
-
for (SendSync sync : syncs) {
sync.processSent();
}