summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionAdapter.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-08-12 18:29:03 +0000
committerAlan Conway <aconway@apache.org>2009-08-12 18:29:03 +0000
commit61aa0a45a6d9311e72da05159377046e9654cf44 (patch)
treeac4d1b50b567fbafeb8f31a2327488100741ce8e /cpp/src/qpid/broker/SessionAdapter.cpp
parent01054223a90825cc65388397f5812b84eeba09a4 (diff)
downloadqpid-python-61aa0a45a6d9311e72da05159377046e9654cf44.tar.gz
Optimized handling of accepts and completions.
SemanticState::accept/completed now make a single pass through the SequenceSet of commands and the unacked DeliveryRecord list in parallel, rather than doing a pass through unacked for every range in the SequenceSet. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@803655 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionAdapter.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp
index 8eed673add..b0c5e9ea00 100644
--- a/cpp/src/qpid/broker/SessionAdapter.cpp
+++ b/cpp/src/qpid/broker/SessionAdapter.cpp
@@ -429,13 +429,11 @@ void SessionAdapter::QueueHandlerImpl::delete_(const string& queue, bool ifUnuse
}
}
-
SessionAdapter::MessageHandlerImpl::MessageHandlerImpl(SemanticState& s) :
HandlerHelper(s),
releaseRedeliveredOp(boost::bind(&SemanticState::release, &state, _1, _2, true)),
releaseOp(boost::bind(&SemanticState::release, &state, _1, _2, false)),
- rejectOp(boost::bind(&SemanticState::reject, &state, _1, _2)),
- acceptOp(boost::bind(&SemanticState::accepted, &state, _1, _2))
+ rejectOp(boost::bind(&SemanticState::reject, &state, _1, _2))
{}
//
@@ -547,8 +545,7 @@ void SessionAdapter::MessageHandlerImpl::stop(const std::string& destination)
void SessionAdapter::MessageHandlerImpl::accept(const framing::SequenceSet& commands)
{
-
- commands.for_each(acceptOp);
+ state.accepted(commands);
}
framing::MessageAcquireResult SessionAdapter::MessageHandlerImpl::acquire(const framing::SequenceSet& transfers)