org.ehcache.config
Interface EvictionAdvisor<K,V>

Type Parameters:
K - the key type for the cache
V - the value type for the cache

public interface EvictionAdvisor<K,V>

A specialized predicate used to advise on eviction of cache entries.


Method Summary
 boolean adviseAgainstEviction(K key, V value)
          Returns true if the given key value pair should not be evicted if possible.
 

Method Detail

adviseAgainstEviction

boolean adviseAgainstEviction(K key,
                              V value)
Returns true if the given key value pair should not be evicted if possible.

Any exception thrown from this method will be logged and the result considered false.

Parameters:
key - the cache key
value - the cache value
Returns:
true if eviction should be avoided, false otherwise