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 52 2006-04-24 14:50:03Z gregluck $

Author: Greg Luck

Constructor Summary
ConfigurationHelper(CacheManager cacheManager, Configuration configuration)
Only Constructor
Method Summary
CachecreateCache(CacheConfiguration cacheConfiguration)
Create a cache given a cache configuration
CachecreateCacheFromName(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
CachecreateDefaultCache()
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

createCache

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

Parameters: cacheConfiguration

createCacheFromName

final Cache 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 Cache 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