You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/09/14 21:08:28 UTC

svn commit: r997043 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp

Author: tabish
Date: Tue Sep 14 19:08:28 2010
New Revision: 997043

URL: http://svn.apache.org/viewvc?rev=997043&view=rev
Log:
Allow a configuration option of all for PrefetchPolicy.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp?rev=997043&r1=997042&r2=997043&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/PrefetchPolicy.cpp Tue Sep 14 19:08:28 2010
@@ -53,6 +53,15 @@ void PrefetchPolicy::configure( const de
             this->setTopicPrefetch( Integer::parseInt(
                 properties.getProperty( "cms.PrefetchPolicy.topicPrefetch" ) ) );
         }
+
+        if( properties.hasProperty( "cms.PrefetchPolicy.all" ) ) {
+            int value = Integer::parseInt( properties.getProperty( "cms.PrefetchPolicy.all" ) );
+
+            this->setDurableTopicPrefetch( value );
+            this->setQueueBrowserPrefetch( value );
+            this->setQueuePrefetch( value );
+            this->setTopicPrefetch( value );
+        }
     }
     DECAF_CATCH_RETHROW( Exception )
     DECAF_CATCHALL_THROW( Exception )