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

Constructor Summary
ConfigurationHelper(CacheManager cacheManager, Configuration configuration)
          Only Constructor
 
Method Summary
(package private)  Cache createCache(CacheConfiguration cacheConfiguration)
          Create a cache given a cache configuration
(package private)  Cache createCacheFromName(java.lang.String name)
          Creates a cache from configuration where the configuration cache name matches the given name
 CacheManagerEventListener createCacheManagerEventListener()
          Tries to load the class specified.
 CacheManagerPeerListener createCachePeerListener()
          Tries to load the class specified otherwise defaults to null
 CacheManagerPeerProvider createCachePeerProvider()
          Tries to load the class specified otherwise defaults to null
 java.util.Set createCaches()
          Creates unitialised caches for each cache configuration found
 Cache createDefaultCache()
           
 Configuration getConfigurationBean()
           
 java.lang.String getDiskStorePath()
           
protected static void registerCacheListeners(CacheConfiguration cacheConfiguration, RegisteredEventListeners registeredEventListeners)
          A factory method to create a RegisteredEventListeners
 
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

registerCacheListeners

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


createCachePeerProvider

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


createCachePeerListener

public final CacheManagerPeerListener createCachePeerListener()
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 Cache 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,

createCacheFromName

final Cache createCacheFromName(java.lang.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

createCache

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

Parameters:
cacheConfiguration -

getConfigurationBean

public final Configuration getConfigurationBean()
Returns:
the Configuration used

ehcache