public class DefaultEhCacheConfigurer extends Object implements EhCacheConfigurer
Constructor and Description |
---|
DefaultEhCacheConfigurer() |
Modifier and Type | Method and Description |
---|---|
net.sf.ehcache.config.Configuration |
getConfiguration(Properties properties)
Returns the configuration to be used to initialize the EhCache.
|
protected URL |
getEhCacheConfigFile()
Returns the location of the default Ehcache configuration XML file as a URL.
|
String |
getMainCacheName()
Returns the name of the cache of the provided configuration which should be used as the main
cache.
|
List<String> |
getProtectedCacheNames()
Returns a list of names of caches which should not be changed by
CacheManager . |
protected void |
overrideFactoryConfigProperties(net.sf.ehcache.config.FactoryConfiguration factoryConfig,
Map<String,String> propertyMap)
Helper method that overrides the factory configuration property string with other settings.
|
void |
postConfiguration(net.sf.ehcache.CacheManager cacheManager)
Called after the CacheManager which was configured with the configuration of the
configuration file provided by this instance has been created.
|
protected void |
postProcessConfiguration(net.sf.ehcache.config.Configuration config,
Properties properties)
Called by the
getConfiguration(Properties) method to allow additional processing of
the loaded configuration. |
public net.sf.ehcache.config.Configuration getConfiguration(Properties properties) throws net.sf.ehcache.CacheException
getConfiguration
in interface EhCacheConfigurer
properties
- optional properties to override some of the configuration settings at runtimenet.sf.ehcache.CacheException
- if parsing the configuration failedprotected URL getEhCacheConfigFile()
public String getMainCacheName()
EhCacheManager.getCache()
.getMainCacheName
in interface EhCacheConfigurer
public List<String> getProtectedCacheNames()
CacheManager
.getProtectedCacheNames
in interface EhCacheConfigurer
protected void overrideFactoryConfigProperties(net.sf.ehcache.config.FactoryConfiguration factoryConfig, Map<String,String> propertyMap)
factoryConfig
- the cache manager factory configurationpropertyMap
- a map with properties to override or addpublic void postConfiguration(net.sf.ehcache.CacheManager cacheManager)
postConfiguration
in interface EhCacheConfigurer
cacheManager
- the created cache managerprotected void postProcessConfiguration(net.sf.ehcache.config.Configuration config, Properties properties)
getConfiguration(Properties)
method to allow additional processing of
the loaded configuration.config
- the loaded configuration to processproperties
- additional configuration propertiesCopyright © 2019 Communote team. All rights reserved.