activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1174954 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
Date Fri, 23 Sep 2011 18:58:55 GMT
Author: tabish
Date: Fri Sep 23 18:58:55 2011
New Revision: 1174954

URL: http://svn.apache.org/viewvc?rev=1174954&view=rev
Log:
fix for https://issues.apache.org/jira/browse/AMQ-3242

Make the max value actually be Short.MAX_VALUE

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java?rev=1174954&r1=1174953&r2=1174954&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQPrefetchPolicy.java
Fri Sep 23 18:58:55 2011
@@ -22,21 +22,22 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Defines the prefetch message policies for different types of consumers
- * 
+ *
  * @org.apache.xbean.XBean element="prefetchPolicy"
- * 
+ *
  */
+@SuppressWarnings("serial")
 public class ActiveMQPrefetchPolicy extends Object implements Serializable {
-    public static final int MAX_PREFETCH_SIZE = Short.MAX_VALUE - 1;
+    public static final int MAX_PREFETCH_SIZE = Short.MAX_VALUE;
     public static final int DEFAULT_QUEUE_PREFETCH = 1000;
     public static final int DEFAULT_QUEUE_BROWSER_PREFETCH = 500;
     public static final int DEFAULT_DURABLE_TOPIC_PREFETCH = 100;
     public static final int DEFAULT_OPTIMIZE_DURABLE_TOPIC_PREFETCH=1000;
     public static final int DEFAULT_INPUT_STREAM_PREFETCH=100;
     public static final int DEFAULT_TOPIC_PREFETCH = MAX_PREFETCH_SIZE;
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(ActiveMQPrefetchPolicy.class);
-    
+
     private int queuePrefetch;
     private int queueBrowserPrefetch;
     private int topicPrefetch;
@@ -164,7 +165,7 @@ public class ActiveMQPrefetchPolicy exte
     public void setInputStreamPrefetch(int inputStreamPrefetch) {
         this.inputStreamPrefetch = getMaxPrefetchLimit(inputStreamPrefetch);
     }
-    
+
     public boolean equals(Object object){
         if (object instanceof ActiveMQPrefetchPolicy){
             ActiveMQPrefetchPolicy other = (ActiveMQPrefetchPolicy) object;



Mime
View raw message