diff --git a/cpp/src/IceStorm/Instrumentation.h b/cpp/src/IceStorm/Instrumentation.h index 718c447dc91..bf084e4b188 100644 --- a/cpp/src/IceStorm/Instrumentation.h +++ b/cpp/src/IceStorm/Instrumentation.h @@ -99,14 +99,11 @@ namespace IceStorm::Instrumentation /** * This method should return an observer for the given topic. - * @param svc The service name. * @param name The topic name. * @param old The previous observer, only set when updating an existing observer. */ - virtual std::shared_ptr getTopicObserver( - const std::string& svc, - const std::string& name, - const std::shared_ptr& old) = 0; + virtual std::shared_ptr + getTopicObserver(const std::string& name, const std::shared_ptr& old) = 0; /** * This method should return an observer for the given subscriber. @@ -115,7 +112,6 @@ namespace IceStorm::Instrumentation * @param old The previous observer, only set when updating an existing observer. */ virtual std::shared_ptr getSubscriberObserver( - const std::string& svc, const std::string& topic, const Ice::ObjectPrx& prx, const QoS& q, diff --git a/cpp/src/IceStorm/InstrumentationI.cpp b/cpp/src/IceStorm/InstrumentationI.cpp index b6a71c9eb93..9f334409b6b 100644 --- a/cpp/src/IceStorm/InstrumentationI.cpp +++ b/cpp/src/IceStorm/InstrumentationI.cpp @@ -24,24 +24,19 @@ namespace public: Attributes() { - add("parent", &TopicHelper::getService); add("id", &TopicHelper::getId); add("topic", &TopicHelper::getId); - add("service", &TopicHelper::getService); } }; static Attributes attributes; - TopicHelper(const string& service, const string& name) : _service(service), _name(name) {} + TopicHelper(const string& name) : _name(name) {} virtual string operator()(const string& attribute) const { return attributes(this, attribute); } - const string& getService() const { return _service; } - const string& getId() const { return _name; } private: - const string& _service; const string& _name; }; @@ -58,7 +53,6 @@ namespace add("parent", &SubscriberHelper::getTopic); add("id", &SubscriberHelper::getId); add("topic", &SubscriberHelper::getTopic); - add("service", &SubscriberHelper::getService); add("identity", &SubscriberHelper::getIdentity); @@ -75,14 +69,12 @@ namespace static Attributes attributes; SubscriberHelper( - const string& svc, const string& topic, const Ice::ObjectPrx& proxy, const IceStorm::QoS& qos, optional link, SubscriberState state) - : _service(svc), - _topic(topic), + : _topic(topic), _proxy(proxy), _qos(qos), _link(std::move(link)), @@ -109,8 +101,6 @@ namespace throw invalid_argument(attribute); } - const string& getService() const { return _service; } - const string& getTopic() const { return _topic; } string getMode() const @@ -181,7 +171,6 @@ namespace } private: - const string& _service; const string& _topic; const Ice::ObjectPrx& _proxy; const IceStorm::QoS& _qos; @@ -287,16 +276,13 @@ TopicManagerObserverI::setObserverUpdater(const shared_ptr& upd } shared_ptr -TopicManagerObserverI::getTopicObserver( - const string& service, // TODO: should always be "IceStorm" - const string& topic, - const shared_ptr& old) +TopicManagerObserverI::getTopicObserver(const string& topic, const shared_ptr& old) { if (_topics.isEnabled()) { try { - return _topics.getObserver(TopicHelper(service, topic), old); + return _topics.getObserver(TopicHelper(topic), old); } catch (const exception& ex) { @@ -309,7 +295,6 @@ TopicManagerObserverI::getTopicObserver( shared_ptr TopicManagerObserverI::getSubscriberObserver( - const string& svc, const string& topic, const Ice::ObjectPrx& proxy, const IceStorm::QoS& qos, @@ -321,7 +306,7 @@ TopicManagerObserverI::getSubscriberObserver( { try { - return _subscribers.getObserver(SubscriberHelper(svc, topic, proxy, qos, link, state), old); + return _subscribers.getObserver(SubscriberHelper(topic, proxy, qos, link, state), old); } catch (const exception& ex) { diff --git a/cpp/src/IceStorm/InstrumentationI.h b/cpp/src/IceStorm/InstrumentationI.h index 3e4f55ea6c2..ed908d04d16 100644 --- a/cpp/src/IceStorm/InstrumentationI.h +++ b/cpp/src/IceStorm/InstrumentationI.h @@ -35,13 +35,10 @@ namespace IceStorm void setObserverUpdater(const std::shared_ptr&) override; - std::shared_ptr getTopicObserver( - const std::string&, - const std::string&, - const std::shared_ptr&) override; + std::shared_ptr + getTopicObserver(const std::string&, const std::shared_ptr&) override; std::shared_ptr getSubscriberObserver( - const std::string&, const std::string&, const Ice::ObjectPrx&, const IceStorm::QoS&, diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp index a3f0426ebab..b215a0d9e45 100644 --- a/cpp/src/IceStorm/Subscriber.cpp +++ b/cpp/src/IceStorm/Subscriber.cpp @@ -814,7 +814,6 @@ Subscriber::updateObserver() { assert(_rec.obj); _observer.attach(_instance->observer()->getSubscriberObserver( - "IceStorm", _rec.topicName, *_rec.obj, _rec.theQoS, @@ -852,7 +851,6 @@ Subscriber::Subscriber( { assert(_rec.obj); _observer.attach(_instance->observer()->getSubscriberObserver( - "IceStorm", _rec.topicName, *_rec.obj, _rec.theQoS, @@ -900,7 +898,6 @@ Subscriber::setState(Subscriber::SubscriberState state) { assert(_rec.obj); _observer.attach(_instance->observer()->getSubscriberObserver( - "IceStorm", _rec.topicName, *_rec.obj, _rec.theQoS, diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp index 7904effa854..ef4b91ff224 100644 --- a/cpp/src/IceStorm/TopicI.cpp +++ b/cpp/src/IceStorm/TopicI.cpp @@ -428,7 +428,7 @@ TopicImpl::TopicImpl( if (_instance->observer()) { - _observer.attach(_instance->observer()->getTopicObserver("IceStorm", _name, nullptr)); + _observer.attach(_instance->observer()->getTopicObserver(_name, nullptr)); } } catch (const std::exception&) @@ -1140,7 +1140,7 @@ TopicImpl::updateObserver() if (_instance->observer()) { - _observer.attach(_instance->observer()->getTopicObserver("IceStorm", _name, _observer.get())); + _observer.attach(_instance->observer()->getTopicObserver(_name, _observer.get())); } }