com.hazelcast.cache.impl.eviction
Interface EvictionStrategy<A,E extends Evictable,S extends EvictableStore<A,E>>

All Known Implementing Classes:
AbstractEvictionStrategy, SamplingBasedEvictionStrategy

public interface EvictionStrategy<A,E extends Evictable,S extends EvictableStore<A,E>>

Interface for eviction implementations to evict EvictableStore implementations as specified EvictionPolicyEvaluator.


Method Summary
 int evict(S evictableStore, EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator, EvictionChecker evictionChecker)
          Does eviction if eviction is required by given EvictionChecker.
 

Method Detail

evict

int evict(S evictableStore,
          EvictionPolicyEvaluator<A,E> evictionPolicyEvaluator,
          EvictionChecker evictionChecker)
Does eviction if eviction is required by given EvictionChecker.

Parameters:
evictableStore - Store that holds Evictable entries
evictionPolicyEvaluator - EvictionPolicyEvaluator to evaluate EvictionPolicy on entries
evictionChecker - EvictionChecker to make a decision about if eviction is required or not. If you want evict anyway, you can use EvictionChecker.EVICT_ALWAYS
Returns:
evicted entry count


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.