Package org.cache2k.core
Class DummyConfigProvider
- java.lang.Object
-
- org.cache2k.core.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 Summary
Constructors Constructor Description DummyConfigProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <K,V>
voidaugmentConfig(org.cache2k.CacheManager mgr, org.cache2k.config.Cache2kConfig<K,V> cfg)
Called whenCache2kBuilder.build()
was called before the configuration is used to create the cache.Iterable<String>
getConfiguredCacheNames(org.cache2k.CacheManager mgr)
List of cache names found in the configuration.org.cache2k.config.Cache2kConfig
getDefaultConfig(org.cache2k.CacheManager mgr)
A new configuration instance for mutation with default values.String
getDefaultManagerName(ClassLoader classLoader)
Name for the default manager for the given class loader.
-
-
-
Method Detail
-
getDefaultManagerName
public String getDefaultManagerName(ClassLoader classLoader)
Description copied from interface:CacheConfigProvider
Name for the default manager for the given class loader.- Specified by:
getDefaultManagerName
in interfaceCacheConfigProvider
-
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 interfaceCacheConfigProvider
- 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 whenCache2kBuilder.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 interfaceCacheConfigProvider
- Parameters:
mgr
- Manager the new cache will live incfg
- the cache configuration
-
getConfiguredCacheNames
public Iterable<String> getConfiguredCacheNames(org.cache2k.CacheManager mgr)
Description copied from interface:CacheConfigProvider
List of cache names found in the configuration.- Specified by:
getConfiguredCacheNames
in interfaceCacheConfigProvider
-
-