Class CacheableFeatureProvider<T extends Feature>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.concurrent.ConcurrentMap<java.lang.String,​T> features  
      protected java.lang.String scope  
      protected java.util.concurrent.ConcurrentMap<java.lang.String,​FeatureProvider> scopes  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CacheableFeatureProvider​(java.lang.String scope)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T getFeature​(java.lang.String name)
      Return the feature with given name.
      protected abstract T makeFeature​(java.lang.String featureName)  
      protected java.lang.String makeName​(java.lang.String name)  
      protected abstract FeatureProvider makeProvider​(java.lang.String fullScopeName)  
      FeatureProvider scope​(java.lang.String name)
      Provide the feature provider under scope name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • scope

        protected final java.lang.String scope
      • scopes

        protected final java.util.concurrent.ConcurrentMap<java.lang.String,​FeatureProvider> scopes
      • features

        protected final java.util.concurrent.ConcurrentMap<java.lang.String,​T extends Feature> features
    • Constructor Detail

      • CacheableFeatureProvider

        protected CacheableFeatureProvider​(java.lang.String scope)
    • Method Detail

      • makeName

        protected java.lang.String makeName​(java.lang.String name)
      • getFeature

        public T getFeature​(java.lang.String name)
        Description copied from interface: FeatureProvider
        Return the feature with given name.
        Specified by:
        getFeature in interface FeatureProvider
        Parameters:
        name - feature name
        Returns:
        feature instance
      • makeFeature

        protected abstract T makeFeature​(java.lang.String featureName)
      • scope

        public FeatureProvider scope​(java.lang.String name)
        Description copied from interface: FeatureProvider
        Provide the feature provider under scope name.
        Specified by:
        scope in interface FeatureProvider
        Parameters:
        name - scope name.
        Returns:
        feature provider under scope name
      • makeProvider

        protected abstract FeatureProvider makeProvider​(java.lang.String fullScopeName)