Qpid
  1. Qpid
  2. QPID-4905

C++ Broker/common code needs tidying up of obsolete/unused code

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23
    • Component/s: C++ Broker, C++ Client
    • Labels:
      None

      Description

      There is quite a lot of code in the Qpid C++ code base that is vestigial (like your appendix). In the name of easier code maintenance we should remove it.

      I will detail some of the things I have found as comments to this JIRA, if they attract sufficient comment they can be broken out as subtasks to this issue.

      Most of these issues are small and involve unused member functions or unused/potentially unused interfaces or interfaces implemented unnecessarily.

      Much of this is still the fallout of removing the old cluster work which added hook (and hence interfaces) in lots of code, now that old cluster is gone the interfaces/members remain, but are unused anywhere.

        Activity

        Hide
        Justin Ross added a comment -
        Show
        Justin Ross added a comment - Released in Qpid 0.24, http://qpid.apache.org/releases/qpid-0.24/index.html
        Hide
        ASF subversion and git services added a comment -

        Commit 1494700 from Andrew Stitcher
        [ https://svn.apache.org/r1494700 ]

        QPID-4905: Add needed virtual destructor missed earlier

        Show
        ASF subversion and git services added a comment - Commit 1494700 from Andrew Stitcher [ https://svn.apache.org/r1494700 ] QPID-4905 : Add needed virtual destructor missed earlier
        Hide
        ASF subversion and git services added a comment -

        Commit 1494640 from Andrew Stitcher
        [ https://svn.apache.org/r1494640 ]

        QPID-4905: Stopped broker::Broker needing to refer to broker::Connection

        • Also removed ConnectionToken which didn't add anything over OwnershipToken
        Show
        ASF subversion and git services added a comment - Commit 1494640 from Andrew Stitcher [ https://svn.apache.org/r1494640 ] QPID-4905 : Stopped broker::Broker needing to refer to broker::Connection Also removed ConnectionToken which didn't add anything over OwnershipToken
        Hide
        ASF subversion and git services added a comment -

        Commit 1494639 from Andrew Stitcher
        [ https://svn.apache.org/r1494639 ]

        QPID-4905: Tidy up broker::Connection

        • Clean up code for accounting for sent frames
        • merged Connection and ConnectionState into Connection
        Show
        ASF subversion and git services added a comment - Commit 1494639 from Andrew Stitcher [ https://svn.apache.org/r1494639 ] QPID-4905 : Tidy up broker::Connection Clean up code for accounting for sent frames merged Connection and ConnectionState into Connection
        Hide
        ASF subversion and git services added a comment -

        Commit 1491585 from Andrew Stitcher
        [ https://svn.apache.org/r1491585 ]

        QPID-4905: Removed TimeoutHandler interface as it was really unused

        Show
        ASF subversion and git services added a comment - Commit 1491585 from Andrew Stitcher [ https://svn.apache.org/r1491585 ] QPID-4905 : Removed TimeoutHandler interface as it was really unused
        Hide
        ASF subversion and git services added a comment -

        Commit 1491584 from Andrew Stitcher
        [ https://svn.apache.org/r1491584 ]

        QPID-4905: Remove unused Connection ErrorListener interface

        • was only used by removed cluster support
        Show
        ASF subversion and git services added a comment - Commit 1491584 from Andrew Stitcher [ https://svn.apache.org/r1491584 ] QPID-4905 : Remove unused Connection ErrorListener interface was only used by removed cluster support
        Hide
        ASF subversion and git services added a comment -

        Commit 1491583 from Andrew Stitcher
        [ https://svn.apache.org/r1491583 ]

        QPID-4905: Remove unused method

        Show
        ASF subversion and git services added a comment - Commit 1491583 from Andrew Stitcher [ https://svn.apache.org/r1491583 ] QPID-4905 : Remove unused method
        Hide
        ASF subversion and git services added a comment -

        Commit 1491582 from Andrew Stitcher
        [ https://svn.apache.org/r1491582 ]

        QPID-4905: Remove unused function

        Show
        ASF subversion and git services added a comment - Commit 1491582 from Andrew Stitcher [ https://svn.apache.org/r1491582 ] QPID-4905 : Remove unused function
        Hide
        ASF subversion and git services added a comment -

        Commit 1491581 from Andrew Stitcher
        [ https://svn.apache.org/r1491581 ]

        QPID-4905: Remove deprecated and unused federation property

        Show
        ASF subversion and git services added a comment - Commit 1491581 from Andrew Stitcher [ https://svn.apache.org/r1491581 ] QPID-4905 : Remove deprecated and unused federation property
        Hide
        ASF subversion and git services added a comment -

        Commit 1491580 from Andrew Stitcher
        [ https://svn.apache.org/r1491580 ]

        QPID-4905: Tidy-up remove OutputHandler and directly use FrameHandler

        Show
        ASF subversion and git services added a comment - Commit 1491580 from Andrew Stitcher [ https://svn.apache.org/r1491580 ] QPID-4905 : Tidy-up remove OutputHandler and directly use FrameHandler
        Hide
        ASF subversion and git services added a comment -

        Commit 1491579 from Andrew Stitcher
        [ https://svn.apache.org/r1491579 ]

        QPID-4905: Remove unused members in Connector interface

        Show
        ASF subversion and git services added a comment - Commit 1491579 from Andrew Stitcher [ https://svn.apache.org/r1491579 ] QPID-4905 : Remove unused members in Connector interface
        Hide
        Andrew Stitcher added a comment -

        Separating broker::Connection and broker::ConnectionState seems arbitrary and makes some of the code awkward. Unifying these classes seems to make the code simpler.

        Show
        Andrew Stitcher added a comment - Separating broker::Connection and broker::ConnectionState seems arbitrary and makes some of the code awkward. Unifying these classes seems to make the code simpler.
        Hide
        Andrew Stitcher added a comment -

        The interface sys::Timeout is not really used as an interface in itself anymore.

        The member idleOut() is never called anywhere.

        The member idleIn() is called once as part of a timer callback, however this time callback can just as easily call the actual implementing class as it is in the same file anyway.

        Show
        Andrew Stitcher added a comment - The interface sys::Timeout is not really used as an interface in itself anymore. The member idleOut() is never called anywhere. The member idleIn() is called once as part of a timer callback, however this time callback can just as easily call the actual implementing class as it is in the same file anyway.
        Hide
        Andrew Stitcher added a comment -

        In broker::Connection, broker::ConnectionHandler, broker::SessionHandler the errorListener mechanism seems unnecessary as it is not used by anyone. I assume that old cluster used it but now no one does.

        Show
        Andrew Stitcher added a comment - In broker::Connection, broker::ConnectionHandler, broker::SessionHandler the errorListener mechanism seems unnecessary as it is not used by anyone. I assume that old cluster used it but now no one does.
        Hide
        Andrew Stitcher added a comment -

        In broker::Connection eachSessionHandler() is never used.

        Show
        Andrew Stitcher added a comment - In broker::Connection eachSessionHandler() is never used.
        Hide
        Andrew Stitcher added a comment -

        In broker::ConnectionState setOutputHandler() in never used.

        Show
        Andrew Stitcher added a comment - In broker::ConnectionState setOutputHandler() in never used.
        Hide
        Andrew Stitcher added a comment -

        the federationLink bool member of broker::ConnectionState is only ever set and never queried or otherwise used, so can be removed.

        Show
        Andrew Stitcher added a comment - the federationLink bool member of broker::ConnectionState is only ever set and never queried or otherwise used, so can be removed.
        Hide
        Andrew Stitcher added a comment - - edited

        framing::OutputHandler has a comment:

        // TODO aconway 2007-08-29: Replace with FrameHandler.

        and indeed the only function of the OutputHandler class is to change send() in the child classes into handle() in the parent class so we can remove OutputHandler completely and rename send()->handle() in the child classes.

        Show
        Andrew Stitcher added a comment - - edited framing::OutputHandler has a comment: // TODO aconway 2007-08-29: Replace with FrameHandler. and indeed the only function of the OutputHandler class is to change send() in the child classes into handle() in the parent class so we can remove OutputHandler completely and rename send()->handle() in the child classes.
        Hide
        Andrew Stitcher added a comment -

        client::Connector interface has 2 unused members:
        getShutdownHandler()
        getOutputHandler()

        Show
        Andrew Stitcher added a comment - client::Connector interface has 2 unused members: getShutdownHandler() getOutputHandler()
        Hide
        ASF subversion and git services added a comment -

        Commit 1489457 from Andrew Stitcher
        [ https://svn.apache.org/r1489457 ]

        QPID-4905: Tidy up

        • Remove unused function getBuffered() of ConnectionOutputHandler
        • Stop SessionContext and AggregateOutput from needlessly implementing
          the OutputControl interface
        Show
        ASF subversion and git services added a comment - Commit 1489457 from Andrew Stitcher [ https://svn.apache.org/r1489457 ] QPID-4905 : Tidy up Remove unused function getBuffered() of ConnectionOutputHandler Stop SessionContext and AggregateOutput from needlessly implementing the OutputControl interface

          People

          • Assignee:
            Andrew Stitcher
            Reporter:
            Andrew Stitcher
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development