public class LRUCacheCheapRead<K,V> extends LRUCache<K,V>
| Constructor and Description |
|---|
LRUCacheCheapRead(int maxCacheSize)
Create new cache with given maximum capacity.
|
| 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
|
createCachepublic LRUCacheCheapRead(int maxCacheSize)
maxCacheSize - Maximum number of items to keep.public V get(K key)
LRUCachepublic CacheEntry put(K key, V value)
LRUCachepublic void releaseCache()
LRUCachereleaseCache in class LRUCache<K,V>public int getMaxCacheSize()
LRUCachegetMaxCacheSize in class LRUCache<K,V>Copyright © 2009-2013 Oracle Corporation. All Rights Reserved.