java.lang.Object
com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
com.ibm.dtfj.corereaders.zos.util.AbstractLruCache
com.ibm.dtfj.corereaders.zos.util.ObjectLruCache
- All Implemented Interfaces:
Serializable
This class provides an LRU (Least Recently Used) cache which maps integer keys to object values.
See the description in the superclass
AbstractLruCache
for more
details.- See Also:
-
Constructor Summary
-
Method Summary
Methods declared in class com.ibm.dtfj.corereaders.zos.util.AbstractLruCache
getIndexAndPromote, putIndexAndPromote
Methods declared in class com.ibm.dtfj.corereaders.zos.util.AbstractHashMap
getKeys, getKeysArray
-
Constructor Details
-
ObjectLruCache
public ObjectLruCache(int maxSize) Create a new ObjectLruCache.- Parameters:
maxSize
- the maximum size the cache can grow to
-
-
Method Details
-
get
Returns the value mapped by the given key. Also promotes this key to the most recently used.- Returns:
- the value or null if it cannot be found
-
put
Add the key/value pair to the map.
-