public interface CacheEvictionPolicy<K,V>
#onEntryAccessed(boolean, org.apache.ignite.cache.Entry)notifications and whenever an element needs to be evicted,
org.apache.ignite.cache.Entry#evict()method should be called. If you need to access the underlying cache directly from this policy, you can get it via
Ignite comes with following eviction policies out-of-the-box:
The eviction policy thread-safety is ensured by Ignition. Implementations of this interface should not worry about concurrency and should be implemented as they were only accessed from one thread.
Note that implementations of all eviction policies provided by Ignite are very light weight in a way that they are all lock-free (or very close to it), and do not create any internal tables, arrays, or other expensive structures. The eviction order is preserved by attaching light-weight meta-data to existing cache entries.