Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1198 Refactorings and Cleanups
  3. ZOOKEEPER-1259

central mapping from type to txn record class

Add voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      There are two places where large switch statements do nothing else to get the correct Record class accorging to a txn type. Provided a static map in SerializeUtils from type to Class<? extends Record> and a method to retrieve a new txn Record instance for a type.

      Code size reduced by 28 lines.

      Attachments

        1. ZOOKEEPER-1259.patch
          11 kB
          Thomas Koch
        2. ZOOKEEPER-1259.patch
          11 kB
          Thomas Koch
        3. ZOOKEEPER-1259.patch
          8 kB
          Thomas Koch
        4. ZOOKEEPER-1259.patch
          8 kB
          Thomas Koch

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            thkoch Thomas Koch
            thkoch Thomas Koch

            Dates

              Created:
              Updated:

              Slack

                Issue deployment