/** * @param cacheCtx Cache context. * @param retval Return value flag. * @param mvccOp SQL operation flag. * @throws IgniteCheckedException If failed. */ private void beforeRemove(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException { assert !mvccOp || cacheCtx.mvccEnabled(); checkUpdatesAllowed(cacheCtx); cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE); if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp)) throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG); if (retval) needReturnValue(true); checkValid(); }
/** * @param cacheCtx Cache context. * @param retval Return value flag. * @param mvccOp SQL operation flag. * @throws IgniteCheckedException If failed. */ private void beforePut(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException { assert !mvccOp || cacheCtx.mvccEnabled(); checkUpdatesAllowed(cacheCtx); cacheCtx.checkSecurity(SecurityPermission.CACHE_PUT); if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp)) throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG); if (retval) needReturnValue(true); checkValid(); init(); }
/** * */ private void ackBackup() { if (mappings.empty()) return; if (!tx.needReturnValue() || !tx.implicit()) return; // GridCacheReturn was not saved at backup. GridDistributedTxMapping mapping = mappings.singleMapping(); if (mapping != null) { UUID nodeId = mapping.primary().id(); Collection<UUID> backups = tx.transactionNodes().get(nodeId); if (!F.isEmpty(backups)) { assert backups.size() == 1 : backups; UUID backupId = F.first(backups); ClusterNode backup = cctx.discovery().node(backupId); // Nothing to do if backup has left the grid. if (backup == null) { // No-op. } else if (backup.isLocal()) cctx.tm().removeTxReturn(tx.xidVersion()); else cctx.tm().sendDeferredAckResponse(backupId, tx.xidVersion()); } } }
0, tx.activeCachesDeploymentEnabled(), !waitRemoteTxs && (tx.needReturnValue() && tx.implicit()), waitRemoteTxs, null,
m.last(), tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),
true, tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),
Collections.<IgniteTxKey, GridCacheVersion>emptyMap(), req.last(), needReturnValue() && implicit());
if (tx.needReturnValue() && tx.implicit()) { GridCacheReturnCompletableWrapper wrapper = cctx.tm().getCommittedTxReturn(tx.xidVersion());
m.last(), tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),
/** * @param cacheCtx Cache context. * @param retval Return value flag. * @param mvccOp SQL operation flag. * @throws IgniteCheckedException If failed. */ private void beforeRemove(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException { assert !mvccOp || cacheCtx.mvccEnabled(); checkUpdatesAllowed(cacheCtx); cacheCtx.checkSecurity(SecurityPermission.CACHE_REMOVE); if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp)) throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG); if (retval) needReturnValue(true); checkValid(); }
/** * @param cacheCtx Cache context. * @param retval Return value flag. * @param mvccOp SQL operation flag. * @throws IgniteCheckedException If failed. */ private void beforePut(GridCacheContext cacheCtx, boolean retval, boolean mvccOp) throws IgniteCheckedException { assert !mvccOp || cacheCtx.mvccEnabled(); checkUpdatesAllowed(cacheCtx); cacheCtx.checkSecurity(SecurityPermission.CACHE_PUT); if (cacheCtx.mvccEnabled() && !isOperationAllowed(mvccOp)) throw new IgniteCheckedException(TX_TYPE_MISMATCH_ERR_MSG); if (retval) needReturnValue(true); checkValid(); init(); }
/** * */ private void ackBackup() { if (mappings.empty()) return; if (!tx.needReturnValue() || !tx.implicit()) return; // GridCacheReturn was not saved at backup. GridDistributedTxMapping mapping = mappings.singleMapping(); if (mapping != null) { UUID nodeId = mapping.primary().id(); Collection<UUID> backups = tx.transactionNodes().get(nodeId); if (!F.isEmpty(backups)) { assert backups.size() == 1 : backups; UUID backupId = F.first(backups); ClusterNode backup = cctx.discovery().node(backupId); // Nothing to do if backup has left the grid. if (backup == null) { // No-op. } else if (backup.isLocal()) cctx.tm().removeTxReturn(tx.xidVersion()); else cctx.tm().sendDeferredAckResponse(backupId, tx.xidVersion()); } } }
m.last(), tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),
0, tx.activeCachesDeploymentEnabled(), !waitRemoteTxs && (tx.needReturnValue() && tx.implicit()), waitRemoteTxs, null,
true, tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),
Collections.<IgniteTxKey, GridCacheVersion>emptyMap(), req.last(), needReturnValue() && implicit());
if (tx.needReturnValue() && tx.implicit()) { GridCacheReturnCompletableWrapper wrapper = cctx.tm().getCommittedTxReturn(tx.xidVersion());
m.last(), tx.onePhaseCommit(), tx.needReturnValue() && tx.implicit(), tx.implicitSingle(), m.explicitLock(),