org.xwiki.cache.eviction
Class LRUEvictionConfiguration
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.xwiki.cache.eviction.EntryEvictionConfiguration
org.xwiki.cache.eviction.LRUEvictionConfiguration
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,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: 13a99a93c44c12f1426e572ea2b2a58aec1c3ea3 $
- See Also:
- Serialized Form
|
Field Summary |
static String |
MAXENTRIES_ID
The key to access the maximum entries the cache can contain. |
|
Constructor Summary |
LRUEvictionConfiguration()
Create a new EntryEvictionConfiguration based on LRU algorithm. |
LRUEvictionConfiguration(int maxEntries)
Create a new EntryEvictionConfiguration with given capacity, eviction will be based on LRU algorithm. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
MAXENTRIES_ID
public static final String MAXENTRIES_ID
- The key to access the maximum entries the cache can contain.
- See Also:
- Constant Field Values
LRUEvictionConfiguration
public LRUEvictionConfiguration()
- Create a new EntryEvictionConfiguration based on LRU algorithm.
LRUEvictionConfiguration
public LRUEvictionConfiguration(int maxEntries)
- Create a new EntryEvictionConfiguration with given capacity, eviction will be based on LRU algorithm.
- Parameters:
maxEntries - the maximum entries the cache can contain.- Since:
- 4.3M1
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–2013 XWiki. All rights reserved.