Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1283

Synchronize read/write access to FeatureResgistry.featureMap in Java Shindig

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1-BETA5
    • 2.0.0-RC2
    • Java
    • None

    Description

      With FeatureRegistry class has @Singleton guice scope, we need to protect access to mutable featureMap member variable.

      Most of the scenarios will probably relying on FeatureRegistry.addDefaultFeatures method to register default features on bootstrap.
      However, since FeatureResgistry does have public method to register new features, we still have to synchronize read/write access to featureMap member variable.

      The proposed change is to modify the type of featureMap to ConcurrentHashMap to allow good performance for mostly read operations to this member variable rather than adding synchronized modifier to the public methods accessing the FeatureRegistry.featureMap.

      Attachments

        1. shindig-fs-fix.diff
          1 kB
          Henry Saputra

        Activity

          People

            Unassigned Unassigned
            hsaputra Henry Saputra
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: