ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kcheng.mvp" <kcheng....@gmail.com>
Subject Why GridCacheEvictionManager always use cfg.getEvictionPolicy/cfg.getEvictionPolicyFactory even there is NearEvictionPolicy configured?
Date Thu, 05 Jul 2018 04:21:06 GMT
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/

Mime
View raw message