activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r504798 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region: PrefetchSubscription.java Queue.java
Date Thu, 08 Feb 2007 05:55:56 GMT
Author: rajdavies
Date: Wed Feb  7 21:55:56 2007
New Revision: 504798

URL: http://svn.apache.org/viewvc?view=rev&rev=504798
Log:
tell the PendingMessageCursor how many messages you want - for more efficent polling from
store

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java?view=diff&rev=504798&r1=504797&r2=504798
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/PrefetchSubscription.java
Wed Feb  7 21:55:56 2007
@@ -385,6 +385,7 @@
                 try{
                     int numberToDispatch=countBeforeFull();
                     if(numberToDispatch>0){
+                        pending.setMaxBatchSize(numberToDispatch);
                         int count=0;
                         pending.reset();
                         while(pending.hasNext()&&!isFull()&&count<numberToDispatch){

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java?view=diff&rev=504798&r1=504797&r2=504798
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/Queue.java
Wed Feb  7 21:55:56 2007
@@ -899,6 +899,7 @@
         final int toPageIn=maximumPagedInMessages-pagedInMessages.size();
         List result=null;
         if((force||!consumers.isEmpty())&&toPageIn>0){
+            messages.setMaxBatchSize(toPageIn);
             try{
                 dispatchValve.increment();
                 int count=0;



Mime
View raw message