Package com.tangosol.net.cache
Class CompactSerializationCache.LRUEvictionPolicy
- java.lang.Object
-
- com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
-
- com.tangosol.net.cache.CompactSerializationCache.LRUEvictionPolicy
-
- All Implemented Interfaces:
ConfigurableCacheMap.EvictionPolicy
- Enclosing class:
- CompactSerializationCache
protected class CompactSerializationCache.LRUEvictionPolicy extends CompactSerializationCache.InternalEvictionPolicy
An EvictionPolicy implementing the Least Recently Used (LRU) algorithm.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate, CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor
-
-
Field Summary
-
Fields inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
f_visitorTouchCount, f_visitorTouchTime, m_ldtLastEvict
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedLRUEvictionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcalculateWeight(Binary binKey)Calculate the "weight" of the entry associated with the specified key.protected ConfigurableCacheMap.EvictionPolicygetConfiguredPolicy()Return theconfiguredEvictionPolicy instance.-
Methods inherited from class com.tangosol.net.cache.CompactSerializationCache.InternalEvictionPolicy
entryTouched, entryTouched, getName, requestEviction, touchInternal
-
-
-
-
Method Detail
-
calculateWeight
protected long calculateWeight(Binary binKey)
Calculate the "weight" of the entry associated with the specified key. The weight is a quantitative measure of how to prioritize the eviction of this entry w.r.t. the other cache entries. Entries with a smaller weights are of higher priority and are preferred over entries with larger weights for eviction.- Specified by:
calculateWeightin classCompactSerializationCache.InternalEvictionPolicy- Parameters:
binKey- the key to calculate the weight for- Returns:
- the weight of the entry
-
getConfiguredPolicy
protected ConfigurableCacheMap.EvictionPolicy getConfiguredPolicy()
Return theconfiguredEvictionPolicy instance.- Specified by:
getConfiguredPolicyin classCompactSerializationCache.InternalEvictionPolicy- Returns:
- the configured EvictionPolicy
-
-