From a4bb50062ae675bd03fa99c1ccb3b20c481e837d Mon Sep 17 00:00:00 2001 From: Pavel Moravec Date: Tue, 29 Jul 2014 10:22:17 +0000 Subject: [QPID-5929]: Mark deprecated QMF fields as Deprecated and do some relevant code cleanup git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1614301 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/broker/Queue.cpp | 33 ---------------------- qpid/cpp/src/qpid/broker/Queue.h | 2 -- qpid/cpp/src/qpid/broker/SemanticState.cpp | 2 +- qpid/cpp/src/qpid/broker/SessionState.cpp | 1 - .../cpp/src/qpid/broker/amqp/ManagedConnection.cpp | 4 +-- qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp | 1 - qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp | 8 ------ qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h | 3 -- qpid/cpp/src/qpid/broker/management-schema.xml | 26 ++++++++--------- .../cpp/src/qpid/legacystore/management-schema.xml | 22 +++++++-------- .../cpp/src/qpid/linearstore/management-schema.xml | 28 +++++++++--------- 11 files changed, 40 insertions(+), 90 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp index bfc9059ad2..2f189da012 100644 --- a/qpid/cpp/src/qpid/broker/Queue.cpp +++ b/qpid/cpp/src/qpid/broker/Queue.cpp @@ -1387,39 +1387,6 @@ void Queue::countRejected() const } } -void Queue::countFlowedToDisk(uint64_t size) const -{ - if (mgmtObject) { - _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); - qStats->msgFtdEnqueues += 1; - qStats->byteFtdEnqueues += size; - mgmtObject->statisticsUpdated(); - if (brokerMgmtObject) { - _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); - bStats->msgFtdEnqueues += 1; - bStats->byteFtdEnqueues += size; - brokerMgmtObject->statisticsUpdated(); - } - } -} - -void Queue::countLoadedFromDisk(uint64_t size) const -{ - if (mgmtObject) { - _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); - qStats->msgFtdDequeues += 1; - qStats->byteFtdDequeues += size; - mgmtObject->statisticsUpdated(); - if (brokerMgmtObject) { - _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); - bStats->msgFtdDequeues += 1; - bStats->byteFtdDequeues += size; - brokerMgmtObject->statisticsUpdated(); - } - } -} - - ManagementObject::shared_ptr Queue::GetManagementObject(void) const { return mgmtObject; diff --git a/qpid/cpp/src/qpid/broker/Queue.h b/qpid/cpp/src/qpid/broker/Queue.h index c5996dd8be..255d32e0fb 100644 --- a/qpid/cpp/src/qpid/broker/Queue.h +++ b/qpid/cpp/src/qpid/broker/Queue.h @@ -431,8 +431,6 @@ class Queue : public boost::enable_shared_from_this, // Increment the rejected-by-consumer counter. QPID_BROKER_EXTERN void countRejected() const; - QPID_BROKER_EXTERN void countFlowedToDisk(uint64_t size) const; - QPID_BROKER_EXTERN void countLoadedFromDisk(uint64_t size) const; // Manageable entry points QPID_BROKER_EXTERN management::ManagementObject::shared_ptr GetManagementObject(void) const; diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp index 211dc2aeed..bd226ccca4 100644 --- a/qpid/cpp/src/qpid/broker/SemanticState.cpp +++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp @@ -83,7 +83,7 @@ SemanticState::SemanticState(SessionState& ss) : session(ss), tagGenerator("sgen"), dtxSelected(false), - authMsg(getSession().getBroker().isAuthenticating() && !getSession().getConnection().isUserProxyAuth()), + authMsg(getSession().getBroker().isAuthenticating() && !getSession().getConnection().isFederationLink()), userID(getSession().getConnection().getUserId()), closeComplete(false), connectionId(getSession().getConnection().getMgmtId()) diff --git a/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp index c4f2d3f3d3..186bf77c64 100644 --- a/qpid/cpp/src/qpid/broker/SessionState.cpp +++ b/qpid/cpp/src/qpid/broker/SessionState.cpp @@ -76,7 +76,6 @@ void SessionState::addManagementObject() { mgmtObject = _qmf::Session::shared_ptr(new _qmf::Session (agent, this, parent, name)); mgmtObject->set_fullName (fullName); mgmtObject->set_attached (0); - mgmtObject->set_detachedLifespan (0); mgmtObject->clr_expireTime(); agent->addObject(mgmtObject); } diff --git a/qpid/cpp/src/qpid/broker/amqp/ManagedConnection.cpp b/qpid/cpp/src/qpid/broker/amqp/ManagedConnection.cpp index 1ce0ed23c2..2c4824bc51 100644 --- a/qpid/cpp/src/qpid/broker/amqp/ManagedConnection.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/ManagedConnection.cpp @@ -53,9 +53,7 @@ ManagedConnection::ManagedConnection(Broker& broker, const std::string i, bool b agent = broker.getManagementAgent(); if (agent != 0) { qpid::management::Manageable* parent = broker.GetVhostObject(); - // TODO set last bool true if system connection - connection = _qmf::Connection::shared_ptr(new _qmf::Connection(agent, this, parent, id, !brokerInitiated, brokerInitiated, "AMQP 1.0")); - connection->set_shadow(false); + connection = _qmf::Connection::shared_ptr(new _qmf::Connection(agent, this, parent, id, !brokerInitiated, false, "AMQP 1.0")); agent->addObject(connection); } } diff --git a/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp b/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp index fcccfaea8f..19fa5a6a4d 100644 --- a/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp +++ b/qpid/cpp/src/qpid/broker/amqp/ManagedSession.cpp @@ -43,7 +43,6 @@ ManagedSession::ManagedSession(Broker& broker, ManagedConnection& p, const std:: session = _qmf::Session::shared_ptr(new _qmf::Session(agent, this, broker.GetVhostObject(), name)); session->set_fullName(fullName); session->set_attached(true); - session->set_detachedLifespan(0); session->clr_expireTime(); session->set_connectionRef(parent.GetManagementObject()->getObjectId()); agent->addObject(session); diff --git a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp index 56321e690e..518c2fa9d0 100644 --- a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp +++ b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.cpp @@ -138,7 +138,6 @@ Connection::Connection(ConnectionOutputHandler* out_, framemax(65535), heartbeat(0), heartbeatmax(120), - userProxyAuth(false), // Can proxy msgs with non-matching auth ids when true (used by federation links) isDefaultRealm(false), securitySettings(external), link(link_), @@ -330,13 +329,6 @@ void Connection::raiseConnectEvent() { << " rhost:" << mgmtId ); } -void Connection::setUserProxyAuth(bool b) -{ - userProxyAuth = b; - if (mgmtObject != 0) - mgmtObject->set_userProxyAuth(b); -} - void Connection::close(connection::CloseCode code, const string& text) { QPID_LOG_IF(error, code != connection::CLOSE_CODE_NORMAL, "Connection " << mgmtId << " closed by error: " << text << "(" << code << ")"); diff --git a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h index 0b572449a4..1bf6b2cee3 100644 --- a/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h +++ b/qpid/cpp/src/qpid/broker/amqp_0_10/Connection.h @@ -83,8 +83,6 @@ class Connection : public sys::ConnectionInputHandler, public qpid::broker::Conn const management::ObjectId getObjectId() const { return GetManagementObject()->getObjectId(); }; const std::string& getUserId() const { return userId; } - void setUserProxyAuth(const bool b); - bool isUserProxyAuth() const { return userProxyAuth || federationPeerTag.size() > 0; } // links can proxy msgs with non-matching auth ids bool isFederationLink() const { return federationPeerTag.size() > 0; } void setFederationPeerTag(const std::string& tag) { federationPeerTag = std::string(tag); } const std::string& getFederationPeerTag() const { return federationPeerTag; } @@ -194,7 +192,6 @@ class Connection : public sys::ConnectionInputHandler, public qpid::broker::Conn uint16_t heartbeat; uint16_t heartbeatmax; std::string userId; - bool userProxyAuth; std::string federationPeerTag; std::vector knownHosts; std::string userName; diff --git a/qpid/cpp/src/qpid/broker/management-schema.xml b/qpid/cpp/src/qpid/broker/management-schema.xml index e2690c8f30..d6bbd01a09 100644 --- a/qpid/cpp/src/qpid/broker/management-schema.xml +++ b/qpid/cpp/src/qpid/broker/management-schema.xml @@ -83,7 +83,7 @@ - + @@ -277,8 +277,8 @@ - - + + @@ -313,7 +313,7 @@ - + @@ -364,14 +364,14 @@ - - - + + + - + @@ -533,10 +533,10 @@ - + - + @@ -545,7 +545,7 @@ - + @@ -572,8 +572,8 @@ access="RO" to get accessor methods defined. RC or RW don't do it. Probably this is documented someplace, but I couldn't find it. -jrd --> - - + + diff --git a/qpid/cpp/src/qpid/legacystore/management-schema.xml b/qpid/cpp/src/qpid/legacystore/management-schema.xml index 65969f0fb2..71497cc0f9 100644 --- a/qpid/cpp/src/qpid/legacystore/management-schema.xml +++ b/qpid/cpp/src/qpid/legacystore/management-schema.xml @@ -36,7 +36,7 @@ - + @@ -49,9 +49,9 @@ - + - + @@ -67,14 +67,14 @@ - - - - - - - - + + + + + + + + diff --git a/qpid/cpp/src/qpid/linearstore/management-schema.xml b/qpid/cpp/src/qpid/linearstore/management-schema.xml index dce8f7988a..d1cccc2286 100644 --- a/qpid/cpp/src/qpid/linearstore/management-schema.xml +++ b/qpid/cpp/src/qpid/linearstore/management-schema.xml @@ -36,18 +36,18 @@ - + - - - - - + + + + + @@ -67,14 +67,14 @@ - - - - - - - - + + + + + + + +