summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/OutputInterceptor.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-11-28 17:59:20 +0000
committerAlan Conway <aconway@apache.org>2008-11-28 17:59:20 +0000
commite0b5d705f146de1c9064b11ea6e36f77e38711bd (patch)
treea959fb33f4325c5e425007d0cd2132ecef40e451 /cpp/src/qpid/cluster/OutputInterceptor.cpp
parent564390efee9097b990ba3169503380237f87c18c (diff)
downloadqpid-python-e0b5d705f146de1c9064b11ea6e36f77e38711bd.tar.gz
Added cluster log messages.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@721542 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp')
-rw-r--r--cpp/src/qpid/cluster/OutputInterceptor.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp
index 68afb9bda0..0563899a1c 100644
--- a/cpp/src/qpid/cluster/OutputInterceptor.cpp
+++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp
@@ -46,12 +46,11 @@ void OutputInterceptor::send(framing::AMQFrame& f) {
void OutputInterceptor::activateOutput() {
Locker l(lock);
-
if (parent.isCatchUp())
next->activateOutput();
else {
+ QPID_LOG(trace, parent << " activateOutput - sending doOutput");
moreOutput = true;
- QPID_LOG(trace, &parent << " activateOutput - sending doOutput");
sendDoOutput();
}
}
@@ -59,10 +58,13 @@ void OutputInterceptor::activateOutput() {
// Called in write thread when the IO layer has no more data to write.
// We do nothing in the write thread, we run doOutput only on delivery
// of doOutput requests.
-bool OutputInterceptor::doOutput() { return false; }
+bool OutputInterceptor::doOutput() {
+ QPID_LOG(trace, parent << " write idle.");
+ return false;
+}
// Delivery of doOutput allows us to run the real connection doOutput()
-// which stocks up the write buffers with data.
+// which tranfers frames to the codec for writing.
//
void OutputInterceptor::deliverDoOutput(size_t requested) {
Locker l(lock);
@@ -81,20 +83,13 @@ void OutputInterceptor::deliverDoOutput(size_t requested) {
QPID_LOG(trace, "Delivered doOutput: requested=" << requested << " output=" << sent << " more=" << moreOutput);
if (parent.isLocal() && moreOutput) {
- QPID_LOG(trace, &parent << " deliverDoOutput - sending doOutput, more output available.");
+ QPID_LOG(trace, parent << " deliverDoOutput - sending doOutput, more output available.");
sendDoOutput();
}
else
doingOutput = false;
}
-void OutputInterceptor::startDoOutput() {
- if (!doingOutput) {
- QPID_LOG(trace, &parent << " startDoOutput - sending doOutput, more output available.");
- sendDoOutput();
- }
-}
-
// Send a doOutput request if one is not already in flight.
void OutputInterceptor::sendDoOutput() {
// Call with lock held.
@@ -109,7 +104,7 @@ void OutputInterceptor::sendDoOutput() {
//
// FIXME aconway 2008-10-16: use ++parent.mcastSeq as sequence no,not 0
parent.getCluster().mcastControl(ClusterConnectionDeliverDoOutputBody(ProtocolVersion(), request), parent.getId(), 0);
- QPID_LOG(trace, &parent << "Send doOutput request for " << request);
+ QPID_LOG(trace, parent << "Send doOutput request for " << request);
}
void OutputInterceptor::setOutputHandler(sys::ConnectionOutputHandler& h) {