org.xwiki.cache.eviction
Class LRUEvictionConfiguration

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<java.lang.String,java.lang.Object>
          extended by org.xwiki.cache.eviction.EntryEvictionConfiguration
              extended by org.xwiki.cache.eviction.LRUEvictionConfiguration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class LRUEvictionConfiguration
extends EntryEvictionConfiguration

An helper for EntryEvictionConfiguration.Algorithm.NONE cache algorithm. Evicts the least recently used entry when thresholds are hit.

Version:
$Id$
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xwiki.cache.eviction.EntryEvictionConfiguration
EntryEvictionConfiguration.Algorithm
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Field Summary
static java.lang.String MAXENTRIES_ID
          The key to access the maximum entries the cache can contain.
 
Fields inherited from class org.xwiki.cache.eviction.EntryEvictionConfiguration
CONFIGURATIONID, TIMETOLIVE_ID
 
Constructor Summary
LRUEvictionConfiguration()
          Create a new EntryEvictionConfiguration based on LRU algorithm.
 
Method Summary
 int getMaxEntries()
           
 void setMaxEntries(int maxEntries)
           
 
Methods inherited from class org.xwiki.cache.eviction.EntryEvictionConfiguration
getAlgorithm, getTimeToLive, setAlgotithm, setTimeToLive
 
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
 

Field Detail

MAXENTRIES_ID

public static final java.lang.String MAXENTRIES_ID
The key to access the maximum entries the cache can contain.

See Also:
Constant Field Values
Constructor Detail

LRUEvictionConfiguration

public LRUEvictionConfiguration()
Create a new EntryEvictionConfiguration based on LRU algorithm.

Method Detail

setMaxEntries

public void setMaxEntries(int maxEntries)
Parameters:
maxEntries - the maximum entries the cache can contain.

getMaxEntries

public int getMaxEntries()
Returns:
the maximum entries the cache can contain.


Copyright © 2004-2011 XWiki. All Rights Reserved.