Class ExpiringHashMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.concurrent.ConcurrentHashMap<K,ExpiringHashMap.Entry<V>>
de.bsommerfeld.pathetic.engine.util.ExpiringHashMap<K,V>
Type Parameters:
K - the type of keys maintained by this map
V - the type of mapped values
All Implemented Interfaces:
Serializable, ConcurrentMap<K,ExpiringHashMap.Entry<V>>, Map<K,ExpiringHashMap.Entry<V>>

public class ExpiringHashMap<K,V> extends ConcurrentHashMap<K,ExpiringHashMap.Entry<V>>
A ConcurrentHashMap that removes entries on access if they are expired.

The default expiration time is 5 minutes. The cleanup itself is only being triggered every 5 minutes on access by default, but both values can be configured.

See Also: