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

central mapping from type to txn record class

    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
          8 kB
          Thomas Koch
        2. ZOOKEEPER-1259.patch
          8 kB
          Thomas Koch
        3. ZOOKEEPER-1259.patch
          11 kB
          Thomas Koch
        4. ZOOKEEPER-1259.patch
          11 kB
          Thomas Koch

        Issue Links

          Activity

            People

              thkoch Thomas Koch
              thkoch Thomas Koch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: