/** {@inheritDoc} */ @Override public void touch(GridCacheEntryEx e) { if (e.detached()) return; try { boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null, false) || e.markObsoleteIfEmpty(null); if (evicted && !e.isDht()) // GridDhtCacheEntry removes entry when obsoleted. cctx.cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } }
/** {@inheritDoc} */ @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException { boolean recordable = cctx.events().isRecordable(EVT_CACHE_ENTRY_EVICTED); GridCacheAdapter cache = cctx.cache(); // Get all participating entries to avoid deadlock. for (Object k : keys) { KeyCacheObject cacheKey = cctx.toCacheKeyObject(k); GridCacheEntryEx entry = cache.peekEx(cacheKey); if (entry != null && entry.evictInternal(GridCacheVersionManager.EVICT_VER, null, false)) { if (plcEnabled) notifyPolicy(entry); if (recordable) cctx.events().addEvent(entry.partition(), entry.key(), cctx.nodeId(), null, null, null, EVT_CACHE_ENTRY_EVICTED, null, false, entry.rawGet(), entry.hasValue(), null, null, null, false); } } }
boolean evicted = entry.evictInternal(obsoleteVer, filter, false);
cacheCtx.cache().entryEx(dataRow.key()); evictionDone |= entryEx.evictInternal(GridCacheVersionManager.EVICT_VER, null, true);
/** {@inheritDoc} */ @Override public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) { if (e.detached()) return; try { boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null, false) || e.markObsoleteIfEmpty(null); if (evicted && !e.isDht()) // GridDhtCacheEntry removes entry when obsoleted. cctx.cache().removeEntry(e); } catch (IgniteCheckedException ex) { U.error(log, "Failed to evict entry from cache: " + e, ex); } }
/** {@inheritDoc} */ @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException { boolean recordable = cctx.events().isRecordable(EVT_CACHE_ENTRY_EVICTED); GridCacheAdapter cache = cctx.cache(); // Get all participating entries to avoid deadlock. for (Object k : keys) { KeyCacheObject cacheKey = cctx.toCacheKeyObject(k); GridCacheEntryEx entry = cache.peekEx(cacheKey); if (entry != null && entry.evictInternal(GridCacheVersionManager.EVICT_VER, null, false)) { if (plcEnabled) notifyPolicy(entry); if (recordable) cctx.events().addEvent(entry.partition(), entry.key(), cctx.nodeId(), (IgniteUuid)null, null, EVT_CACHE_ENTRY_EVICTED, null, false, entry.rawGet(), entry.hasValue(), null, null, null, false); } } }
boolean evicted = entry.evictInternal(obsoleteVer, filter, false);
cacheCtx.cache().entryEx(dataRow.key()); evictionDone |= entryEx.evictInternal(GridCacheVersionManager.EVICT_VER, null, true);