org.xwiki.cache.eviction
Class EntryEvictionConfiguration
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
org.xwiki.cache.eviction.EntryEvictionConfiguration
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>
- Direct Known Subclasses:
- LRUEvictionConfiguration
public class EntryEvictionConfiguration
- extends java.util.HashMap<java.lang.String,java.lang.Object>
This configuration class is used to add constraints in the configuration of the cache to create.
CacheFactory factory = (CacheFactory) getComponentManager().lookup(CacheFactory.class, this.roleHint);
CacheConfiguration conf = new CacheConfiguration();
LRUEvictionConfiguration lec = new LRUEvictionConfiguration();
lec.setMaxEntries(1);
conf.put(LRUEvictionConfiguration.CONFIGURATIONID, lec);
- Version:
- $Id$
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| 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 |
CONFIGURATIONID
public static final java.lang.String CONFIGURATIONID
- The key use to access eviction configuration in the
CacheConfiguration.
- See Also:
- Constant Field Values
TIMETOLIVE_ID
public static final java.lang.String TIMETOLIVE_ID
- The key used to access time to live duration in the
EntryEvictionConfiguration.
- See Also:
- Constant Field Values
EntryEvictionConfiguration
public EntryEvictionConfiguration()
setAlgotithm
public void setAlgotithm(EntryEvictionConfiguration.Algorithm mode)
- Parameters:
mode - the ordering/storing algorithm used by the cache.
getAlgorithm
public EntryEvictionConfiguration.Algorithm getAlgorithm()
- Returns:
- the ordering/storing algorithm used by the cache.
setTimeToLive
public void setTimeToLive(int timeToLive)
- Parameters:
timeToLive - the maximum time to live in seconds of a cache entry.
getTimeToLive
public int getTimeToLive()
- Returns:
- the maximum time to live in seconds of a cache entry.
Copyright © 2004-2011 XWiki. All Rights Reserved.