[hornetq-commits] JBoss hornetq SVN: r7932 - trunk/src/main/org/hornetq/core/server/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Sat Aug 29 10:15:43 EDT 2009


Author: timfox
Date: 2009-08-29 10:15:43 -0400 (Sat, 29 Aug 2009)
New Revision: 7932

Modified:
   trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
reverted commit i didn't mean to make

Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java	2009-08-29 14:00:44 UTC (rev 7931)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java	2009-08-29 14:15:43 UTC (rev 7932)
@@ -1313,10 +1313,8 @@
       //TODO - this needs to be optimised!! Creating too much stuff on an inner loop
       int totalConsumers = distributionPolicy.getConsumerCount();
       Set<Consumer> busyConsumers = new HashSet<Consumer>();
-      //Set<Consumer> nullReferences = new HashSet<Consumer>();
+      Set<Consumer> nullReferences = new HashSet<Consumer>();
       
-      int nullCount = 0;
-
       while (true)
       {
          consumer = distributionPolicy.getNextConsumer();
@@ -1349,9 +1347,8 @@
 
          if (reference == null)
          {
-            //nullReferences.add(consumer);
-            nullCount++;
-            if (nullCount + busyConsumers.size() == totalConsumers)
+            nullReferences.add(consumer);            
+            if (nullReferences.size() + busyConsumers.size() == totalConsumers)
             {
                startDepaging();
                // We delivered all the messages - go into direct delivery
@@ -1363,7 +1360,7 @@
          }
          else
          {
-            //nullReferences.remove(consumer);
+            nullReferences.remove(consumer);
             
             if (reference.getMessage().isExpired())
             {



More information about the hornetq-commits mailing list