Re: Why GridCacheEvictionManager always use cfg.getEvictionPolicy/cfg.getEvictionPolicyFactory even there is NearEvictionPolicy configured?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Why GridCacheEvictionManager always use cfg.getEvictionPolicy/cfg.getEvictionPolicyFactory even there is NearEvictionPolicy configured?

Dmitriy Pavlov
Hi,

Is this question related to some contribution? If not, probably user@ list
is better place to ask, even if question is advanced. Community members
monitors user list, so even advanced question can find asnwer there.

Dev@ list is intended for discussions related to particular contributions,
PRs, tickests, test failures, proposed changes, development infra, etc.

Sincerely,
Dmitriy Pavlov

чт, 5 июл. 2018 г. в 7:21, kcheng.mvp <[hidden email]>:

> As the method
> *org.apache.ignite.internal.processors.cache.GridCacheAdapter#isNear*
> always
> returns false, it will make the near cache eviction policy don't take
> effect. Here is the code from
>
> *org.apache.ignite.internal.processors.cache.GridCacheEvictionManager#start0*.
> is this an expected behavior ?
> ==========================
> CacheConfiguration cfg = cctx.config();
>
>         if (cctx.isNear()) {
>             plc =
> (cfg.getNearConfiguration().getNearEvictionPolicyFactory()
> != null) ?
>
>
> (EvictionPolicy)cfg.getNearConfiguration().getNearEvictionPolicyFactory().create()
> :
>                 cfg.getNearConfiguration().getNearEvictionPolicy();
>         }
>         else if (cfg.getEvictionPolicyFactory() != null)
>             plc = (EvictionPolicy)cfg.getEvictionPolicyFactory().create();
>         else
>             plc = cfg.getEvictionPolicy();
>
>         plcEnabled = plc != null;
>
>         filter = cfg.getEvictionFilter();
> ==========================
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>