/** * @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()); }
/** {@inheritDoc} */ @Override public void touch(IgniteTxEntry txEntry, boolean loc) { assert txEntry.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + txEntry + ", cctx=" + cctx + ", entryCtx=" + txEntry.context() + "]"; if (!plcEnabled) return; if (!loc) { if (cctx.isNear()) return; } GridCacheEntryEx e = txEntry.cached(); if (e.detached() || e.isInternal()) return; try { if (e.markObsoleteIfEmpty(null) || e.obsolete()) e.context().cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } notifyPolicy(e); }
/** {@inheritDoc} */ @Override public void touch(GridCacheEntryEx e) { assert e.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + e + ", cctx=" + cctx + ", entryCtx=" + e.context() + "]"; if (e.detached() || e.isInternal()) return; try { if (e.markObsoleteIfEmpty(null) || e.obsolete()) e.context().cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } if (!plcEnabled) return; if (!enterBusy()) return; try { if (log.isDebugEnabled()) log.debug("Touching entry [entry=" + e + ", localNode=" + cctx.nodeId() + ']'); notifyPolicy(e); } finally { busyLock.leaveBusy(); } }
replicate ? DR_PRELOAD : DR_NONE, false)) { if (rec && !entry.isInternal()) cctx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), null, null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null,
assert key != null; if (e.isInternal()) return;
drType, false)) { if (rec && !entry.isInternal()) cacheCtx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), null, null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null,
if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED) && !cached.isInternal()) cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(), null, null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, entry.value(), true, null,
/** * @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()); }
/** {@inheritDoc} */ @Override public void touch(IgniteTxEntry txEntry, boolean loc) { assert txEntry.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + txEntry + ", cctx=" + cctx + ", entryCtx=" + txEntry.context() + "]"; if (!plcEnabled) return; if (!loc) { if (cctx.isNear()) return; } GridCacheEntryEx e = txEntry.cached(); if (e.detached() || e.isInternal()) return; try { if (e.markObsoleteIfEmpty(null) || e.obsolete()) e.context().cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } notifyPolicy(e); }
/** {@inheritDoc} */ @Override public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) { assert e.context() == cctx : "Entry from another cache context passed to eviction manager: [" + "entry=" + e + ", cctx=" + cctx + ", entryCtx=" + e.context() + "]"; if (e.detached() || e.isInternal()) return; try { if (e.markObsoleteIfEmpty(null) || e.obsolete()) e.context().cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } if (!plcEnabled) return; if (!enterBusy()) return; try { if (log.isDebugEnabled()) log.debug("Touching entry [entry=" + e + ", localNode=" + cctx.nodeId() + ']'); notifyPolicy(e); } finally { busyLock.leaveBusy(); } }
replicate ? DR_PRELOAD : DR_NONE, false)) { if (rec && !entry.isInternal()) cctx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null,
assert key != null; if (e.isInternal()) return;
drType, false)) { if (rec && !entry.isInternal()) cacheCtx.events().addEvent(entry.partition(), entry.key(), cctx.localNodeId(), (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, info.value(), true, null,
if (cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_LOADED) && !cached.isInternal()) cctx.events().addEvent(cached.partition(), cached.key(), cctx.localNodeId(), (IgniteUuid)null, null, EVT_CACHE_REBALANCE_OBJECT_LOADED, entry.value(), true, null,