ehcache

net.sf.ehcache.config
Class ConfigurationHelper

java.lang.Object
  extended by net.sf.ehcache.config.ConfigurationHelper

public final class ConfigurationHelper
extends java.lang.Object

The configuration for ehcache.

This class can be populated through:

Version:
$Id: ConfigurationHelper.java 1709 2010-01-22 11:12:30Z asingh $
Author:
Greg Luck

Constructor Summary
ConfigurationHelper(CacheManager cacheManager, Configuration configuration)
          Only Constructor
 
Method Summary
static CacheExceptionHandler createCacheExceptionHandler(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factoryConfiguration)
          Tries to create a CacheLoader from the configuration using the factory specified.
 CacheManagerEventListener createCacheManagerEventListener()
          Tries to load the class specified.
 java.util.Map<java.lang.String,CacheManagerPeerListener> createCachePeerListeners()
          Tries to load the class specified otherwise defaults to null
 java.util.Map<java.lang.String,CacheManagerPeerProvider> createCachePeerProviders()
          Tries to load the class specified otherwise defaults to null
 java.util.Set createCaches()
          Creates unitialised caches for each cache configuration found
 Ehcache createDefaultCache()
           
 Configuration getConfigurationBean()
           
 java.lang.String getDiskStorePath()
           
 java.lang.Integer numberOfCachesThatAreDiskPersistent()
          Calculates the number of caches in the configuration that are diskPersistent
 java.lang.Integer numberOfCachesThatOverflowToDisk()
          Calculates the number of caches in the configuration that overflow to disk
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationHelper

public ConfigurationHelper(CacheManager cacheManager,
                           Configuration configuration)
Only Constructor

Parameters:
cacheManager -
configuration -
Method Detail

createCacheExceptionHandler

public static CacheExceptionHandler createCacheExceptionHandler(CacheConfiguration.CacheExceptionHandlerFactoryConfiguration factoryConfiguration)
                                                         throws CacheException
Tries to create a CacheLoader from the configuration using the factory specified.

Returns:
The CacheExceptionHandler, or null if it could not be found.
Throws:
CacheException

createCachePeerProviders

public java.util.Map<java.lang.String,CacheManagerPeerProvider> createCachePeerProviders()
Tries to load the class specified otherwise defaults to null

Returns:
a map of CacheManagerPeerProviders

createCachePeerListeners

public java.util.Map<java.lang.String,CacheManagerPeerListener> createCachePeerListeners()
Tries to load the class specified otherwise defaults to null


createCacheManagerEventListener

public final CacheManagerEventListener createCacheManagerEventListener()
                                                                throws CacheException
Tries to load the class specified.

Returns:
If there is none returns null.
Throws:
CacheException

getDiskStorePath

public final java.lang.String getDiskStorePath()
Returns:
the disk store path, or null if not set.

createDefaultCache

public final Ehcache createDefaultCache()
                                 throws CacheException
Returns:
the Default Cache
Throws:
CacheException - if there is no default cache

createCaches

public final java.util.Set createCaches()
Creates unitialised caches for each cache configuration found

Returns:
an empty set if there are none,

numberOfCachesThatOverflowToDisk

public final java.lang.Integer numberOfCachesThatOverflowToDisk()
Calculates the number of caches in the configuration that overflow to disk


numberOfCachesThatAreDiskPersistent

public final java.lang.Integer numberOfCachesThatAreDiskPersistent()
Calculates the number of caches in the configuration that are diskPersistent


getConfigurationBean

public final Configuration getConfigurationBean()
Returns:
the Configuration used

ehcache

true