summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/client')
-rw-r--r--cpp/src/qpid/client/QueueOptions.cpp11
-rw-r--r--cpp/src/qpid/client/QueueOptions.h7
2 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/qpid/client/QueueOptions.cpp b/cpp/src/qpid/client/QueueOptions.cpp
index d0fd6f1e5c..5d1cb74efd 100644
--- a/cpp/src/qpid/client/QueueOptions.cpp
+++ b/cpp/src/qpid/client/QueueOptions.cpp
@@ -38,6 +38,7 @@ const std::string QueueOptions::strRING_STRICT("ring_strict");
const std::string QueueOptions::strLastValueQueue("qpid.last_value_queue");
const std::string QueueOptions::strOptimisticConsume("qpid.optimistic_consume");
const std::string QueueOptions::strPersistLastNode("qpid.persist_last_node");
+const std::string QueueOptions::strLVQMatchProperty("qpid.LVQ_key");
QueueOptions::~QueueOptions()
@@ -83,15 +84,17 @@ void QueueOptions::setPersistLastNode()
void QueueOptions::setOrdering(QueueOrderingPolicy op)
{
if (op == LVQ){
- // TODO, add and test options with LVQ patch.
- // also set the key match for LVQ
- //setString(LastValueQueue, 1);
-
+ setInt(strLastValueQueue, 1);
}else{
clearOrdering();
}
}
+void QueueOptions::getLVQKey(std::string& key)
+{
+ key.assign(strLVQMatchProperty);
+}
+
void QueueOptions::clearSizePolicy()
{
erase(strMaxCountKey);
diff --git a/cpp/src/qpid/client/QueueOptions.h b/cpp/src/qpid/client/QueueOptions.h
index 21333794ac..37cb8616e3 100644
--- a/cpp/src/qpid/client/QueueOptions.h
+++ b/cpp/src/qpid/client/QueueOptions.h
@@ -86,6 +86,11 @@ class QueueOptions: public framing::FieldTable
void clearPersistLastNode();
/**
+ * get the key used match LVQ in args for message transfer
+ */
+ void getLVQKey(std::string& key);
+
+ /**
* Use default odering policy
*/
void clearOrdering();
@@ -100,7 +105,7 @@ class QueueOptions: public framing::FieldTable
static const std::string strLastValueQueue;
static const std::string strOptimisticConsume;
static const std::string strPersistLastNode;
- private:
+ static const std::string strLVQMatchProperty;