public class LRUCacheImpl<K,V> extends LRUCache<K,V>
Constructor and Description |
---|
LRUCacheImpl(int maxCacheSize) |
Modifier and Type | Method and Description |
---|---|
V |
get(K key)
Returns the value associated with the given key.
|
int |
getMaxCacheSize()
Returns the maximum number of entries that will be stored in this cache
|
CacheEntry |
put(K key,
V value)
Adds the given key and value pair into the cache
|
void |
releaseCache()
Clears all entries in the cache, for use when a known event makes the cache incorrect
|
String |
toString() |
createCache
public V get(K key)
LRUCache
public CacheEntry put(K key, V value)
LRUCache
public void releaseCache()
LRUCache
releaseCache
in class LRUCache<K,V>
public int getMaxCacheSize()
LRUCache
getMaxCacheSize
in class LRUCache<K,V>
Copyright © 2015 Oracle Corporation. All rights reserved.