A
- Type of the accessor (id) of the EvictionCandidate
E
- Type of the Evictable
value of
EvictionCandidate
S
- Type of the EvictableStore
public interface EvictionStrategy<A,E extends Evictable,S extends EvictableStore<A,E>>
EvictableStore
implementations as specified
EvictionPolicyEvaluator
.Modifier and Type | Method and Description |
---|---|
int |
evict(S evictableStore,
EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator,
EvictionChecker evictionChecker,
EvictionListener<A,E> evictionListener)
Does eviction if eviction is required by given
EvictionChecker . |
int evict(S evictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionChecker evictionChecker, EvictionListener<A,E> evictionListener)
EvictionChecker
.evictableStore
- Store that holds Evictable
entriesevictionPolicyEvaluator
- EvictionPolicyEvaluator
to evaluate
EvictionPolicy
on entriesevictionChecker
- EvictionChecker
to make a decision about if eviction is
required or not. If you want evict anyway,
you can use EvictionChecker.EVICT_ALWAYS
evictionListener
- EvictionListener
to listen evicted entriesCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.