|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ehcache.core.config.DefaultConfiguration
public final class DefaultConfiguration
Base implementation of Configuration
.
Constructor Summary | |
---|---|
DefaultConfiguration(java.lang.ClassLoader classLoader)
Creates a new configuration with the specified class loader. |
|
DefaultConfiguration(Configuration cfg)
Copy constructor |
|
DefaultConfiguration(java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches,
java.lang.ClassLoader classLoader,
ServiceCreationConfiguration<?>... services)
Creates a new configuration with the specified cache configurations , class loader and
service configurations . |
Method Summary | ||
---|---|---|
void |
addCacheConfiguration(java.lang.String alias,
CacheConfiguration<?,?> config)
Adds a CacheConfiguration tied to the provided alias. |
|
java.util.Map<java.lang.String,CacheConfiguration<?,?>> |
getCacheConfigurations()
Mapping of names to CacheConfiguration , used to create the named Cache
managed by a CacheManager |
|
java.lang.ClassLoader |
getClassLoader()
The ClassLoader to be associated with the CacheManager |
|
java.util.Collection<ServiceCreationConfiguration<?>> |
getServiceCreationConfigurations()
All services initially used to bootstrap the CacheManager and
its Cache instances |
|
void |
removeCacheConfiguration(java.lang.String alias)
Removes the CacheConfiguration tied to the provided alias. |
|
|
replaceCacheConfiguration(java.lang.String alias,
CacheConfiguration<K,V> config,
CacheRuntimeConfiguration<K,V> runtimeConfiguration)
Replaces a CacheConfiguration with a CacheRuntimeConfiguration for the provided alias. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultConfiguration(Configuration cfg)
cfg
- the configuration to copypublic DefaultConfiguration(java.lang.ClassLoader classLoader)
This means no cache configurations nor service configurations.
classLoader
- the class loader to useaddCacheConfiguration(String, CacheConfiguration)
public DefaultConfiguration(java.util.Map<java.lang.String,CacheConfiguration<?,?>> caches, java.lang.ClassLoader classLoader, ServiceCreationConfiguration<?>... services)
cache configurations
, class loader and
service configurations
.
caches
- a map from alias to cache configurationclassLoader
- the class loader to use for user typesservices
- an array of service configurationsMethod Detail |
---|
public java.util.Map<java.lang.String,CacheConfiguration<?,?>> getCacheConfigurations()
CacheConfiguration
, used to create the named Cache
managed by a CacheManager
getCacheConfigurations
in interface Configuration
public java.util.Collection<ServiceCreationConfiguration<?>> getServiceCreationConfigurations()
CacheManager
and
its Cache
instances
getServiceCreationConfigurations
in interface Configuration
public java.lang.ClassLoader getClassLoader()
ClassLoader
to be associated with the CacheManager
getClassLoader
in interface Configuration
public void addCacheConfiguration(java.lang.String alias, CacheConfiguration<?,?> config)
CacheConfiguration
tied to the provided alias.
alias
- the alias of the cacheconfig
- the configuration of the cachepublic void removeCacheConfiguration(java.lang.String alias)
CacheConfiguration
tied to the provided alias.
alias
- the alias for which to remove configuration
java.lang.IllegalStateException
- if the alias was not in usepublic <K,V> void replaceCacheConfiguration(java.lang.String alias, CacheConfiguration<K,V> config, CacheRuntimeConfiguration<K,V> runtimeConfiguration)
CacheConfiguration
with a CacheRuntimeConfiguration
for the provided alias.
K
- the key typeV
- the value typealias
- the alias of the cacheconfig
- the existing configurationruntimeConfiguration
- the new configuration
java.lang.IllegalStateException
- if the replace fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |