public abstract class AbstractEvictionStrategy<A,E extends Evictable,S extends EvictableStore<A,E>> extends Object implements EvictionStrategy<A,E,S>
EvictableStore
implementations as specified
EvictionPolicyEvaluator
.Constructor and Description |
---|
AbstractEvictionStrategy() |
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 . |
protected abstract int |
evictInternal(S evictableStore,
EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator,
EvictionListener<A,E> evictionListener)
Does eviction internally.
|
public int evict(S evictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionChecker evictionChecker, EvictionListener<A,E> evictionListener)
EvictionChecker
.evict
in interface EvictionStrategy<A,E extends Evictable,S extends EvictableStore<A,E>>
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 entriesprotected abstract int evictInternal(S evictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionListener<A,E> evictionListener)
evictableStore
- Store that holds Evictable
entriesevictionPolicyEvaluator
- EvictionPolicyEvaluator
to evaluate
EvictionPolicy
on entriesevictionListener
- EvictionListener
to listen evicted entriesCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.