Package com.tangosol.net.cache
Class LocalCache.InternalEvictionPolicy
java.lang.Object
com.tangosol.net.cache.LocalCache.InternalEvictionPolicy
- All Implemented Interfaces:
ConfigurableCacheMap.EvictionPolicy
- Enclosing class:
LocalCache
public static class LocalCache.InternalEvictionPolicy
extends Object
implements ConfigurableCacheMap.EvictionPolicy
The InternalEvictionPolicy represents a pluggable eviction policy for
the non-pluggable built-in (internal) eviction policies supported by
this cache implementation.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is called by the cache to indicate that an entry has been touched.int
Determine the LocalCache eviction type represented by this InternalEvictionPolicy.getName()
Obtain the name of the eviction policy.void
requestEviction
(int cMaximum) This method is called by the cache when the cache requires the eviction policy to evict entries.
-
Method Details
-
entryTouched
Description copied from interface:ConfigurableCacheMap.EvictionPolicy
This method is called by the cache to indicate that an entry has been touched.- Specified by:
entryTouched
in interfaceConfigurableCacheMap.EvictionPolicy
- Parameters:
entry
- the Cache Entry that has been touched
-
requestEviction
public void requestEviction(int cMaximum) Description copied from interface:ConfigurableCacheMap.EvictionPolicy
This method is called by the cache when the cache requires the eviction policy to evict entries.- Specified by:
requestEviction
in interfaceConfigurableCacheMap.EvictionPolicy
- Parameters:
cMaximum
- the maximum number of units that should remain in the cache when the eviction is complete
-
getName
Description copied from interface:ConfigurableCacheMap.EvictionPolicy
Obtain the name of the eviction policy. This is intended to be human readable for use in a monitoring tool; examples include "LRU" and "LFU".- Specified by:
getName
in interfaceConfigurableCacheMap.EvictionPolicy
- Returns:
- the name of the eviction policy
-
getEvictionType
public int getEvictionType()Determine the LocalCache eviction type represented by this InternalEvictionPolicy.- Returns:
- one of the EVICTION_POLICY_* constants
-