qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1150686 - in /qpid/branches/qpid-2920/qpid/cpp/src: qpid/broker/Cluster.h qpid/broker/NullCluster.h qpid/broker/Queue.cpp qpid/cluster/exp/BrokerHandler.cpp qpid/cluster/exp/BrokerHandler.h tests/BrokerClusterCalls.cpp
Date Mon, 25 Jul 2011 13:12:41 GMT
Author: aconway
Date: Mon Jul 25 13:12:40 2011
New Revision: 1150686

URL: http://svn.apache.org/viewvc?rev=1150686&view=rev
Log:
QPID-2920: Remove const from some broker::Cluster functions to allow cluster to work.

Modified:
    qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Cluster.h
    qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/NullCluster.h
    qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Queue.cpp
    qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.cpp
    qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.h
    qpid/branches/qpid-2920/qpid/cpp/src/tests/BrokerClusterCalls.cpp

Modified: qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Cluster.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Cluster.h?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Cluster.h (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Cluster.h Mon Jul 25 13:12:40 2011
@@ -77,25 +77,25 @@ class Cluster
     // Consumers
 
     /** A new consumer subscribes to a queue. */
-    virtual void consume(const Queue&, size_t consumerCount) = 0;
+    virtual void consume(Queue&, size_t consumerCount) = 0;
     /** A consumer cancels its subscription to a queue */
-    virtual void cancel(const Queue&, size_t consumerCount) = 0;
+    virtual void cancel(Queue&, size_t consumerCount) = 0;
 
     // Wiring
 
     /** A queue is created */
-    virtual void create(const Queue&) = 0;
+    virtual void create(Queue&) = 0;
     /** A queue is destroyed */
-    virtual void destroy(const Queue&) = 0;
+    virtual void destroy(Queue&) = 0;
     /** An exchange is created */
-    virtual void create(const Exchange&) = 0;
+    virtual void create(Exchange&) = 0;
     /** An exchange is destroyed */
-    virtual void destroy(const Exchange&) = 0;
+    virtual void destroy(Exchange&) = 0;
     /** A binding is created */
-    virtual void bind(const Queue&, const Exchange&,
+    virtual void bind(Queue&, Exchange&,
                       const std::string& key, const framing::FieldTable& args) =
0;
     /** A binding is removed */
-    virtual void unbind(const Queue&, const Exchange&,
+    virtual void unbind(Queue&, Exchange&,
                         const std::string& key, const framing::FieldTable& args)
= 0;
 };
 

Modified: qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/NullCluster.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/NullCluster.h?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/NullCluster.h (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/NullCluster.h Mon Jul 25 13:12:40 2011
@@ -46,18 +46,18 @@ class NullCluster : public Cluster
 
     // Consumers
 
-    virtual void consume(const Queue&, size_t) {}
-    virtual void cancel(const Queue&, size_t) {}
+    virtual void consume(Queue&, size_t) {}
+    virtual void cancel(Queue&, size_t) {}
 
     // Wiring
 
-    virtual void create(const Queue&) {}
-    virtual void destroy(const Queue&) {}
-    virtual void create(const Exchange&) {}
-    virtual void destroy(const Exchange&) {}
-    virtual void bind(const Queue&, const Exchange&,
+    virtual void create(Queue&) {}
+    virtual void destroy(Queue&) {}
+    virtual void create(Exchange&) {}
+    virtual void destroy(Exchange&) {}
+    virtual void bind(Queue&, Exchange&,
                       const std::string&, const framing::FieldTable&) {}
-    virtual void unbind(const Queue&, const Exchange&,
+    virtual void unbind(Queue&, Exchange&,
                         const std::string&, const framing::FieldTable&) {}
 };
 

Modified: qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Queue.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Queue.cpp?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Queue.cpp (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/qpid/broker/Queue.cpp Mon Jul 25 13:12:40 2011
@@ -226,6 +226,7 @@ void Queue::requeue(const QueuedMessage&
             }
         }
     }
+
     if (broker) broker->getCluster().release(msg);
     copy.notify();
 }

Modified: qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.cpp?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.cpp (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.cpp Mon Jul 25 13:12:40
2011
@@ -109,7 +109,7 @@ void BrokerHandler::dequeue(const broker
                    ProtocolVersion(), qm.queue->getName(), qm.position));
 }
 
-void BrokerHandler::create(const broker::Queue& q) {
+void BrokerHandler::create(broker::Queue& q) {
     if (tssNoReplicate) return;
     std::string data(q.encodedSize(), '\0');
     framing::Buffer buf(&data[0], data.size());
@@ -117,12 +117,12 @@ void BrokerHandler::create(const broker:
     core.mcast(ClusterWiringCreateQueueBody(ProtocolVersion(), data));
 }
 
-void BrokerHandler::destroy(const broker::Queue& q) {
+void BrokerHandler::destroy(broker::Queue& q) {
     if (tssNoReplicate) return;
     core.mcast(ClusterWiringDestroyQueueBody(ProtocolVersion(), q.getName()));
 }
 
-void BrokerHandler::create(const broker::Exchange& ex) {
+void BrokerHandler::create(broker::Exchange& ex) {
     if (tssNoReplicate) return;
     std::string data(ex.encodedSize(), '\0');
     framing::Buffer buf(&data[0], data.size());
@@ -130,12 +130,12 @@ void BrokerHandler::create(const broker:
     core.mcast(ClusterWiringCreateExchangeBody(ProtocolVersion(), data));
 }
 
-void BrokerHandler::destroy(const broker::Exchange& ex) {
+void BrokerHandler::destroy(broker::Exchange& ex) {
     if (tssNoReplicate) return;
     core.mcast(ClusterWiringDestroyExchangeBody(ProtocolVersion(), ex.getName()));
 }
 
-void BrokerHandler::bind(const broker::Queue& q, const broker::Exchange& ex,
+void BrokerHandler::bind(broker::Queue& q, broker::Exchange& ex,
                          const std::string& key, const framing::FieldTable& args)
 {
     if (tssNoReplicate) return;
@@ -143,8 +143,8 @@ void BrokerHandler::bind(const broker::Q
                    ProtocolVersion(), q.getName(), ex.getName(), key, args));
 }
 
-void BrokerHandler::unbind(const broker::Queue& q, const broker::Exchange& ex,
-                         const std::string& key, const framing::FieldTable& args)
+void BrokerHandler::unbind(broker::Queue& q, broker::Exchange& ex,
+                           const std::string& key, const framing::FieldTable& args)
 {
     if (tssNoReplicate) return;
     core.mcast(ClusterWiringUnbindBody(

Modified: qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.h
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.h?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.h (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/qpid/cluster/exp/BrokerHandler.h Mon Jul 25 13:12:40
2011
@@ -60,18 +60,18 @@ class BrokerHandler : public broker::Clu
 
     // Consumers
 
-    void consume(const broker::Queue&, size_t) {}
-    void cancel(const broker::Queue&, size_t) {}
+    void consume(broker::Queue&, size_t) {}
+    void cancel(broker::Queue&, size_t) {}
 
     // Wiring
 
-    void create(const broker::Queue&);
-    void destroy(const broker::Queue&);
-    void create(const broker::Exchange&);
-    void destroy(const broker::Exchange&);
-    void bind(const broker::Queue&, const broker::Exchange&,
+    void create(broker::Queue&);
+    void destroy(broker::Queue&);
+    void create(broker::Exchange&);
+    void destroy(broker::Exchange&);
+    void bind(broker::Queue&, broker::Exchange&,
               const std::string&, const framing::FieldTable&);
-    void unbind(const broker::Queue&, const broker::Exchange&,
+    void unbind(broker::Queue&, broker::Exchange&,
                 const std::string&, const framing::FieldTable&);
 
 

Modified: qpid/branches/qpid-2920/qpid/cpp/src/tests/BrokerClusterCalls.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2920/qpid/cpp/src/tests/BrokerClusterCalls.cpp?rev=1150686&r1=1150685&r2=1150686&view=diff
==============================================================================
--- qpid/branches/qpid-2920/qpid/cpp/src/tests/BrokerClusterCalls.cpp (original)
+++ qpid/branches/qpid-2920/qpid/cpp/src/tests/BrokerClusterCalls.cpp Mon Jul 25 13:12:40
2011
@@ -95,23 +95,23 @@ class DummyCluster : public broker::Clus
 
     // Consumers
 
-    virtual void consume(const broker::Queue& q, size_t n) {
+    virtual void consume(broker::Queue& q, size_t n) {
         history += (format("consume(%s, %d)") % q.getName() % n).str();
     }
-    virtual void cancel(const broker::Queue& q, size_t n) {
+    virtual void cancel(broker::Queue& q, size_t n) {
         history += (format("cancel(%s, %d)") % q.getName() % n).str();
     }
 
     // Wiring
 
-    virtual void create(const broker::Queue& q) { recordStr("createq", q.getName());
}
-    virtual void destroy(const broker::Queue& q) { recordStr("destroyq", q.getName());
}
-    virtual void create(const broker::Exchange& ex) { recordStr("createex", ex.getName());
}
-    virtual void destroy(const broker::Exchange& ex) { recordStr("destroyex", ex.getName());
}
-    virtual void bind(const broker::Queue& q, const broker::Exchange& ex, const std::string&
key, const framing::FieldTable& /*args*/) {
+    virtual void create(broker::Queue& q) { recordStr("createq", q.getName()); }
+    virtual void destroy(broker::Queue& q) { recordStr("destroyq", q.getName()); }
+    virtual void create(broker::Exchange& ex) { recordStr("createex", ex.getName());
}
+    virtual void destroy(broker::Exchange& ex) { recordStr("destroyex", ex.getName());
}
+    virtual void bind(broker::Queue& q, broker::Exchange& ex, const std::string&
key, const framing::FieldTable& /*args*/) {
         history += (format("bind(%s, %s, %s)") % q.getName() % ex.getName() % key).str();
     }
-    virtual void unbind(const broker::Queue& q, const broker::Exchange& ex, const
std::string& key, const framing::FieldTable& /*args*/) {
+    virtual void unbind(broker::Queue& q, broker::Exchange& ex, const std::string&
key, const framing::FieldTable& /*args*/) {
         history += (format("unbind(%s, %s, %s)")% q.getName()%ex.getName()%key).str();
     }
     vector<string> history;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message