net.sf.ehcache.config

Class ConfigurationHelper

public final class ConfigurationHelper extends Object

The configuration for ehcache.

This class can be populated through:

Version: $Id: ConfigurationHelper.java 101 2006-05-30 08:21:14Z gregluck $

Author: Greg Luck

Constructor Summary
ConfigurationHelper(CacheManager cacheManager, Configuration configuration)
Only Constructor
Method Summary
BootstrapCacheLoadercreateBootstrapCacheLoader(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factoryConfiguration)
Tries to load the class specified.
CachecreateCache(CacheConfiguration cacheConfiguration)
Create a cache given a cache configuration
EhcachecreateCacheFromName(String name)
Creates a cache from configuration where the configuration cache name matches the given name
CacheManagerEventListenercreateCacheManagerEventListener()
Tries to load the class specified.
CacheManagerPeerListenercreateCachePeerListener()
Tries to load the class specified otherwise defaults to null
CacheManagerPeerProvidercreateCachePeerProvider()
Tries to load the class specified otherwise defaults to null
SetcreateCaches()
Creates unitialised caches for each cache configuration found
EhcachecreateDefaultCache()
ConfigurationgetConfigurationBean()
StringgetDiskStorePath()
protected static voidregisterCacheListeners(CacheConfiguration cacheConfiguration, RegisteredEventListeners registeredEventListeners)
A factory method to create a RegisteredEventListeners

Constructor Detail

ConfigurationHelper

public ConfigurationHelper(CacheManager cacheManager, Configuration configuration)
Only Constructor

Parameters: cacheManager configuration

Method Detail

createBootstrapCacheLoader

public final BootstrapCacheLoader createBootstrapCacheLoader(CacheConfiguration.BootstrapCacheLoaderFactoryConfiguration factoryConfiguration)
Tries to load the class specified.

Returns: If there is none returns null.

createCache

final Cache createCache(CacheConfiguration cacheConfiguration)
Create a cache given a cache configuration

Parameters: cacheConfiguration

createCacheFromName

final Ehcache createCacheFromName(String name)
Creates a cache from configuration where the configuration cache name matches the given name

Returns: the cache, or null if there is no match

createCacheManagerEventListener

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

Returns: If there is none returns null.

createCachePeerListener

public final CacheManagerPeerListener createCachePeerListener()
Tries to load the class specified otherwise defaults to null

createCachePeerProvider

public final CacheManagerPeerProvider createCachePeerProvider()
Tries to load the class specified otherwise defaults to null

createCaches

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

Returns: an empty set if there are none,

createDefaultCache

public final Ehcache createDefaultCache()

Returns: the Default Cache

Throws: net.sf.ehcache.CacheException if there is no default cache

getConfigurationBean

public final Configuration getConfigurationBean()

Returns: the Configuration used

getDiskStorePath

public final String getDiskStorePath()

Returns: the disk store path, or null if not set.

registerCacheListeners

protected static void registerCacheListeners(CacheConfiguration cacheConfiguration, RegisteredEventListeners registeredEventListeners)
A factory method to create a RegisteredEventListeners