/** * * @param key Entry key. */ public final void removeIfObsolete(KeyCacheObject key) { assert key != null; GridCacheMapEntry entry = map.getEntry(ctx, key); if (entry != null && entry.obsolete()) removeEntry(entry); }
/** * @param key Entry key. * @param topVer Topology version at the time of creation. * @param create Flag to create entry if it does not exist. * @param touch Flag to touch created entry (only if entry was actually created). * @return Entry or <tt>null</tt>. */ @Nullable private GridCacheEntryEx entry0(KeyCacheObject key, AffinityTopologyVersion topVer, boolean create, boolean touch) { GridCacheMapEntry cur = map.getEntry(ctx, key); if (cur == null || cur.obsolete()) { cur = map.putEntryIfObsoleteOrAbsent( ctx, topVer, key, create, touch); } return cur; }
@Override public void applyx() { // Check that no more entries left in the map. assertNull(g.cache(DEFAULT_CACHE_NAME).get(key)); if (!g.internalCache(DEFAULT_CACHE_NAME).context().deferredDelete()) assertNull(g.internalCache(DEFAULT_CACHE_NAME).map().getEntry(g.internalCache(DEFAULT_CACHE_NAME).context(), g.internalCache(DEFAULT_CACHE_NAME).context().toCacheKeyObject(key))); } });
boolean isNewLocalEntry = this.map.getEntry(ctx, key) == null;
KeyCacheObject keyCacheObj = intCache.context().toCacheKeyObject(key); GridCacheMapEntry entry = map.getEntry(intCache.context(), keyCacheObj);
/** * * @param key Entry key. */ public final void removeIfObsolete(KeyCacheObject key) { assert key != null; GridCacheMapEntry entry = map.getEntry(ctx, key); if (entry != null && entry.obsolete()) removeEntry(entry); }
/** * @param key Entry key. * @param topVer Topology version at the time of creation. * @param create Flag to create entry if it does not exist. * @param touch Flag to touch created entry (only if entry was actually created). * @return Entry or <tt>null</tt>. */ @Nullable private GridCacheEntryEx entry0(KeyCacheObject key, AffinityTopologyVersion topVer, boolean create, boolean touch) { GridCacheMapEntry cur = map.getEntry(ctx, key); if (cur == null || cur.obsolete()) { cur = map.putEntryIfObsoleteOrAbsent( ctx, topVer, key, create, touch); } return cur; }
boolean isNewLocalEntry = this.map.getEntry(ctx, key) == null;