/** * @param tx Transaction. * @param syncMode Expected write synchronization mode. */ private void checkSyncMode(Transaction tx, CacheWriteSynchronizationMode syncMode) { assertEquals(syncMode, ((TransactionProxyImpl)tx).tx().syncMode()); }
/** * @param ctx Grid kernal context. * @param cctx Cache context. * @param timeout Transaction timeout. * @return Newly started SQL transaction. */ private static GridNearTxLocal txStart(GridKernalContext ctx, @Nullable GridCacheContext cctx, long timeout) { if (timeout == 0) { TransactionConfiguration tcfg = CU.transactionConfiguration(cctx, ctx.config()); if (tcfg != null) timeout = tcfg.getDefaultTxTimeout(); } GridNearTxLocal tx = ctx.cache().context().tm().newTx( false, false, cctx != null && cctx.systemTx() ? cctx : null, PESSIMISTIC, REPEATABLE_READ, timeout, cctx == null || !cctx.skipStore(), true, 0, null ); tx.syncMode(FULL_SYNC); return tx; }
/** * @param cctx Context. * @param tx Transaction. * @param commit Commit flag. */ public GridNearTxFinishFuture(GridCacheSharedContext<K, V> cctx, GridNearTxLocal tx, boolean commit) { super(F.<IgniteInternalTx>identityReducer(tx)); this.cctx = cctx; this.tx = tx; this.commit = commit; ignoreInterrupts(); mappings = tx.mappings(); futId = IgniteUuid.randomUuid(); if (tx.explicitLock()) tx.syncMode(FULL_SYNC); if (log == null) { msgLog = cctx.txFinishMessageLogger(); log = U.logger(cctx.kernalContext(), logRef, GridNearTxFinishFuture.class); } }
tx.ioPolicy(), false, tx.syncMode(), null, null,
mappedKeys.size(), inTx() ? tx.size() : mappedKeys.size(), inTx() && tx.syncMode() == FULL_SYNC, inTx() ? tx.subjectId() : null, inTx() ? tx.taskNameHash() : 0,
mappedKeys.size(), inTx() ? tx.size() : mappedKeys.size(), inTx() && tx.syncMode() == FULL_SYNC, inTx() ? tx.subjectId() : null, inTx() ? tx.taskNameHash() : 0,
if (tx.syncMode() == FULL_SYNC) { GridCacheVersion nearXidVer = tx.nearXidVersion();
CacheWriteSynchronizationMode syncMode = tx.syncMode();
/** * @param ctx Grid kernal context. * @param cctx Cache context. * @param timeout Transaction timeout. * @return Newly started SQL transaction. */ private static GridNearTxLocal txStart(GridKernalContext ctx, @Nullable GridCacheContext cctx, long timeout) { if (timeout == 0) { TransactionConfiguration tcfg = CU.transactionConfiguration(cctx, ctx.config()); if (tcfg != null) timeout = tcfg.getDefaultTxTimeout(); } GridNearTxLocal tx = ctx.cache().context().tm().newTx( false, false, cctx != null && cctx.systemTx() ? cctx : null, PESSIMISTIC, REPEATABLE_READ, timeout, cctx == null || !cctx.skipStore(), true, 0, null ); tx.syncMode(FULL_SYNC); return tx; }
/** * @param cctx Context. * @param tx Transaction. * @param commit Commit flag. */ public GridNearTxFinishFuture(GridCacheSharedContext<K, V> cctx, GridNearTxLocal tx, boolean commit) { super(F.<IgniteInternalTx>identityReducer(tx)); this.cctx = cctx; this.tx = tx; this.commit = commit; ignoreInterrupts(); mappings = tx.mappings(); futId = IgniteUuid.randomUuid(); if (tx.explicitLock()) tx.syncMode(FULL_SYNC); if (log == null) { msgLog = cctx.txFinishMessageLogger(); log = U.logger(cctx.kernalContext(), logRef, GridNearTxFinishFuture.class); } }
mappedKeys.size(), inTx() ? tx.size() : mappedKeys.size(), inTx() && tx.syncMode() == FULL_SYNC, inTx() ? tx.subjectId() : null, inTx() ? tx.taskNameHash() : 0,
tx.ioPolicy(), false, tx.syncMode(), null, null,
mappedKeys.size(), inTx() ? tx.size() : mappedKeys.size(), inTx() && tx.syncMode() == FULL_SYNC, inTx() ? tx.subjectId() : null, inTx() ? tx.taskNameHash() : 0,
if (tx.syncMode() == FULL_SYNC) { GridCacheVersion nearXidVer = tx.nearXidVersion();
CacheWriteSynchronizationMode syncMode = tx.syncMode();