public abstract class CacheDecoratorFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DASH
Dash string : "-"
|
Constructor and Description |
---|
CacheDecoratorFactory() |
Modifier and Type | Method and Description |
---|---|
abstract Ehcache |
createDecoratedEhcache(Ehcache cache,
java.util.Properties properties)
Creates a decorated
Ehcache using the properties specified for configuring the decorator. |
abstract Ehcache |
createDefaultDecoratedEhcache(Ehcache cache,
java.util.Properties properties)
This method is called when the factory is specified for the defaultCache in the config.
|
static java.lang.String |
generateDefaultDecoratedCacheName(Ehcache cache,
java.lang.String cacheNameSuffix)
Utility method to generate name of decorated cache to be created using factory specified in defaultCache.
|
public static final java.lang.String DASH
public abstract Ehcache createDecoratedEhcache(Ehcache cache, java.util.Properties properties)
Ehcache
using the properties specified for configuring the decorator.
If the returned decorated cache has the same name as the underlying cache, then the original cache will be replaced by this new
decorated cache in the CacheManager.cache
- a reference to the owning cacheproperties
- implementation specific properties configured as delimiter
separated name value pairs in ehcache.xmlpublic abstract Ehcache createDefaultDecoratedEhcache(Ehcache cache, java.util.Properties properties)
Ehcache
using the properties specified.
If the returned decorated cache has the same name as the underlying cache, then the original cache will be replaced by this new
decorated cache in the CacheManager.cache
- a reference to the owning cacheproperties
- implementation specific properties configured as delimiter
separated name value pairs in ehcache.xmlpublic static java.lang.String generateDefaultDecoratedCacheName(Ehcache cache, java.lang.String cacheNameSuffix)
cache
- the underlying cachecacheNameSuffix
- Name to be used as suffix. This is normally provided as a property in the decorator config properties. If this parameter
is null or empty string, cache.getName() is returned