activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1482800 - /activemq/trunk/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java
Date Wed, 15 May 2013 13:02:27 GMT
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();
                 }



Mime
View raw message