org.hibernate.internal.util.collections
Class LRUMap
java.lang.Object
   java.util.AbstractMap<K,V>
java.util.AbstractMap<K,V>
       java.util.HashMap<K,V>
java.util.HashMap<K,V>
           java.util.LinkedHashMap
java.util.LinkedHashMap
               org.hibernate.internal.util.collections.LRUMap
org.hibernate.internal.util.collections.LRUMap
- All Implemented Interfaces: 
- Serializable, Cloneable, Map
- public class LRUMap 
- extends LinkedHashMap- implements Serializable
A simple LRU cache that implements the Map interface. Instances
 are not thread-safe and should be synchronized externally, for instance by
 using Collections.synchronizedMap(java.util.Map).
- See Also:
- Serialized Form
 
 
| Constructor Summary | 
| LRUMap(int maxEntries)
 | 
 
 
 
 
 
 
| Methods inherited from interface java.util.Map | 
| containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values | 
 
LRUMap
public LRUMap(int maxEntries)
removeEldestEntry
protected boolean removeEldestEntry(Map.Entry eldest)
- 
- Overrides:
- removeEldestEntryin class- LinkedHashMap
 
- 
 
Copyright © 2001-2012 Red Hat, Inc.  All Rights Reserved.