summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-10-20 13:58:23 +0000
committerAlan Conway <aconway@apache.org>2008-10-20 13:58:23 +0000
commit40e17612ff0494ccd440a3a0a3789daabcfb3684 (patch)
tree569d53ad5f6280a151eb1f7019c92e9d3e4f9848 /cpp/src/qpid/broker
parentac0eb22016bf9ae223f147927ba76add8d25dc31 (diff)
downloadqpid-python-40e17612ff0494ccd440a3a0a3789daabcfb3684.tar.gz
cluster: DumpClient updates consumer notifyEnabled and blocked.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@706293 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
-rw-r--r--cpp/src/qpid/broker/SemanticState.cpp5
-rw-r--r--cpp/src/qpid/broker/SemanticState.h8
-rw-r--r--cpp/src/qpid/broker/SessionState.h1
3 files changed, 12 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/SemanticState.cpp b/cpp/src/qpid/broker/SemanticState.cpp
index 177157bbb6..4d735c9abc 100644
--- a/cpp/src/qpid/broker/SemanticState.cpp
+++ b/cpp/src/qpid/broker/SemanticState.cpp
@@ -616,6 +616,11 @@ void SemanticState::ConsumerImpl::disableNotify()
notifyEnabled = false;
}
+bool SemanticState::ConsumerImpl::isNotifyEnabld() {
+ Mutex::ScopedLock l(lock);
+ return notifyEnabled;
+}
+
void SemanticState::ConsumerImpl::notify()
{
//TODO: alter this, don't want to hold locks across external
diff --git a/cpp/src/qpid/broker/SemanticState.h b/cpp/src/qpid/broker/SemanticState.h
index 7b72921210..c2d8cc7d0b 100644
--- a/cpp/src/qpid/broker/SemanticState.h
+++ b/cpp/src/qpid/broker/SemanticState.h
@@ -100,6 +100,7 @@ class SemanticState : public sys::OutputTask,
void disableNotify();
void enableNotify();
void notify();
+ bool isNotifyEnabld();
void setWindowMode();
void setCreditMode();
@@ -109,7 +110,8 @@ class SemanticState : public sys::OutputTask,
void stop();
void complete(DeliveryRecord&);
Queue::shared_ptr getQueue() { return queue; }
- bool isBlocked() const { return blocked; }
+ bool isBlocked() const { return blocked; }
+ bool setBlocked(bool set) { std::swap(set, blocked); return set; }
bool hasOutput();
bool doOutput();
@@ -150,7 +152,7 @@ class SemanticState : public sys::OutputTask,
void route(boost::intrusive_ptr<Message> msg, Deliverable& strategy);
void record(const DeliveryRecord& delivery);
void checkDtxTimeout();
- ConsumerImpl& find(const std::string& destination);
+
void complete(DeliveryRecord&);
AckRange findRange(DeliveryId first, DeliveryId last);
void requestDispatch();
@@ -162,6 +164,8 @@ class SemanticState : public sys::OutputTask,
~SemanticState();
SessionContext& getSession() { return session; }
+
+ ConsumerImpl& find(const std::string& destination);
/**
* Get named queue, never returns 0.
diff --git a/cpp/src/qpid/broker/SessionState.h b/cpp/src/qpid/broker/SessionState.h
index 66eba9d2a9..ba750f0cc6 100644
--- a/cpp/src/qpid/broker/SessionState.h
+++ b/cpp/src/qpid/broker/SessionState.h
@@ -101,6 +101,7 @@ class SessionState : public qpid::SessionState,
void readyToSend();
template <class F> void eachConsumer(F f) { semanticState.eachConsumer(f); }
+ SemanticState::ConsumerImpl& getConsumer(const string& dest) { return semanticState.find(dest); }
private: