Class CacheConfigProviderImpl

  • All Implemented Interfaces:
    org.cache2k.core.spi.CacheConfigProvider

    public class CacheConfigProviderImpl
    extends ConfigurationProvider
    implements org.cache2k.core.spi.CacheConfigProvider
    Hooks into cache2k and provides the additional configuration data.
    Author:
    Jens Wilke
    • Constructor Detail

      • CacheConfigProviderImpl

        public CacheConfigProviderImpl()
    • Method Detail

      • getDefaultManagerName

        public String getDefaultManagerName​(ClassLoader cl)
        The name of the default manager may be changed in the configuration file. Load the default configuration file and save the loaded context for the respective classloader, so we do not load the context twice when we create the first cache.
        Specified by:
        getDefaultManagerName in interface org.cache2k.core.spi.CacheConfigProvider
      • getDefaultConfig

        public org.cache2k.config.Cache2kConfig getDefaultConfig​(org.cache2k.CacheManager mgr)
        Specified by:
        getDefaultConfig in interface org.cache2k.core.spi.CacheConfigProvider
      • augmentConfig

        public <K,​V> void augmentConfig​(org.cache2k.CacheManager mgr,
                                              org.cache2k.config.Cache2kConfig<K,​V> cfg)
        Specified by:
        augmentConfig in interface org.cache2k.core.spi.CacheConfigProvider
      • getConfiguredCacheNames

        public Iterable<String> getConfiguredCacheNames​(org.cache2k.CacheManager mgr)
        Specified by:
        getConfiguredCacheNames in interface org.cache2k.core.spi.CacheConfigProvider