/** * @param e Entry to notify eviction policy. */ private void notifyPolicy(GridCacheEntryEx e) { assert plcEnabled; assert plc != null; assert !e.isInternal() : "Invalid entry for policy notification: " + e; assert e.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + e + ", cctx=" + cctx + ", entryCtx=" + e.context() + "]"; if (log.isDebugEnabled()) log.debug("Notifying eviction policy with entry: " + e); if (filter == null || filter.evictAllowed(e.wrapLazyValue(cctx.keepBinary()))) plc.onEntryAccessed(e.obsoleteOrDeleted(), e.wrapEviction()); }
/** * Same as {@link GridFunc#isAll(Object, IgnitePredicate[])}, but safely unwraps exceptions. * * @param e Element. * @param p Predicates. * @return {@code True} if predicates passed. * @throws IgniteCheckedException If failed. */ public <K1, V1> boolean isAll( GridCacheEntryEx e, @Nullable IgnitePredicate<Cache.Entry<K1, V1>>[] p ) throws IgniteCheckedException { return F.isEmpty(p) || isAll(e.<K1, V1>wrapLazyValue(keepBinary()), p); }
/** * @param e Entry to notify eviction policy. */ @SuppressWarnings({"IfMayBeConditional", "RedundantIfStatement"}) private void notifyPolicy(GridCacheEntryEx e) { assert plcEnabled; assert plc != null; assert !e.isInternal() : "Invalid entry for policy notification: " + e; assert e.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + e + ", cctx=" + cctx + ", entryCtx=" + e.context() + "]"; if (log.isDebugEnabled()) log.debug("Notifying eviction policy with entry: " + e); if (filter == null || filter.evictAllowed(e.wrapLazyValue(cctx.keepBinary()))) plc.onEntryAccessed(e.obsoleteOrDeleted(), e.wrapEviction()); }