ehcache

net.sf.ehcache.config
Class Configuration

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

public final class Configuration
extends java.lang.Object

A bean, used by BeanUtils, to set configuration from an XML configuration file.

Version:
$Id: Configuration.java 1770 2010-01-27 18:59:56Z cdennis $
Author:
Greg Luck

Nested Class Summary
static class Configuration.Monitoring
          Represents whether monitoring should be enabled or not.
 
Constructor Summary
Configuration()
          Empty constructor, which is used by ConfigurationFactory, and can be also used programmatically.
 
Method Summary
 void addCache(CacheConfiguration cacheConfiguration)
          Allows BeanHandler to add Cache Configurations to the configuration.
 void addCacheManagerEventListenerFactory(FactoryConfiguration cacheManagerEventListenerFactoryConfiguration)
          Allows BeanHandler to add the CacheManagerEventListener to the configuration.
 void addCacheManagerPeerListenerFactory(FactoryConfiguration factory)
          Adds a CachePeerProviderFactoryConfiguration.
 void addCacheManagerPeerProviderFactory(FactoryConfiguration factory)
          Adds a CachePeerProviderFactoryConfiguration.
 void addDefaultCache(CacheConfiguration defaultCacheConfiguration)
          Allows BeanHandler to add a default configuration to the configuration.
 void addDiskStore(DiskStoreConfiguration diskStoreConfigurationParameter)
          Allows BeanHandler to add disk store location to the configuration.
 void addTerracottaConfig(TerracottaConfigConfiguration terracottaConfiguration)
          Allows BeanHandler to add a Terracotta configuration to the configuration
 void addTransactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter)
          Allows BeanHandler to add transaction manager lookup to the configuration.
 java.util.Map<java.lang.String,CacheConfiguration> getCacheConfigurations()
          Gets a Map of cache configurations, keyed by name.
 java.util.Set<java.lang.String> getCacheConfigurationsKeySet()
          Gets a Map of cacheConfigurations.
 FactoryConfiguration getCacheManagerEventListenerFactoryConfiguration()
          Gets the CacheManagerEventListener factory configuration.
 java.util.List<FactoryConfiguration> getCacheManagerPeerListenerFactoryConfigurations()
          Gets the CacheManagerPeerListener factory configuration.
 java.util.List<FactoryConfiguration> getCacheManagerPeerProviderFactoryConfiguration()
          Gets the CacheManagerPeerProvider factory configuration.
 ConfigurationSource getConfigurationSource()
          Gets a description of the source from which this configuration was created.
 CacheConfiguration getDefaultCacheConfiguration()
           
 DiskStoreConfiguration getDiskStoreConfiguration()
          Gets the disk store configuration.
 boolean getDynamicConfig()
          Get flag for dynamicConfig
 Configuration.Monitoring getMonitoring()
          Get monitoring type, should not be null
 java.lang.String getName()
          CacheManager name
 TerracottaConfigConfiguration getTerracottaConfiguration()
          Gets the TerracottaConfigConfiguration
 FactoryConfiguration getTransactionManagerLookupConfiguration()
          Gets the transaction manager lookup configuration.
 boolean getUpdateCheck()
          Get flag for updateCheck
 void setDefaultCacheConfiguration(CacheConfiguration defaultCacheConfiguration)
           
 void setDynamicConfig(boolean dynamicConfig)
          Allows BeanHandler to set the dynamic configuration flag
 void setMonitoring(java.lang.String monitoring)
          Allows BeanHandler to set the monitoring flag
 void setName(java.lang.String name)
          Allows BeanHandler to set the CacheManager name.
 void setSource(ConfigurationSource configurationSource)
          Sets the configuration source.
 void setUpdateCheck(boolean updateCheck)
          Allows BeanHandler to set the updateCheck flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Empty constructor, which is used by ConfigurationFactory, and can be also used programmatically.

If you are using it programmtically you need to call the relevant add and setter methods in this class to populate everything.

Method Detail

setName

public final void setName(java.lang.String name)
Allows BeanHandler to set the CacheManager name.


getName

public final java.lang.String getName()
CacheManager name


setUpdateCheck

public final void setUpdateCheck(boolean updateCheck)
Allows BeanHandler to set the updateCheck flag.


getUpdateCheck

public final boolean getUpdateCheck()
Get flag for updateCheck


setMonitoring

public final void setMonitoring(java.lang.String monitoring)
Allows BeanHandler to set the monitoring flag


getMonitoring

public final Configuration.Monitoring getMonitoring()
Get monitoring type, should not be null


setDynamicConfig

public final void setDynamicConfig(boolean dynamicConfig)
Allows BeanHandler to set the dynamic configuration flag


getDynamicConfig

public final boolean getDynamicConfig()
Get flag for dynamicConfig


addDiskStore

public final void addDiskStore(DiskStoreConfiguration diskStoreConfigurationParameter)
                        throws ObjectExistsException
Allows BeanHandler to add disk store location to the configuration.

Throws:
ObjectExistsException

addTransactionManagerLookup

public final void addTransactionManagerLookup(FactoryConfiguration transactionManagerLookupParameter)
                                       throws ObjectExistsException
Allows BeanHandler to add transaction manager lookup to the configuration.

Throws:
ObjectExistsException

addCacheManagerEventListenerFactory

public final void addCacheManagerEventListenerFactory(FactoryConfiguration cacheManagerEventListenerFactoryConfiguration)
                                               throws ObjectExistsException
Allows BeanHandler to add the CacheManagerEventListener to the configuration.

Throws:
ObjectExistsException

addCacheManagerPeerProviderFactory

public final void addCacheManagerPeerProviderFactory(FactoryConfiguration factory)
Adds a CachePeerProviderFactoryConfiguration.


addCacheManagerPeerListenerFactory

public final void addCacheManagerPeerListenerFactory(FactoryConfiguration factory)
Adds a CachePeerProviderFactoryConfiguration. cachePeerListenerFactory class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" properties="hostName=localhost, port=5000"


addTerracottaConfig

public final void addTerracottaConfig(TerracottaConfigConfiguration terracottaConfiguration)
Allows BeanHandler to add a Terracotta configuration to the configuration


addDefaultCache

public final void addDefaultCache(CacheConfiguration defaultCacheConfiguration)
                           throws ObjectExistsException
Allows BeanHandler to add a default configuration to the configuration.

Throws:
ObjectExistsException

addCache

public final void addCache(CacheConfiguration cacheConfiguration)
                    throws ObjectExistsException
Allows BeanHandler to add Cache Configurations to the configuration.

Throws:
ObjectExistsException

getCacheConfigurationsKeySet

public final java.util.Set<java.lang.String> getCacheConfigurationsKeySet()
Gets a Map of cacheConfigurations.


getDefaultCacheConfiguration

public final CacheConfiguration getDefaultCacheConfiguration()
Returns:
the configuration's default cache configuration

setDefaultCacheConfiguration

public final void setDefaultCacheConfiguration(CacheConfiguration defaultCacheConfiguration)
Parameters:
defaultCacheConfiguration -

getDiskStoreConfiguration

public final DiskStoreConfiguration getDiskStoreConfiguration()
Gets the disk store configuration.


getTransactionManagerLookupConfiguration

public final FactoryConfiguration getTransactionManagerLookupConfiguration()
Gets the transaction manager lookup configuration.


getCacheManagerPeerProviderFactoryConfiguration

public final java.util.List<FactoryConfiguration> getCacheManagerPeerProviderFactoryConfiguration()
Gets the CacheManagerPeerProvider factory configuration.


getCacheManagerPeerListenerFactoryConfigurations

public final java.util.List<FactoryConfiguration> getCacheManagerPeerListenerFactoryConfigurations()
Gets the CacheManagerPeerListener factory configuration.


getCacheManagerEventListenerFactoryConfiguration

public final FactoryConfiguration getCacheManagerEventListenerFactoryConfiguration()
Gets the CacheManagerEventListener factory configuration.


getTerracottaConfiguration

public final TerracottaConfigConfiguration getTerracottaConfiguration()
Gets the TerracottaConfigConfiguration


getCacheConfigurations

public final java.util.Map<java.lang.String,CacheConfiguration> getCacheConfigurations()
Gets a Map of cache configurations, keyed by name.


setSource

public final void setSource(ConfigurationSource configurationSource)
Sets the configuration source.

Parameters:
configurationSource - an informative description of the source, preferably including the resource name and location.

getConfigurationSource

public final ConfigurationSource getConfigurationSource()
Gets a description of the source from which this configuration was created.


ehcache

true