Class DummyConfigProvider

  • All Implemented Interfaces:
    CacheConfigProvider

    public class DummyConfigProvider
    extends Object
    implements CacheConfigProvider
    The configuration via XML can be removed (e.g. via ProGuard in Android environments). This is a dummy placeholder.
    Author:
    Jens Wilke
    • Constructor Detail

      • DummyConfigProvider

        public DummyConfigProvider()
    • Method Detail

      • getDefaultConfig

        public org.cache2k.config.Cache2kConfig getDefaultConfig​(org.cache2k.CacheManager mgr)
        Description copied from interface: CacheConfigProvider
        A new configuration instance for mutation with default values. The default values may differ per manager. The method gets called whenever a new cache is constructed via the builder. If a cache is constructed from a configuration object the method will not be called.
        Specified by:
        getDefaultConfig in interface CacheConfigProvider
        Parameters:
        mgr - Manager the new cache will live in
      • augmentConfig

        public <K,​V> void augmentConfig​(org.cache2k.CacheManager mgr,
                                              org.cache2k.config.Cache2kConfig<K,​V> cfg)
        Description copied from interface: CacheConfigProvider
        Called when Cache2kBuilder.build() was called before the configuration is used to create the cache. If no name was specified in the application, the name in the configuration is null.
        Specified by:
        augmentConfig in interface CacheConfigProvider
        Parameters:
        mgr - Manager the new cache will live in
        cfg - the cache configuration