org.codehaus.groovy.runtime.memoize
Interface MemoizeCache<K,V>
- Type Parameters:
K - type of the keysV - type of the values
- All Known Implementing Classes:
- LRUCache, UnlimitedConcurrentCache
public interface MemoizeCache<K,V>
Represents a memoize cache with its essential methods
- Author:
- Vaclav Pech
Method Summary
void |
cleanUpNullReferences()
Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache. |
V |
get(K key)
|
V |
put(K key,
V value)
|
put
V put(K key,
V value)
get
V get(K key)
cleanUpNullReferences
void cleanUpNullReferences()
- Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache.
The implementation must ensure that concurrent invocations of all methods on the cache may occur from other threads
and thus should protect any shared resources.