ehcache

net.sf.ehcache.constructs.readthrough
Class ReadThroughCacheFactory

java.lang.Object
  extended by net.sf.ehcache.constructs.CacheDecoratorFactory
      extended by net.sf.ehcache.constructs.readthrough.ReadThroughCacheFactory

public class ReadThroughCacheFactory
extends CacheDecoratorFactory

CacheDecoratorFactory implementation for the ReadThroughCache cache decorator. the Properties arguments are used to configure ReadThroughCacheConfiguration instances, which are in turn used to create the cache decorator instances.

Author:
cschanck

Field Summary
 
Fields inherited from class net.sf.ehcache.constructs.CacheDecoratorFactory
DASH
 
Constructor Summary
ReadThroughCacheFactory()
           
 
Method Summary
 Ehcache createDecoratedEhcache(Ehcache cache, Properties properties)
          Creates a decorated Ehcache using the properties specified for configuring the decorator.
 Ehcache createDefaultDecoratedEhcache(Ehcache cache, Properties properties)
          This method is called when the factory is specified for the defaultCache in the config.
 
Methods inherited from class net.sf.ehcache.constructs.CacheDecoratorFactory
generateDefaultDecoratedCacheName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadThroughCacheFactory

public ReadThroughCacheFactory()
Method Detail

createDecoratedEhcache

public Ehcache createDecoratedEhcache(Ehcache cache,
                                      Properties properties)
Description copied from class: CacheDecoratorFactory
Creates a decorated 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.

Specified by:
createDecoratedEhcache in class CacheDecoratorFactory
Parameters:
cache - a reference to the owning cache
properties - implementation specific properties configured as delimiter separated name value pairs in ehcache.xml
Returns:
a decorated Ehcache

createDefaultDecoratedEhcache

public Ehcache createDefaultDecoratedEhcache(Ehcache cache,
                                             Properties properties)
Description copied from class: CacheDecoratorFactory
This method is called when the factory is specified for the defaultCache in the config. Create the decorated 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.

Specified by:
createDefaultDecoratedEhcache in class CacheDecoratorFactory
Parameters:
cache - a reference to the owning cache
properties - implementation specific properties configured as delimiter separated name value pairs in ehcache.xml
Returns:
a decorated Ehcache

ehcache

Copyright 2001-2017, Terracotta, Inc.