/** * @param topVer Topology version. * @param key Entry key. * @return Entry (never {@code null}). */ public GridCacheEntryEx entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) { GridCacheEntryEx e = map.putEntryIfObsoleteOrAbsent(ctx, topVer, key, true, false); assert e != null; return e; }
/** * @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; }
/** * @param topVer Topology version. * @param key Entry key. * @return Entry (never {@code null}). */ public GridCacheEntryEx entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) { GridCacheEntryEx e = map.putEntryIfObsoleteOrAbsent(ctx, topVer, key, true, false); assert e != null; return e; }
/** * @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; }