/** * Checks if this transaction needs previous value for the given tx entry. Will use passed in map to store * required key or will create new map if passed in map is {@code null}. * * @param e TX entry. * @param map Map with needed preload keys. * @return Map if it was created. */ private Map<Integer, Collection<KeyCacheObject>> checkNeedRebalanceKeys( IgniteTxEntry e, Map<Integer, Collection<KeyCacheObject>> map ) { if (retVal || !F.isEmpty(e.entryProcessors()) || !F.isEmpty(e.filters()) || e.entryReadVersion() != null) { if (map == null) map = new HashMap<>(); Collection<KeyCacheObject> keys = map.get(e.cacheId()); if (keys == null) { keys = new ArrayList<>(); map.put(e.cacheId(), keys); } keys.add(e.key()); } return map; }
prepareObject(e.value().value(cctx.cacheObjectContext(), false), ctx); if (e.entryProcessors() != null) { for (T2<EntryProcessor<Object, Object, Object>, Object[]> entProc : e.entryProcessors()) prepareObject(entProc.get1(), ctx); else if (p2pEnabled && e.entryProcessors() != null) { if (!forceAddDepInfo) forceAddDepInfo = true; for (T2<EntryProcessor<Object, Object, Object>, Object[]> entProc : e.entryProcessors()) prepareObject(entProc.get1(), ctx);
keepBinary); txEntry.entryProcessors(entryProcessors);
(!F.isEmpty(txEntry.entryProcessors()) && cctx.gridEvents().isRecordable(EVT_CACHE_OBJECT_READ)) ? F.first(txEntry.entryProcessors()) : null; if (!F.isEmpty(txEntry.entryProcessors())) val = txEntry.applyEntryProcessors(val);
Object keyVal = null; for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : entryProcessors()) { IgniteThread.onEntryProcessorEntered(true);
if (intercept || !F.isEmpty(e.entryProcessors())) e.cached().unswap(false);
boolean metrics, @Nullable GridCacheReturn ret) throws GridCacheEntryRemovedException, IgniteCheckedException { assert txEntry.op() != TRANSFORM || !F.isEmpty(txEntry.entryProcessors()) : txEntry; return F.t(cacheCtx.writeThrough() ? RELOAD : DELETE, null); if (F.isEmpty(txEntry.entryProcessors())) { if (ret != null) ret.value(cacheCtx, txEntry.value(), txEntry.keepBinary()); /*closure name */recordEvt ? F.first(txEntry.entryProcessors()).get1() : null, resolveTaskName(), null, for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : txEntry.entryProcessors()) { CacheInvokeEntry<Object, Object> invokeEntry = new CacheInvokeEntry<>( txEntry.key(), key, cacheVal, val, ver, keepBinary, txEntry.cached());
txEntry.readValue(cacheVal); if (!F.isEmpty(txEntry.entryProcessors())) visibleVal = txEntry.applyEntryProcessors(visibleVal);
if (!F.isEmpty(txEntry.entryProcessors())) val = txEntry.applyEntryProcessors(val); (txEntry.op() == TRANSFORM && cctx.gridEvents().isRecordable(EVT_CACHE_OBJECT_READ)) ? F.first(txEntry.entryProcessors()) : null; txEntry.readValue(val); if (!F.isEmpty(txEntry.entryProcessors())) val = txEntry.applyEntryProcessors(val);
existing.entryProcessors(e.entryProcessors()); existing.ttl(e.ttl()); existing.filters(e.filters());
Object res = null; for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : txEntry.entryProcessors()) { CacheInvokeEntry<Object, Object> invokeEntry = new CacheInvokeEntry<>(txEntry.key(), key0, cacheVal, val0, ver, txEntry.keepBinary(), txEntry.cached());
entryProc = F.first(txEntry.entryProcessors()).get1(); if (!F.isEmpty(txEntry.entryProcessors())) { invoke = true; for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : txEntry.entryProcessors()) { CacheInvokeEntry<Object, Object> invokeEntry = new CacheInvokeEntry<>(key, val, txEntry.cached().version(), keepBinary, txEntry.cached());
nearCached = cacheCtx.dht().near().peekExx(txEntry.key()); if (!F.isEmpty(txEntry.entryProcessors())) txEntry.cached().unswap(false);
if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters())) txEntry.cached().unswap(false); txEntry.entryProcessors(null); txEntry.conflictVersion(explicitVer);
/** * Checks if this transaction needs previous value for the given tx entry. Will use passed in map to store * required key or will create new map if passed in map is {@code null}. * * @param e TX entry. * @param map Map with needed preload keys. * @return Map if it was created. */ private Map<Integer, Collection<KeyCacheObject>> checkNeedRebalanceKeys( IgniteTxEntry e, Map<Integer, Collection<KeyCacheObject>> map ) { if (retVal || !F.isEmpty(e.entryProcessors()) || !F.isEmpty(e.filters()) || e.entryReadVersion() != null) { if (map == null) map = new HashMap<>(); Collection<KeyCacheObject> keys = map.get(e.cacheId()); if (keys == null) { keys = new ArrayList<>(); map.put(e.cacheId(), keys); } keys.add(e.key()); } return map; }
prepareObject(e.value().value(cctx.cacheObjectContext(), false), ctx); if (e.entryProcessors() != null) { for (T2<EntryProcessor<Object, Object, Object>, Object[]> entProc : e.entryProcessors()) prepareObject(entProc.get1(), ctx); else if (p2pEnabled && e.entryProcessors() != null) { if (!forceAddDepInfo) forceAddDepInfo = true; for (T2<EntryProcessor<Object, Object, Object>, Object[]> entProc : e.entryProcessors()) prepareObject(entProc.get1(), ctx);
keepBinary); txEntry.entryProcessors(entryProcessors);
Object keyVal = null; for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : entryProcessors()) { IgniteThread.onEntryProcessorEntered(true);
existing.entryProcessors(e.entryProcessors()); existing.ttl(e.ttl()); existing.filters(e.filters());
Object res = null; for (T2<EntryProcessor<Object, Object, Object>, Object[]> t : txEntry.entryProcessors()) { CacheInvokeEntry<Object, Object> invokeEntry = new CacheInvokeEntry<>(txEntry.key(), key0, cacheVal, val0, ver, txEntry.keepBinary(), txEntry.cached());