protected class CompactSerializationCache.WrapperEvictionPolicy extends CompactSerializationCache.InternalEvictionPolicy
Entry-based
API.CompactSerializationCache.InternalEvictionPolicy.EvictionCandidate, CompactSerializationCache.InternalEvictionPolicy.EvictionVisitor
Modifier and Type | Field and Description |
---|---|
protected ConfigurableCacheMap.EvictionPolicy |
f_policy
The underlying (custom) EvictionPolicy.
|
f_visitorTouchCount, f_visitorTouchTime, m_ldtLastEvict
Constructor and Description |
---|
WrapperEvictionPolicy(ConfigurableCacheMap.EvictionPolicy policy)
Construct a WrapperEvictionPolicy.
|
Modifier and Type | Method and Description |
---|---|
protected long |
calculateWeight(Binary binKey)
Calculate the "weight" of the entry associated with the specified key.
|
void |
entryTouched(Binary binKey)
This method is called by the cache to indicate that the entry for the specified key has been touched.
|
void |
entryTouched(ConfigurableCacheMap.Entry entry)
This method is called by the cache to indicate that an entry has been touched.
|
protected ConfigurableCacheMap.EvictionPolicy |
getConfiguredPolicy()
Return the
configured EvictionPolicy instance. |
void |
requestEviction(int cMaximum)
This method is called by the cache when the cache requires the eviction policy to evict entries.
|
getName, touchInternal
protected final ConfigurableCacheMap.EvictionPolicy f_policy
public WrapperEvictionPolicy(ConfigurableCacheMap.EvictionPolicy policy)
policy
- the underlying EvictionPolicypublic void entryTouched(Binary binKey)
entryTouched
in class CompactSerializationCache.InternalEvictionPolicy
binKey
- the keypublic void entryTouched(ConfigurableCacheMap.Entry entry)
entryTouched
in interface ConfigurableCacheMap.EvictionPolicy
entryTouched
in class CompactSerializationCache.InternalEvictionPolicy
entry
- the Cache Entry that has been touchedprotected long calculateWeight(Binary binKey)
calculateWeight
in class CompactSerializationCache.InternalEvictionPolicy
binKey
- the key to calculate the weight forpublic void requestEviction(int cMaximum)
requestEviction
in interface ConfigurableCacheMap.EvictionPolicy
requestEviction
in class CompactSerializationCache.InternalEvictionPolicy
cMaximum
- the maximum number of units that should remain in the cache when the eviction is completeprotected ConfigurableCacheMap.EvictionPolicy getConfiguredPolicy()
configured
EvictionPolicy instance.getConfiguredPolicy
in class CompactSerializationCache.InternalEvictionPolicy