Class LRUCache
java.lang.Object
org.codehaus.groovy.runtime.memoize.LRUCache
- All Implemented Interfaces:
MemoizeCache<Object,
Object>
A cache backed by a Collections.SynchronizedMap
- Author:
- Vaclav Pech
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
LRUCache
public LRUCache(int maxCacheSize)
-
-
Method Details
-
put
- Specified by:
put
in interfaceMemoizeCache<Object,
Object>
-
get
- Specified by:
get
in interfaceMemoizeCache<Object,
Object>
-
cleanUpNullReferences
public void cleanUpNullReferences()Replying on the Collections.SynchronizedMap thread-safe iteration implementation the method will remove all entries holding SoftReferences to gc-evicted objects.- Specified by:
cleanUpNullReferences
in interfaceMemoizeCache<Object,
Object>
-