@Vetoed public class LRUCacheStore<K,V> extends LinkedHashMap<K,V> implements CacheStore<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
LRUCacheStore(int capacity) |
| Modifier and Type | Method and Description |
|---|---|
V |
fetch(K key)
Fetches the value under the key
|
V |
fetch(K key,
Callable<V> valueProvider)
Fetches the value under the key.
|
protected boolean |
removeEldestEntry(Map.Entry<K,V> eldest) |
V |
write(K key,
V value)
Writes a value on the cache
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeprotected boolean removeEldestEntry(Map.Entry<K,V> eldest)
removeEldestEntry in class LinkedHashMap<K,V>public V fetch(K key, Callable<V> valueProvider)
CacheStorefetch in interface CacheStore<K,V>public V write(K key, V value)
CacheStorewrite in interface CacheStore<K,V>public V fetch(K key)
CacheStorefetch in interface CacheStore<K,V>Copyright © 2014 Caelum. All rights reserved.