|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.hk2.utilities.cache.LRUCache<K,V>
org.glassfish.hk2.utilities.cache.internal.LRUCacheImpl<K,V>
public class LRUCacheImpl<K,V>
The implementation of the LRUCache
| Constructor Summary | |
|---|---|
LRUCacheImpl(int maxCacheSize)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class org.glassfish.hk2.utilities.cache.LRUCache |
|---|
createCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LRUCacheImpl(int maxCacheSize)
| Method Detail |
|---|
public V get(K key)
LRUCache
get in class LRUCache<K,V>key - Must be a non-null key, appropriate for use as the key to a hash map
public CacheEntry put(K key,
V value)
LRUCache
put in class LRUCache<K,V>key - Must be a non-null key, appropriate for use as the key to a hash mapvalue - Must be a non-null value
public void releaseCache()
LRUCache
releaseCache in class LRUCache<K,V>public int getMaxCacheSize()
LRUCache
getMaxCacheSize in class LRUCache<K,V>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||