- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>
public final class LRUProtectionStorage
extends java.util.LinkedHashMap<java.lang.Object,java.lang.Object>
Protects stored resources from eviction from memory following the LRU (Last Recently Used) strategy.
If the maximum size has been reached all newly added elements will cause the oldest element to be removed from the storage
in order not to exceed the maximum capacity.
The touch method can be used to renew an element and move it to the from the LRU queue.
- Author:
- Vaclav Pech
Date: Jun 22, 2010
- See Also:
- Serialized Form