diff options
author | Alan Conway <aconway@apache.org> | 2009-01-28 20:48:23 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2009-01-28 20:48:23 +0000 |
commit | bea927aff631a66be6c8b509ceb22f676dcc2900 (patch) | |
tree | ea4e3f4bd4c0ff646a79278b179eaaafb69ef55e /cpp/src | |
parent | 56037de983e759c984836f52f4762420ae438748 (diff) | |
download | qpid-python-bea927aff631a66be6c8b509ceb22f676dcc2900.tar.gz |
Remove defunct --cluster-mcast-max optionn.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@738618 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.cpp | 4 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Cluster.h | 2 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/ClusterPlugin.cpp | 12 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Multicaster.cpp | 25 | ||||
-rw-r--r-- | cpp/src/qpid/cluster/Multicaster.h | 2 |
5 files changed, 10 insertions, 35 deletions
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp index 2939b0c203..d970523534 100644 --- a/cpp/src/qpid/cluster/Cluster.cpp +++ b/cpp/src/qpid/cluster/Cluster.cpp @@ -86,7 +86,7 @@ struct ClusterDispatcher : public framing::AMQP_AllOperations::ClusterHandler { bool invoke(AMQBody& body) { return framing::invoke(*this, body).wasHandled(); } }; -Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b, bool quorum_, size_t readMax_, size_t writeEstimate_, size_t mcastMax) : +Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b, bool quorum_, size_t readMax_, size_t writeEstimate_) : broker(b), mgmtObject(0), poller(b.getPoller()), @@ -96,7 +96,7 @@ Cluster::Cluster(const std::string& name_, const Url& url_, broker::Broker& b, b myId(cpg.self()), readMax(readMax_), writeEstimate(writeEstimate_), - mcast(cpg, mcastMax, poller, boost::bind(&Cluster::leave, this)), + mcast(cpg, poller, boost::bind(&Cluster::leave, this)), dispatcher(cpg, poller, boost::bind(&Cluster::leave, this)), deliverEventQueue(ClusterQueueHandler<Event>(this, boost::bind(&Cluster::deliveredEvent, this, _1), "event queue"), poller), deliverFrameQueue(ClusterQueueHandler<EventFrame>(this, boost::bind(&Cluster::deliveredFrame, this, _1), "frame queue"), poller), diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h index 711383d4dd..0d99bebdd4 100644 --- a/cpp/src/qpid/cluster/Cluster.h +++ b/cpp/src/qpid/cluster/Cluster.h @@ -71,7 +71,7 @@ class Cluster : private Cpg::Handler, public management::Manageable { * Join a cluster. */ Cluster(const std::string& name, const Url& url, broker::Broker&, bool useQuorum, - size_t readMax, size_t writeEstimate, size_t mcastMax); + size_t readMax, size_t writeEstimate); virtual ~Cluster(); diff --git a/cpp/src/qpid/cluster/ClusterPlugin.cpp b/cpp/src/qpid/cluster/ClusterPlugin.cpp index 6cc4024b1c..f523317f68 100644 --- a/cpp/src/qpid/cluster/ClusterPlugin.cpp +++ b/cpp/src/qpid/cluster/ClusterPlugin.cpp @@ -52,9 +52,9 @@ struct ClusterValues { string name; string url; bool quorum; - size_t readMax, writeEstimate, mcastMax; + size_t readMax, writeEstimate; - ClusterValues() : quorum(false), readMax(10), writeEstimate(64), mcastMax(0) {} + ClusterValues() : quorum(false), readMax(10), writeEstimate(64) {} Url getUrl(uint16_t port) const { if (url.empty()) return Url::getIpAddressesUrl(port); @@ -79,11 +79,9 @@ struct ClusterOptions : public Options { ("cluster-cman", optValue(values.quorum), "Integrate with Cluster Manager (CMAN) cluster.") #endif ("cluster-read-max", optValue(values.readMax,"N"), - "Experimental: Max unreplicated reads per connetion connection. 0=no limit.") - ("cluster-mcast-max", optValue(values.mcastMax,"N"), - "Experimental: Max outstanding multicasts per broker. 0=no limit.") + "Experimental: Limit per-client-connection queue of read buffers. 0=no limit.") ("cluster-write-estimate", optValue(values.writeEstimate, "Kb"), - "Experimental: initial estimate for connection writes rate per multicast cycle"); + "Experimental: initial estimate for connection write rate per multicast cycle"); } }; @@ -147,7 +145,7 @@ struct ClusterPlugin : public Plugin { values.getUrl(broker->getPort(Broker::TCP_TRANSPORT)), *broker, values.quorum, - values.readMax, values.writeEstimate*1024, values.mcastMax + values.readMax, values.writeEstimate*1024 ); broker->setConnectionFactory( boost::shared_ptr<sys::ConnectionCodec::Factory>( diff --git a/cpp/src/qpid/cluster/Multicaster.cpp b/cpp/src/qpid/cluster/Multicaster.cpp index 446722745c..239b3f5f35 100644 --- a/cpp/src/qpid/cluster/Multicaster.cpp +++ b/cpp/src/qpid/cluster/Multicaster.cpp @@ -28,14 +28,12 @@ namespace qpid { namespace cluster { -Multicaster::Multicaster(Cpg& cpg_, size_t mcastMax_, +Multicaster::Multicaster(Cpg& cpg_, const boost::shared_ptr<sys::Poller>& poller, boost::function<void()> onError_) : onError(onError_), cpg(cpg_), queue(boost::bind(&Multicaster::sendMcast, this, _1), poller), - holding(true), - mcastMax(mcastMax_), - pending(0) + holding(true) { queue.start(); } @@ -69,22 +67,10 @@ void Multicaster::sendMcast(PollableEventQueue::Queue& values) { try { PollableEventQueue::Queue::iterator i = values.begin(); while( i != values.end()) { - if (mcastMax) { - sys::Mutex::ScopedLock l(lock); - if (pending == mcastMax) { - queue.stop(); - break ; - } - ++pending; - } QPID_LATENCY_RECORD("mcast send queue", *i); iovec iov = i->toIovec(); if (!cpg.mcast(&iov, 1)) { // cpg didn't send because of CPG flow control. - if (mcastMax) { - sys::Mutex::ScopedLock l(lock); - --pending; - } break; } ++i; @@ -108,13 +94,6 @@ void Multicaster::release() { void Multicaster::selfDeliver(const Event& e) { sys::Mutex::ScopedLock l(lock); QPID_LATENCY_RECORD("cpg self deliver", e); - if (mcastMax) { - assert(pending > 0); - assert(pending <= mcastMax); - if (pending == mcastMax) - queue.start(); - --pending; - } } }} // namespace qpid::cluster diff --git a/cpp/src/qpid/cluster/Multicaster.h b/cpp/src/qpid/cluster/Multicaster.h index 7e62134b96..1dfee47bd5 100644 --- a/cpp/src/qpid/cluster/Multicaster.h +++ b/cpp/src/qpid/cluster/Multicaster.h @@ -46,7 +46,6 @@ class Multicaster public: /** Starts in holding mode: connection data events are held, other events are mcast */ Multicaster(Cpg& cpg_, - size_t mcastMax, const boost::shared_ptr<sys::Poller>&, boost::function<void()> onError ); @@ -71,7 +70,6 @@ class Multicaster bool holding; PlainEventQueue holdingQueue; std::vector<struct ::iovec> ioVector; - size_t mcastMax, pending; }; }} // namespace qpid::cluster |