org.xwiki.cache.config
Class LRUCacheConfiguration

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

public class LRUCacheConfiguration
extends CacheConfiguration

Cache configuration using LRU eviction method.

Since:
4.3M1
Version:
$Id: eb7aa3f0983fa5d6493224f4a87903e3a26a7f66 $
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
LRUCacheConfiguration()
          Creates new LRUCacheConfiguration instance with empty (null) configurationId, default size of 100 and time to live 0.
LRUCacheConfiguration(String configurationId)
          Creates new LRUCacheConfiguration instance with given configurationId, default max size of 100 and time to live 0.
LRUCacheConfiguration(String configurationId, int maxSize)
          Creates new LRUCacheConfiguration instance with given configurationId and max size, and default time to live 0.
LRUCacheConfiguration(String configurationId, int maxSize, int timeToLive)
          Creates new LRUCacheConfiguration instance with given configurationId, max size and time to live.
 
Method Summary
 
Methods inherited from class org.xwiki.cache.config.CacheConfiguration
getConfigurationId, setConfigurationId
 
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

LRUCacheConfiguration

public LRUCacheConfiguration()
Creates new LRUCacheConfiguration instance with empty (null) configurationId, default size of 100 and time to live 0.


LRUCacheConfiguration

public LRUCacheConfiguration(String configurationId)
Creates new LRUCacheConfiguration instance with given configurationId, default max size of 100 and time to live 0.

Parameters:
configurationId - configuration identifier

LRUCacheConfiguration

public LRUCacheConfiguration(String configurationId,
                             int maxSize)
Creates new LRUCacheConfiguration instance with given configurationId and max size, and default time to live 0.

Parameters:
configurationId - configuration identifier
maxSize - maximum cache capacity

LRUCacheConfiguration

public LRUCacheConfiguration(String configurationId,
                             int maxSize,
                             int timeToLive)
Creates new LRUCacheConfiguration instance with given configurationId, max size and time to live.

Parameters:
configurationId - configuration identifier
maxSize - maximum cache capacity
timeToLive - for how long cache entry will be valid (in seconds)


Copyright © 2004–2014 XWiki. All rights reserved.