diff options
| author | Alan Conway <aconway@apache.org> | 2008-10-20 19:37:06 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2008-10-20 19:37:06 +0000 |
| commit | e8f99e5859125f5a1a9ab89116946b76e822cb30 (patch) | |
| tree | fb978b3ef6383be8b51f1eba682bb77c36ad1421 /cpp/src/qpid/broker | |
| parent | 80064052ca9f0fda855da693215b4d18e2abea0c (diff) | |
| download | qpid-python-e8f99e5859125f5a1a9ab89116946b76e822cb30.tar.gz | |
cluster: DumpClient replicates session MessageBuilder.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@706381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker')
| -rw-r--r-- | cpp/src/qpid/broker/IncompleteMessageList.cpp | 6 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/IncompleteMessageList.h | 3 | ||||
| -rw-r--r-- | cpp/src/qpid/broker/SessionState.h | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/IncompleteMessageList.cpp b/cpp/src/qpid/broker/IncompleteMessageList.cpp index dd7bbfc067..edb3721a40 100644 --- a/cpp/src/qpid/broker/IncompleteMessageList.cpp +++ b/cpp/src/qpid/broker/IncompleteMessageList.cpp @@ -30,7 +30,7 @@ void IncompleteMessageList::add(boost::intrusive_ptr<Message> msg) incomplete.push_back(msg); } -void IncompleteMessageList::process(CompletionListener l, bool sync) +void IncompleteMessageList::process(const CompletionListener& l, bool sync) { while (!incomplete.empty()) { boost::intrusive_ptr<Message>& msg = incomplete.front(); @@ -48,4 +48,8 @@ void IncompleteMessageList::process(CompletionListener l, bool sync) } } +void IncompleteMessageList::each(const CompletionListener& l) { + std::for_each(incomplete.begin(), incomplete.end(), l); +} + }} diff --git a/cpp/src/qpid/broker/IncompleteMessageList.h b/cpp/src/qpid/broker/IncompleteMessageList.h index 2cfd7bfee5..36cc1b4bf5 100644 --- a/cpp/src/qpid/broker/IncompleteMessageList.h +++ b/cpp/src/qpid/broker/IncompleteMessageList.h @@ -39,7 +39,8 @@ public: typedef boost::function<void(boost::intrusive_ptr<Message>)> CompletionListener; void add(boost::intrusive_ptr<Message> msg); - void process(CompletionListener l, bool sync); + void process(const CompletionListener& l, bool sync); + void each(const CompletionListener& l); }; diff --git a/cpp/src/qpid/broker/SessionState.h b/cpp/src/qpid/broker/SessionState.h index ba750f0cc6..4c5a7a66b7 100644 --- a/cpp/src/qpid/broker/SessionState.h +++ b/cpp/src/qpid/broker/SessionState.h @@ -102,7 +102,9 @@ class SessionState : public qpid::SessionState, template <class F> void eachConsumer(F f) { semanticState.eachConsumer(f); } SemanticState::ConsumerImpl& getConsumer(const string& dest) { return semanticState.find(dest); } - + + boost::intrusive_ptr<Message> getMessageInProgress() { return msgBuilder.getMessage(); } + private: void handleCommand(framing::AMQMethodBody* method, const framing::SequenceNumber& id); |
