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.