net.jini.jeri.kerberos
Class KerberosUtil.SoftCache.LRUHashMap
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap
net.jini.jeri.kerberos.KerberosUtil.SoftCache.LRUHashMap
- All Implemented Interfaces:
- Serializable, Cloneable, Map
- Enclosing class:
- KerberosUtil.SoftCache
private class KerberosUtil.SoftCache.LRUHashMap
- extends LinkedHashMap
A linked hash map that implements LRU replacement policy
Methods inherited from interface java.util.Map |
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
maxCacheSize
private int maxCacheSize
KerberosUtil.SoftCache.LRUHashMap
KerberosUtil.SoftCache.LRUHashMap(int maxCacheSize,
int initialCapacity)
- Construct an instance of the hash map.
- Parameters:
maxCacheSize
- maximum number of entries allowed
in this mapinitialCapacity
- initial capacity of the map
- Throws:
IllegalArgumentException
- if maxCacheSize is
negative
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry eldest)
- Overrides:
removeEldestEntry
in class LinkedHashMap
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.