/** * @return {@code True} if should notify continuous query manager on updates of this entry. */ private boolean notifyContinuousQueries() { return !isNear(); }
/** {@inheritDoc} */ @Nullable @Override public MvccUpdateResult mvccLock(GridCacheMapEntry entry, MvccSnapshot mvccSnapshot) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; assert entry.lockedByCurrentThread(); return dataStore(entry.localPartition()).mvccLock(entry.context(), entry.key(), mvccSnapshot); }
/** {@inheritDoc} */ @Override public void mvccRemoveAll(GridCacheMapEntry entry) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return; dataStore(entry.localPartition()).mvccRemoveAll(entry.context(), entry.key()); }
/** {@inheritDoc} */ @Override public MvccUpdateResult mvccRemove( GridCacheMapEntry entry, MvccSnapshot mvccSnapshot, boolean primary, boolean needHistory, boolean needOldVal, @Nullable CacheEntryPredicate filter, boolean retVal) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; assert entry.lockedByCurrentThread(); return dataStore(entry.localPartition()).mvccRemove(entry.context(), entry.key(), mvccSnapshot, filter, primary, needHistory, needOldVal, retVal); }
EntryProcessor entryProc, Object[] invokeArgs) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null;
/** * @param val New value. * @param expireTime Expiration time. * @param ttl Time to live. * @param ver Update version. */ protected final void update(@Nullable CacheObject val, long expireTime, long ttl, GridCacheVersion ver, boolean addTracked) { assert ver != null; assert lock.isHeldByCurrentThread(); assert ttl != CU.TTL_ZERO && ttl != CU.TTL_NOT_CHANGED && ttl >= 0 : ttl; boolean trackNear = addTracked && isNear() && cctx.config().isEagerTtl(); long oldExpireTime = expireTimeExtras(); if (trackNear && oldExpireTime != 0 && (expireTime != oldExpireTime || isStartVersion())) cctx.ttl().removeTrackedEntry((GridNearCacheEntry)this); value(val); ttlAndExpireTimeExtras(ttl, expireTime); this.ver = ver; flags &= ~IS_EVICT_DISABLED; if (trackNear && expireTime != 0 && (expireTime != oldExpireTime || isStartVersion())) cctx.ttl().addTrackedEntry((GridNearCacheEntry)this); }
resVer = (isNear() && cctx.transactional()) ? ((GridNearCacheEntry)this).dhtVersion() : this.ver;
checkObsolete(); if (isNear()) { assert dhtVer != null;
checkObsolete(); if (isNear()) { assert dhtVer != null;
assert entry.isNear() || oldRow == null || oldRow.link() != 0 : oldRow;
/** * @param tx Transaction. * @return {@code True} if should notify continuous query manager. */ private boolean notifyContinuousQueries(@Nullable IgniteInternalTx tx) { return cctx.isLocal() || cctx.isReplicated() || (!isNear() && !(tx != null && tx.onePhaseCommit() && !tx.local())); }
/** {@inheritDoc} */ @Nullable @Override public MvccUpdateResult mvccLock(GridCacheMapEntry entry, MvccSnapshot mvccSnapshot) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; assert entry.lockedByCurrentThread(); return dataStore(entry.localPartition()).mvccLock(entry.context(), entry.key(), mvccSnapshot); }
/** {@inheritDoc} */ @Override public void mvccRemoveAll(GridCacheMapEntry entry) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return; dataStore(entry.localPartition()).mvccRemoveAll(entry.context(), entry.key()); }
/** {@inheritDoc} */ @Override public GridLongList mvccRemoveNative( boolean primary, GridCacheMapEntry entry, MvccSnapshot mvccSnapshot ) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; return dataStore(entry.localPartition()).mvccRemoveNative(entry.context(), primary, entry.key(), mvccSnapshot); }
/** {@inheritDoc} */ @Override public MvccUpdateResult mvccRemove( GridCacheMapEntry entry, MvccSnapshot mvccSnapshot, boolean primary, boolean needHistory, boolean needOldVal, @Nullable CacheEntryPredicate filter, boolean retVal) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; assert entry.lockedByCurrentThread(); return dataStore(entry.localPartition()).mvccRemove(entry.context(), entry.key(), mvccSnapshot, filter, primary, needHistory, needOldVal, retVal); }
/** {@inheritDoc} */ @Override public GridLongList mvccUpdateNative( boolean primary, GridCacheMapEntry entry, CacheObject val, GridCacheVersion ver, long expireTime, MvccSnapshot mvccSnapshot) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null; return dataStore(entry.localPartition()).mvccUpdateNative(entry.context(), primary, entry.key(), val, ver, expireTime, mvccSnapshot); }
EntryProcessor entryProc, Object[] invokeArgs) throws IgniteCheckedException { if (entry.detached() || entry.isNear()) return null;
/** * @param val New value. * @param expireTime Expiration time. * @param ttl Time to live. * @param ver Update version. */ protected final void update(@Nullable CacheObject val, long expireTime, long ttl, GridCacheVersion ver, boolean addTracked) { assert ver != null; assert lock.isHeldByCurrentThread(); assert ttl != CU.TTL_ZERO && ttl != CU.TTL_NOT_CHANGED && ttl >= 0 : ttl; boolean trackNear = addTracked && isNear() && cctx.config().isEagerTtl(); long oldExpireTime = expireTimeExtras(); if (trackNear && oldExpireTime != 0 && (expireTime != oldExpireTime || isStartVersion())) cctx.ttl().removeTrackedEntry((GridNearCacheEntry)this); value(val); ttlAndExpireTimeExtras(ttl, expireTime); this.ver = ver; flags &= ~IS_EVICT_DISABLED; if (trackNear && expireTime != 0 && (expireTime != oldExpireTime || isStartVersion())) cctx.ttl().addTrackedEntry((GridNearCacheEntry)this); }
if (!entry.isNear()) { newRow = entry.localPartition().dataStore().createRow( entry.cctx,