org.xwiki.cache.config
Class CacheConfiguration

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<String,Object>
          extended by org.xwiki.cache.config.CacheConfiguration
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>
Direct Known Subclasses:
LRUCacheConfiguration

public class CacheConfiguration
extends HashMap<String,Object>

Contains all informations used to create the cache.

A configuration identifier can be defined.

It can be used to be the cache unique identifier for clustering process.

This is also used by implementations to associate the cache with a configuration file which overwrite the configuration it contains. This way any cache can be tuned in a particular installation with option specifics to chosen cache implementation.

Version:
$Id: 15a2f06d4864cc3bd18c207da40ee904c43c3804 $
See Also:
EntryEvictionConfiguration, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
CacheConfiguration()
          The default constructor.
CacheConfiguration(EntryEvictionConfiguration evictionConfiguration)
          Creates CacheConfiguration instance with given eviction configuration.
CacheConfiguration(String configurationId)
           
CacheConfiguration(String configurationId, EntryEvictionConfiguration evictionConfiguration)
          Creates CacheConfiguration instance with given eviction configuration and id.
 
Method Summary
 String getConfigurationId()
           
 void setConfigurationId(String configurationId)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

CacheConfiguration

public CacheConfiguration()
The default constructor.


CacheConfiguration

public CacheConfiguration(String configurationId)
Parameters:
configurationId - the configuration identifier
Since:
4.3M1

CacheConfiguration

public CacheConfiguration(EntryEvictionConfiguration evictionConfiguration)
Creates CacheConfiguration instance with given eviction configuration.

Parameters:
evictionConfiguration - describes details of entry eviction method.
Since:
4.3M1

CacheConfiguration

public CacheConfiguration(String configurationId,
                          EntryEvictionConfiguration evictionConfiguration)
Creates CacheConfiguration instance with given eviction configuration and id.

Parameters:
evictionConfiguration - describes details of entry eviction method.
configurationId - the configuration identifier.
Since:
4.3M1
Method Detail

setConfigurationId

public void setConfigurationId(String configurationId)
Parameters:
configurationId - the configuration identifier.

getConfigurationId

public String getConfigurationId()
Returns:
the configuration identifier.


Copyright © 2004–2013 XWiki. All rights reserved.