public class LRUEvictionConfiguration extends EntryEvictionConfiguration
EntryEvictionConfiguration.Algorithm.NONE cache algorithm. Evicts the least recently used entry
when thresholds are hit.EntryEvictionConfiguration.AlgorithmAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier and Type | Field and Description |
|---|---|
static String |
MAXENTRIES_ID
The key to access the maximum entries the cache can contain.
|
CONFIGURATIONID, TIMETOLIVE_ID| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getMaxEntries() |
void |
setMaxEntries(int maxEntries) |
getAlgorithm, getTimeToLive, setAlgorithm, setTimeToLiveclear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, valuesequals, hashCode, toStringpublic static final String MAXENTRIES_ID
public LRUEvictionConfiguration()
public LRUEvictionConfiguration(int maxEntries)
maxEntries - the maximum entries the cache can contain.Copyright © 2004–2015 XWiki. All rights reserved.