Package org.cache2k.core.spi
Interface CacheConfigProvider
-
- All Known Implementing Classes:
DummyConfigProvider
public interface CacheConfigProviderPlugin interface for the configuration system. Provides a default configuration, which can be different for each manager and additional configuration, for each cache.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract 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.Cache2kConfiggetDefaultConfig(org.cache2k.CacheManager mgr)A new configuration instance for mutation with default values.StringgetDefaultManagerName(ClassLoader classLoader)Name for the default manager for the given class loader.
-
-
-
Method Detail
-
getDefaultManagerName
String getDefaultManagerName(ClassLoader classLoader)
Name for the default manager for the given class loader.
-
getDefaultConfig
org.cache2k.config.Cache2kConfig getDefaultConfig(org.cache2k.CacheManager mgr)
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.- Parameters:
mgr- Manager the new cache will live in
-
augmentConfig
<K,V> void augmentConfig(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. If no name was specified in the application, the name in the configuration is null.- Parameters:
mgr- Manager the new cache will live incfg- the cache configuration
-
-