@Override public IgniteTxKey apply(KeyCacheObject k) { return ctx.txKey(k); } }));
/** {@inheritDoc} */ @Override public IgniteTxKey txKey() { return cctx.txKey(key); }
/** {@inheritDoc} */ @Override public boolean isLockedByThread(K key) { KeyCacheObject cacheKey = ctx.toCacheKeyObject(key); return ctx.mvcc().isLockedByThread(ctx.txKey(cacheKey), Thread.currentThread().getId()); }
/** * */ private void remap() { undoLocks(false, false); for (KeyCacheObject key : GridDhtColocatedLockFuture.this.keys) cctx.mvcc().removeExplicitLock(threadId, cctx.txKey(key), lockVer); mapOnTopology(true, new Runnable() { @Override public void run() { onDone(true); } }); }
/** {@inheritDoc} */ @Override public boolean isLocked(K key) { KeyCacheObject cacheKey = ctx.toCacheKeyObject(key); return ctx.mvcc().isLockedByThread(ctx.txKey(cacheKey), -1); }
/** {@inheritDoc} */ @Nullable @Override public GridTuple<CacheObject> peek( GridCacheContext cacheCtx, boolean failFast, KeyCacheObject key ) throws GridCacheFilterFailedException { IgniteTxEntry e = entry(cacheCtx.txKey(key)); if (e != null) return e.hasPreviousValue() ? F.t(e.previousValue()) : null; return null; }
IgniteTxKey txKey = ctx.txKey(key);
IgniteTxKey txKey = ctx.txKey(cacheKey);
/** * Checks if transaction has given key enlisted. * * @param tx Transaction to check. * @param key Key to check. * @return {@code True} if key was enlisted. */ private boolean txContainsKey(Transaction tx, String key) { TransactionProxyImpl<String, Integer> proxy = (TransactionProxyImpl<String, Integer>)tx; IgniteInternalTx txEx = proxy.tx(); IgniteTxEntry entry = txEx.entry(context(0).txKey(context(0).toCacheKeyObject(key))); return entry != null; } }
/** * Check if flags in correct state. * * @param msg Message. */ private void checkSyncFlags(GridIoMessage msg) { if (!commSpiEnabled) return; Object o = msg.message(); if (!(o instanceof GridDistributedLockRequest)) return; IgniteKernal g = (IgniteKernal)G.ignite(ignite.configuration().getNodeId()); GridCacheContext<Object, Object> cacheCtx = g.internalCache(REPLICATED_ASYNC_CACHE_NAME).context(); IgniteTxManager tm = cacheCtx.tm(); GridCacheVersion v = ((GridCacheVersionable)o).version(); IgniteInternalTx t = tm.tx(v); if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x1")))) assertEquals("Invalid tx flags: " + t, FULL_ASYNC, ((IgniteTxLocalAdapter)t).syncMode()); else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x2")))) assertEquals("Invalid tx flags: " + t, FULL_SYNC, ((IgniteTxLocalAdapter)t).syncMode()); else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x3")))) assertEquals("Invalid tx flags: " + t, FULL_ASYNC, ((IgniteTxLocalAdapter)t).syncMode()); else if (t.hasWriteKey(cacheCtx.txKey(cacheCtx.toCacheKeyObject("x4")))) assertEquals("Invalid tx flags: " + t, FULL_SYNC, ((IgniteTxLocalAdapter)t).syncMode()); } }
IgniteTxEntry writeEntry = tx.entry(ctx.txKey(e.key()));
IgniteTxKey txKey = cacheCtx.txKey(cacheKey);
IgniteTxKey txKey = cacheCtx.txKey(key);
msg.addKey(cctx.txKey(key));
continue; IgniteTxKey txKey = ctx.txKey(key);
boolean pass = res.filterResult(i); tx.entry(cctx.txKey(k)).filters(pass ? CU.empty0() : CU.alwaysFalse0Arr());
) throws IgniteCheckedException { for (KeyCacheObject k : keys) { IgniteTxEntry txEntry = entry(cacheCtx.txKey(k));