use of org.apache.ignite.cache.eviction.EvictionPolicy in project ignite by apache.
the class GridCacheEvictionManager method start0.
/**
* {@inheritDoc}
*/
@Override
public void start0() throws IgniteCheckedException {
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;
if (plcEnabled)
prepare(cfg, plc, cctx.isNear());
filter = cfg.getEvictionFilter();
if (log.isDebugEnabled())
log.debug("Eviction manager started on node: " + cctx.nodeId());
}
use of org.apache.ignite.cache.eviction.EvictionPolicy in project ignite by apache.
the class EvictionAbstractTest method testEvictionPolicyMbeanValidity.
/**
* @throws Exception if failed.
*/
@Test
public void testEvictionPolicyMbeanValidity() throws Exception {
try {
Ignite ignite = startGrids(2);
// Instantiate policy object to know exact class.
EvictionPolicy plc = createPolicy(0);
validateMbeans(ignite, plc.getClass().getName());
} finally {
stopAllGrids();
}
}
Aggregations