From 11e35dd461a19e23053756cee5c4ec214fa5597f Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 9 Jan 2009 04:50:35 +0000 Subject: Added --cluster-read-max: max number of outstanding mcasts in CPG buffers. Work around problems with CPG flow control. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732925 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/Multicaster.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/cluster/Multicaster.h') diff --git a/cpp/src/qpid/cluster/Multicaster.h b/cpp/src/qpid/cluster/Multicaster.h index a63bbc2180..ef8be8c229 100644 --- a/cpp/src/qpid/cluster/Multicaster.h +++ b/cpp/src/qpid/cluster/Multicaster.h @@ -46,13 +46,19 @@ class Multicaster { public: /** Starts in holding mode: connection data events are held, other events are mcast */ - Multicaster(Cpg& cpg_, const boost::shared_ptr&, boost::function onError ); + Multicaster(Cpg& cpg_, + size_t mcastMax, + const boost::shared_ptr&, + boost::function onError + ); void mcastControl(const framing::AMQBody& controlBody, const ConnectionId&); void mcastBuffer(const char*, size_t, const ConnectionId&); void mcast(const Event& e); /** End holding mode, held events are mcast */ void release(); - + /** Call when events are self-delivered to manage flow control. */ + void delivered(const Event& e); + private: typedef sys::PollableQueue PollableEventQueue; typedef std::deque PlainEventQueue; @@ -66,6 +72,7 @@ class Multicaster bool holding; PlainEventQueue holdingQueue; std::vector ioVector; + size_t mcastMax, pending; }; }} // namespace qpid::cluster -- cgit v1.2.1