You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2007/02/14 16:38:58 UTC
svn commit: r507582 - in /incubator/qpid/trunk/qpid/cpp/lib/client:
ClientChannel.cpp ClientQueue.cpp ClientQueue.h
Author: gsim
Date: Wed Feb 14 07:38:57 2007
New Revision: 507582
URL: http://svn.apache.org/viewvc?view=rev&rev=507582
Log:
Add durability property to queues and pass this to broker on declare.
Modified:
incubator/qpid/trunk/qpid/cpp/lib/client/ClientChannel.cpp
incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.cpp
incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.h
Modified: incubator/qpid/trunk/qpid/cpp/lib/client/ClientChannel.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/client/ClientChannel.cpp?view=diff&rev=507582&r1=507581&r2=507582
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/client/ClientChannel.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/client/ClientChannel.cpp Wed Feb 14 07:38:57 2007
@@ -87,7 +87,7 @@
void Channel::declareQueue(Queue& queue, bool synch){
string name = queue.getName();
FieldTable args;
- AMQFrame* frame = new AMQFrame(version, id, new QueueDeclareBody(version, 0, name, false, false,
+ AMQFrame* frame = new AMQFrame(version, id, new QueueDeclareBody(version, 0, name, false/*passive*/, queue.isDurable(),
queue.isExclusive(),
queue.isAutoDelete(), !synch, args));
if(synch){
Modified: incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.cpp?view=diff&rev=507582&r1=507581&r2=507582
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.cpp Wed Feb 14 07:38:57 2007
@@ -20,14 +20,14 @@
*/
#include <ClientQueue.h>
-qpid::client::Queue::Queue() : name(""), autodelete(true), exclusive(true){}
+qpid::client::Queue::Queue() : name(""), autodelete(true), exclusive(true), durable(false){}
-qpid::client::Queue::Queue(std::string _name) : name(_name), autodelete(false), exclusive(false){}
+qpid::client::Queue::Queue(std::string _name) : name(_name), autodelete(false), exclusive(false), durable(false){}
-qpid::client::Queue::Queue(std::string _name, bool temp) : name(_name), autodelete(temp), exclusive(temp){}
+qpid::client::Queue::Queue(std::string _name, bool temp) : name(_name), autodelete(temp), exclusive(temp), durable(false){}
-qpid::client::Queue::Queue(std::string _name, bool _autodelete, bool _exclusive)
- : name(_name), autodelete(_autodelete), exclusive(_exclusive){}
+qpid::client::Queue::Queue(std::string _name, bool _autodelete, bool _exclusive, bool _durable)
+ : name(_name), autodelete(_autodelete), exclusive(_exclusive), durable(_durable){}
const std::string& qpid::client::Queue::getName() const{
return name;
@@ -43,6 +43,14 @@
bool qpid::client::Queue::isExclusive() const{
return exclusive;
+}
+
+bool qpid::client::Queue::isDurable() const{
+ return durable;
+}
+
+void qpid::client::Queue::setDurable(bool _durable){
+ durable = _durable;
}
Modified: incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.h?view=diff&rev=507582&r1=507581&r2=507582
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.h (original)
+++ incubator/qpid/trunk/qpid/cpp/lib/client/ClientQueue.h Wed Feb 14 07:38:57 2007
@@ -55,24 +55,25 @@
std::string name;
const bool autodelete;
const bool exclusive;
+ bool durable;
public:
/**
- * Creates an unnamed, temporary queue. A name will be
- * assigned to this queue instance by a call to
+ * Creates an unnamed, non-durable, temporary queue. A name
+ * will be assigned to this queue instance by a call to
* Channel::declareQueue().
*/
Queue();
/**
- * Creates a shared queue with a given name, that will not be
- * autodeleted.
+ * Creates a shared, non-durable, queue with a given name,
+ * that will not be autodeleted.
*
* @param name the name of the queue
*/
Queue(std::string name);
/**
- * Creates a queue with a given name.
+ * Creates a non-durable queue with a given name.
*
* @param name the name of the queue
*
@@ -81,17 +82,19 @@
*/
Queue(std::string name, bool temp);
/**
- * This constructor allows the autodelete and exclusive
- * propeties to be explictly set. Note however that if
+ * This constructor allows the autodelete, exclusive and
+ * durable propeties to be explictly set. Note however that if
* exclusive is true, autodelete has no meaning as exclusive
* queues are always destroyed when the connection that
* created them is closed.
*/
- Queue(std::string name, bool autodelete, bool exclusive);
+ Queue(std::string name, bool autodelete, bool exclusive, bool durable);
const std::string& getName() const;
void setName(const std::string&);
bool isAutoDelete() const;
bool isExclusive() const;
+ bool isDurable() const;
+ void setDurable(bool durable);
};
}