activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1446923 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover: BackupTransport.cpp BackupTransport.h
Date Sat, 16 Feb 2013 18:55:50 GMT
Author: tabish
Date: Sat Feb 16 18:55:49 2013
New Revision: 1446923

URL: http://svn.apache.org/r1446923
Log:
Allows the Backup to carry its priority tag.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.cpp?rev=1446923&r1=1446922&r2=1446923&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.cpp
Sat Feb 16 18:55:49 2013
@@ -25,7 +25,7 @@ using namespace activemq::transport::fai
 
 ////////////////////////////////////////////////////////////////////////////////
 BackupTransport::BackupTransport(BackupTransportPool* parent) :
-    parent(parent), transport(), uri(), closed(true) {
+    parent(parent), transport(), uri(), closed(true), priority(false) {
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.h?rev=1446923&r1=1446922&r2=1446923&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/BackupTransport.h
Sat Feb 16 18:55:49 2013
@@ -34,7 +34,7 @@ namespace failover {
 
     class BackupTransportPool;
 
-    class AMQCPP_API BackupTransport: public DefaultTransportListener {
+    class AMQCPP_API BackupTransport : public DefaultTransportListener {
     private:
 
         // The parent of this Backup
@@ -49,6 +49,9 @@ namespace failover {
         // Indicates that the contained transport is not valid any longer.
         bool closed;
 
+        // Is this Transport one of the priority backups.
+        bool priority;
+
     private:
 
         BackupTransport(const BackupTransport&);
@@ -126,6 +129,22 @@ namespace failover {
             this->closed = value;
         }
 
+        /**
+         * @returns true if this transport was in the priority backup list.
+         */
+        bool isPriority() const {
+            return this->priority;
+        }
+
+        /**
+         * Set if this transport is a Priority backup or not.
+         *
+         * @param value
+         *      True if this is a priority backup.
+         */
+        void setPriority(bool value) {
+            this->priority = value;
+        }
     };
 
 }}}



Mime
View raw message