Synchronize read/write access to FeatureResgistry.featureMap in Java Shindig
----------------------------------------------------------------------------
Key: SHINDIG-1283
URL: https://issues.apache.org/jira/browse/SHINDIG-1283
Project: Shindig
Issue Type: Bug
Components: Java
Affects Versions: 1.1-BETA5
Reporter: Henry Saputra
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.