summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-04-23 21:06:35 +0000
committerStephen D. Huston <shuston@apache.org>2009-04-23 21:06:35 +0000
commita7259adba14345898e78b483b7620340ffa5cfc5 (patch)
treee8d26c0981a666442ad4aa2fff5ddb87c5ce5866 /qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
parent8d32b03448e8e1ba6319fc0ac484d0ab54b29b38 (diff)
downloadqpid-python-a7259adba14345898e78b483b7620340ffa5cfc5.tar.gz
Merge in trunk changes from r758432:768028cmake
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/cmake@768053 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp')
-rw-r--r--qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
index cd42446016..6af114a662 100644
--- a/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
+++ b/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
@@ -32,8 +32,9 @@ namespace cluster {
using namespace framing;
-OutputInterceptor::OutputInterceptor(
- cluster::Connection& p, sys::ConnectionOutputHandler& h)
+NoOpConnectionOutputHandler OutputInterceptor::discardHandler;
+
+OutputInterceptor::OutputInterceptor(Connection& p, sys::ConnectionOutputHandler& h)
: parent(p), closing(false), next(&h), sent(),
writeEstimate(p.getCluster().getWriteEstimate()),
moreOutput(), doingOutput()
@@ -47,7 +48,6 @@ void OutputInterceptor::send(framing::AMQFrame& f) {
}
if (!parent.isCatchUp())
sent += f.encodedSize();
- QPID_LATENCY_RECORD("up to write queue", f);
}
void OutputInterceptor::activateOutput() {
@@ -98,7 +98,6 @@ void OutputInterceptor::deliverDoOutput(size_t requested) {
// Send a doOutput request if one is not already in flight.
void OutputInterceptor::sendDoOutput() {
if (!parent.isLocal()) return;
- QPID_LATENCY_INIT(*this);
doingOutput = true;
size_t request = writeEstimate.sending(getBuffered());
@@ -111,10 +110,10 @@ void OutputInterceptor::sendDoOutput() {
QPID_LOG(trace, parent << "Send doOutput request for " << request);
}
-void OutputInterceptor::closeOutput(sys::ConnectionOutputHandler& h) {
+void OutputInterceptor::closeOutput() {
sys::Mutex::ScopedLock l(lock);
closing = true;
- next = &h;
+ next = &discardHandler;
}
void OutputInterceptor::close() {