| java.lang.Object com.knowgate.cache.LRUCachePolicy
LRUCachePolicy | final public class LRUCachePolicy (Code) | | LRU Cache Policy
Implementation of a Least Recently Used cache policy.
author: Simone Bordet <simone.bordet@compaq.com> version: 1.3.2.1 |
Inner Class :public class LRUList | |
Inner Class :final public class LRUCacheEntry | |
Constructor Summary | |
public | LRUCachePolicy() Creates a LRU cache policy object with zero cache capacity. | public | LRUCachePolicy(int min, int max) Creates a LRU cache policy object with the specified minimum and maximum capacity. |
m_list | protected LRUList m_list(Code) | | The linked list used to implement the LRU algorithm
|
m_map | protected HashMap m_map(Code) | | The map holding the cached objects
|
m_maxCapacity | protected int m_maxCapacity(Code) | | The maximum capacity of this cache
|
m_minCapacity | protected int m_minCapacity(Code) | | The minimum capacity of this cache
|
LRUCachePolicy | public LRUCachePolicy()(Code) | | Creates a LRU cache policy object with zero cache capacity.
See Also: LRUCachePolicy.create |
LRUCachePolicy | public LRUCachePolicy(int min, int max)(Code) | | Creates a LRU cache policy object with the specified minimum and maximum capacity.
See Also: LRUCachePolicy.create |
ageOut | protected void ageOut(LRUCacheEntry entry)(Code) | | Callback method called when the cache algorithm ages out of the cache
the given entry.
The implementation here is removing the given entry from the cache.
|
cacheMiss | protected void cacheMiss()(Code) | | Callback method called when a cache miss happens.
|
createCacheEntry | protected LRUCacheEntry createCacheEntry(Object key, Object value, long t)(Code) | | Factory method for cache entries
|
createList | protected LRUList createList()(Code) | | Factory method for the linked list used by this cache implementation.
|
flush | public void flush()(Code) | | |
|
|