|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.pfl.basic.concurrent.WeakCache<K,V>
public abstract class WeakCache<K,V>
A simple cache with weak keys. get may be called safely with good concurrency by multiple threads. In order to use this, some reasonable properties are expected:
| Constructor Summary | |
|---|---|
WeakCache()
|
|
| Method Summary | |
|---|---|
void |
clear()
Remove all entries from the cache. |
V |
get(K key)
Return the value (if any) associated with key. |
protected abstract V |
lookup(K key)
Must be implemented in a subclass. |
V |
remove(K key)
Remove any value associated with the key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WeakCache()
| Method Detail |
|---|
protected abstract V lookup(K key)
key - Key value for which a value must be computed.
public V remove(K key)
key - Key to value that may be in cache.
public V get(K key)
key -
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||