diff options
author | Alan Conway <aconway@apache.org> | 2008-09-24 17:34:08 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-09-24 17:34:08 +0000 |
commit | a2a56cf9a7483e165fb579d0b519b284d02009e3 (patch) | |
tree | 11264fc87ea6e54c54b476e245ad4ee9c83faaeb /cpp/src/qpid/cluster/OutputInterceptor.cpp | |
parent | 30be110b6914959a1eaee4803ff8c1c9938db7bb (diff) | |
download | qpid-python-a2a56cf9a7483e165fb579d0b519b284d02009e3.tar.gz |
Cluster replicates session command sequence state and consumers to newcomers.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@698666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/OutputInterceptor.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp index 4424864787..e69992517c 100644 --- a/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -45,10 +45,12 @@ void OutputInterceptor::send(framing::AMQFrame& f) { void OutputInterceptor::activateOutput() { Locker l(lock); + if (parent.isCatchUp()) next->activateOutput(); else { moreOutput = true; + QPID_LOG(trace, &parent << " activateOutput - sending doOutput"); sendDoOutput(); } } @@ -79,15 +81,19 @@ void OutputInterceptor::deliverDoOutput(size_t requested) { QPID_LOG(trace, "Delivered doOutput: requested=" << requested << " output=" << sent << " more=" << moreOutput); - if (parent.isLocal() && moreOutput) + if (parent.isLocal() && moreOutput) { + QPID_LOG(trace, &parent << " deliverDoOutput - sending doOutput, more output available."); sendDoOutput(); + } else doingOutput = false; } void OutputInterceptor::startDoOutput() { - if (!doingOutput) + if (!doingOutput) { + QPID_LOG(trace, &parent << " startDoOutput - sending doOutput, more output available."); sendDoOutput(); + } } // Send a doOutput request if one is not already in flight. @@ -111,4 +117,14 @@ void OutputInterceptor::setOutputHandler(sys::ConnectionOutputHandler& h) { next = &h; } +void OutputInterceptor::close() { + Locker l(lock); + next->close(); +} + +size_t OutputInterceptor::getBuffered() const { + Locker l(lock); + return next->getBuffered(); +} + }} // namespace qpid::cluster |