summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/Queue.h
diff options
context:
space:
mode:
authorJustin Ross <jross@apache.org>2013-09-23 13:38:45 +0000
committerJustin Ross <jross@apache.org>2013-09-23 13:38:45 +0000
commit21ea51552d12cfa09478db0ea427fc7244b7235a (patch)
tree2ce46cfadcde434f79c3a15e54d3070dc52c3f35 /qpid/cpp/src/qpid/broker/Queue.h
parent91edb93e2362fc717091c07127145ba7f5a559a5 (diff)
downloadqpid-python-21ea51552d12cfa09478db0ea427fc7244b7235a.tar.gz
QPID-5084: Track durable queue ownership across restarts; a patch from Pavel Moravec and Ernie Allen
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1525587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/Queue.h')
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h
index a832b95feb..a7eb71c6bb 100644
--- a/qpid/cpp/src/qpid/broker/Queue.h
+++ b/qpid/cpp/src/qpid/broker/Queue.h
@@ -204,6 +204,7 @@ class Queue : public boost::enable_shared_from_this<Queue>,
QueueDepth current;
QueueBindings bindings;
std::string alternateExchangeName;
+ std::string userId; // queue owner for ACL quota purposes
boost::shared_ptr<Exchange> alternateExchange;
framing::SequenceNumber sequence;
qmf::org::apache::qpid::broker::Queue::shared_ptr mgmtObject;
@@ -384,6 +385,10 @@ class Queue : public boost::enable_shared_from_this<Queue>,
/** Get the message at position pos, returns true if found and sets msg */
QPID_BROKER_EXTERN bool find(framing::SequenceNumber pos, Message& msg ) const;
+ // Remember the queue's owner so acl quotas can be restored after restart
+ void setOwningUser(std::string& _userId) { userId = _userId; }
+ void updateAclUserQueueCount();
+
QPID_BROKER_EXTERN void setAlternateExchange(boost::shared_ptr<Exchange> exchange);
QPID_BROKER_EXTERN boost::shared_ptr<Exchange> getAlternateExchange();
QPID_BROKER_EXTERN bool isLocal(const Message& msg);