From 61aa0a45a6d9311e72da05159377046e9654cf44 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 12 Aug 2009 18:29:03 +0000 Subject: 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 --- cpp/src/qpid/broker/SessionAdapter.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp') 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) -- cgit v1.2.1