public class LRUEvictionConfiguration extends EntryEvictionConfiguration
EntryEvictionConfiguration.Algorithm.NONE
cache algorithm. Evicts the least recently used entry
when thresholds are hit.EntryEvictionConfiguration.Algorithm
AbstractMap.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, setTimeToLive
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
equals, hashCode, toString
public static final String MAXENTRIES_ID
public LRUEvictionConfiguration()
public LRUEvictionConfiguration(int maxEntries)
maxEntries
- the maximum entries the cache can contain.Copyright © 2004–2016 XWiki. All rights reserved.