Package com.ctc.wstx.util
Class SimpleCache<K,V>
java.lang.Object
com.ctc.wstx.util.SimpleCache<K,V>
Simple Map implementation usable for caches where contents do not
expire, but where size needs to remain bounded.
Note: we probably should use weak references, or something similar to limit maximum memory usage. This could be implemented in many ways, perhaps by using two areas: first, smaller one, with strong refs, and secondary bigger one that uses soft references.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final SimpleCache.LimitMap
<K, V> (package private) final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
mItems
-
mMaxSize
final int mMaxSize
-
-
Constructor Details
-
SimpleCache
public SimpleCache(int maxSize)
-
-
Method Details
-
find
-
add
-