public interface EvictionCriteria<K,V>
CustomEvictionAttributes
. This will be invoked by periodic evictor
task that will get the keys to be evicted using this and then destroy from
the region to which this is attached.Modifier and Type | Method and Description |
---|---|
boolean |
doEvict(EntryEvent<K,V> event)
Last moment check if an entry should be evicted or not applying the
EVICTION BY CRITERIA again under the region entry lock in case the entry
has changed after the check in
getKeysToBeEvicted(long, com.gemstone.gemfire.cache.Region<K, V>) . |
java.util.Iterator<java.util.Map.Entry<K,java.lang.Object>> |
getKeysToBeEvicted(long currentMillis,
Region<K,V> region)
Get the (key, routing object) of the entries to be evicted from region
satisfying EVICTION BY CRITERIA at this point of time.
|
boolean |
isEquivalent(EvictionCriteria<K,V> other)
Return true if this eviction criteria is equivalent to the other one.
|
java.util.Iterator<java.util.Map.Entry<K,java.lang.Object>> getKeysToBeEvicted(long currentMillis, Region<K,V> region)
The returned Map.Entry object by the Iterator may be reused internally so caller must extract the key, routing object from the entry on each iteration.
boolean doEvict(EntryEvent<K,V> event)
getKeysToBeEvicted(long, com.gemstone.gemfire.cache.Region<K, V>)
.boolean isEquivalent(EvictionCriteria<K,V> other)