ehcache

net.sf.ehcache.loader
Class CacheLoaderFactory

java.lang.Object
  extended by net.sf.ehcache.loader.CacheLoaderFactory

public abstract class CacheLoaderFactory
extends java.lang.Object

An abstract factory for creating cache loaders. Implementers should provide their own concrete factory extending this factory.

There is one factory method for JSR107 Cache Loaders and one for Ehcache ones. The Ehcache loader is a sub interface of the JSR107 Cache Loader.

Note that both the JCache and Ehcache APIs also allow the CacheLoader to be set programmatically.

Version:
$Id: CacheLoaderFactory.java 536 2007-08-12 08:17:44Z gregluck $
Author:
Greg Luck

Constructor Summary
CacheLoaderFactory()
           
 
Method Summary
abstract  net.sf.jsr107cache.CacheLoader createCacheLoader(java.util.Map environment)
          Creates a CacheLoader using the JSR107 creational mechanism.
abstract  CacheLoader createCacheLoader(java.util.Properties properties)
          Creates a CacheLoader using the Ehcache configuration mechanism at the time the associated cache is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheLoaderFactory

public CacheLoaderFactory()
Method Detail

createCacheLoader

public abstract net.sf.jsr107cache.CacheLoader createCacheLoader(java.util.Map environment)
Creates a CacheLoader using the JSR107 creational mechanism. This method is called from JCacheFactory

Parameters:
environment - the same environment passed into JCacheFactory. This factory can extract any properties it needs from the environment.
Returns:
a constructed CacheLoader

createCacheLoader

public abstract CacheLoader createCacheLoader(java.util.Properties properties)
Creates a CacheLoader using the Ehcache configuration mechanism at the time the associated cache is created.

Parameters:
properties - implementation specific properties. These are configured as comma separated name value pairs in ehcache.xml
Returns:
a constructed CacheLoader

ehcache