activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1463779 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core: ActiveMQConsumer.cpp ActiveMQConsumer.h
Date Tue, 02 Apr 2013 22:35:29 GMT
Author: tabish
Date: Tue Apr  2 22:35:29 2013
New Revision: 1463779

URL: http://svn.apache.org/r1463779
Log:
Add some additional property accessors

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=1463779&r1=1463778&r2=1463779&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Tue
Apr  2 22:35:29 2013
@@ -207,3 +207,23 @@ void ActiveMQConsumer::setMessageAvailab
 cms::MessageAvailableListener* ActiveMQConsumer::getMessageAvailableListener() const {
     return this->config->kernel->getMessageAvailableListener();
 }
+
+////////////////////////////////////////////////////////////////////////////////
+long long ActiveMQConsumer::getOptimizedAckScheduledAckInterval() const {
+    return this->config->kernel->getOptimizedAckScheduledAckInterval();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQConsumer::setOptimizedAckScheduledAckInterval(long long value) {
+    this->config->kernel->setOptimizedAckScheduledAckInterval(value);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+bool ActiveMQConsumer::isOptimizeAcknowledge() const {
+    return this->config->kernel->isOptimizeAcknowledge();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void ActiveMQConsumer::setOptimizeAcknowledge(bool value) {
+    this->config->kernel->setOptimizeAcknowledge(value);
+}

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h?rev=1463779&r1=1463778&r2=1463779&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h Tue
Apr  2 22:35:29 2013
@@ -44,8 +44,8 @@ namespace core{
 
     private:
 
-        ActiveMQConsumer( const ActiveMQConsumer& );
-        ActiveMQConsumer& operator= ( const ActiveMQConsumer& );
+        ActiveMQConsumer(const ActiveMQConsumer&);
+        ActiveMQConsumer& operator=(const ActiveMQConsumer&);
 
     public:
 
@@ -139,6 +139,37 @@ namespace core{
          */
         decaf::lang::Exception* getFailureError() const;
 
+        /**
+         * Time in Milliseconds before an automatic acknowledge is done for any outstanding
+         * delivered Messages.  A value less than one means no task is scheduled.
+         *
+         * @returns time in milliseconds for the scheduled ack task.
+         */
+        long long getOptimizedAckScheduledAckInterval() const;
+
+        /**
+         * Sets the time in Milliseconds to schedule an automatic acknowledge of outstanding
+         * messages when optimize acknowledge is enabled.  A value less than one means disable
+         * any scheduled tasks.
+         *
+         * @param value
+         *      The time interval to send scheduled acks.
+         */
+        void setOptimizedAckScheduledAckInterval(long long value);
+
+        /**
+         * @returns true if this consumer is using optimize acknowledge mode.
+         */
+        bool isOptimizeAcknowledge() const;
+
+        /**
+         * Enable or disable optimized acknowledge for this consumer.
+         *
+         * @param value
+         *      True if optimize acknowledge is enabled, false otherwise.
+         */
+        void setOptimizeAcknowledge(bool value);
+
     };
 
 }}



Mime
View raw message