public final class SamplingEvictionStrategy<A,E extends Evictable,S extends SampleableEvictableStore<A,E>> extends Object
Evictable
entries from SampleableEvictableStore
, orders candidates
for eviction according to the provided EvictionPolicyEvaluator.Modifier and Type | Field and Description |
---|---|
static SamplingEvictionStrategy |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
evict(S evictableStore,
EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator,
EvictionChecker evictionChecker,
EvictionListener<A,E> evictionListener)
Does eviction if required.
|
protected boolean |
evictInternal(S sampleableEvictableStore,
EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator,
EvictionListener<A,E> evictionListener)
Processes sampling based eviction logic on
SampleableEvictableStore . |
public static final SamplingEvictionStrategy INSTANCE
public boolean evict(S evictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionChecker evictionChecker, EvictionListener<A,E> evictionListener)
evictableStore
- Store that holds Evictable
entriesevictionPolicyEvaluator
- EvictionPolicyEvaluator
to evaluate
EvictionPolicy
on entriesevictionChecker
- EvictionChecker
to check whether max size is reached, therefore
eviction is required or not.evictionListener
- EvictionListener
to listen evicted entriesprotected boolean evictInternal(S sampleableEvictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionListener<A,E> evictionListener)
SampleableEvictableStore
.sampleableEvictableStore
- SampleableEvictableStore
that holds Evictable
entriesevictionPolicyEvaluator
- EvictionPolicyEvaluator
to evaluateevictionListener
- EvictionListener
to listen evicted entriesCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.