Reputation: 146
can we apply the customize off-heap eviction policy based upon cache attributes? (For example - Suppose, We store the Employee POJO object in the cache where status attribute value is true/false, is it possible to evict the records from the cache based upon status attribute? )
As per Apache Ignite Documentation, We can customize only on-heap eviction policy(By EvictionPolicy interface).is it possible to customize the PageEvictionMode also?
// Enabling RANDOM_2_LRU eviction for this region. regionCfg.setPageEvictionMode(DataPageEvictionMode.RANDOM_2_LRU);
Upvotes: 0
Views: 446
Reputation: 3591
Page eviction algorithm is much more complicated, than the one for on-heap entries. And unfortunately, as a consequence, it is less configurable.
DataPageEvictionMode
is a enum. There are only three possible values for it: DISABLED
, RANDOM_LRU
and RANDOM_2_LRU
.
You can find their descriptions by the following link: https://apacheignite.readme.io/docs/evictions
Page eviction based on entries' attributes is impossible since entries are distributed among pages in nearly random order. You can't tell the page memory to remove some particular entry. Only the whole page can be evicted.
Upvotes: 1