/** {@inheritDoc} */ @Override public boolean isRollbackOnly() { return tx.isRollbackOnly(); }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { IgniteTxRemoteEx remote = (IgniteTxRemoteEx)tx; if (tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED) return new GridFinishedFuture<>(); if (tx.state() == TransactionState.PREPARED) remote.doneRemote(tx.xidVersion(), Collections.<GridCacheVersion>emptyList(), Collections.<GridCacheVersion>emptyList(), Collections.<GridCacheVersion>emptyList()); return tx.rollbackAsync(); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { return tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED ? new GridFinishedFuture<>() : ((GridDhtTxLocal)tx).rollbackDhtLocalAsync(); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { return tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED ? new GridFinishedFuture<>() : ((GridNearTxLocal)tx).rollbackNearTxLocalAsync(false, false); } }
/** * @param tx Transaction. * @return String view of all safe-to-print transaction properties. */ public static String txString(@Nullable IgniteInternalTx tx) { if (tx == null) return "null"; return tx.getClass().getSimpleName() + "[xid=" + tx.xid() + ", xidVersion=" + tx.xidVersion() + ", concurrency=" + tx.concurrency() + ", isolation=" + tx.isolation() + ", state=" + tx.state() + ", invalidate=" + tx.isInvalidate() + ", rollbackOnly=" + tx.isRollbackOnly() + ", nodeId=" + tx.nodeId() + ", timeout=" + tx.timeout() + ", duration=" + (U.currentTimeMillis() - tx.startTime()) + (tx instanceof GridNearTxLocal ? ", label=" + ((GridNearTxLocal)tx).label() : "") + ']'; }
/** * Transaction start callback (has to do with when any operation was * performed on this transaction). * * @param tx Started transaction. * @return {@code True} if transaction is not in completed set. */ public boolean onStarted(IgniteInternalTx tx) { assert tx.state() == ACTIVE || tx.isRollbackOnly() : "Invalid transaction state [locId=" + cctx.localNodeId() + ", tx=" + tx + ']'; if (isCompleted(tx)) { ConcurrentMap<GridCacheVersion, IgniteInternalTx> txIdMap = transactionMap(tx); txIdMap.remove(tx.xidVersion(), tx); if (log.isDebugEnabled()) log.debug("Attempt to start a completed transaction (will ignore): " + tx); return false; } if (log.isDebugEnabled()) log.debug("Transaction started: " + tx); return true; }
/** {@inheritDoc} */ @Override public boolean isRollbackOnly() { return tx.isRollbackOnly(); }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { IgniteTxRemoteEx remote = (IgniteTxRemoteEx)tx; if (tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED) return new GridFinishedFuture<>(); if (tx.state() == TransactionState.PREPARED) remote.doneRemote(tx.xidVersion(), Collections.<GridCacheVersion>emptyList(), Collections.<GridCacheVersion>emptyList(), Collections.<GridCacheVersion>emptyList()); return tx.rollbackAsync(); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { return tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED ? new GridFinishedFuture<>() : ((GridDhtTxLocal)tx).rollbackDhtLocalAsync(); } }
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> apply(IgniteInternalTx tx, IgniteTxManager tm) { return tx.isRollbackOnly() || tx.state() == COMMITTING || tx.state() == COMMITTED ? new GridFinishedFuture<>() : ((GridNearTxLocal)tx).rollbackNearTxLocalAsync(false, false); } }
/** * @param tx Transaction. * @return String view of all safe-to-print transaction properties. */ public static String txString(@Nullable IgniteInternalTx tx) { if (tx == null) return "null"; return tx.getClass().getSimpleName() + "[xid=" + tx.xid() + ", xidVersion=" + tx.xidVersion() + ", concurrency=" + tx.concurrency() + ", isolation=" + tx.isolation() + ", state=" + tx.state() + ", invalidate=" + tx.isInvalidate() + ", rollbackOnly=" + tx.isRollbackOnly() + ", nodeId=" + tx.nodeId() + ", timeout=" + tx.timeout() + ", duration=" + (U.currentTimeMillis() - tx.startTime()) + (tx instanceof GridNearTxLocal ? ", label=" + ((GridNearTxLocal)tx).label() : "") + ']'; }
/** * Transaction start callback (has to do with when any operation was * performed on this transaction). * * @param tx Started transaction. * @return {@code True} if transaction is not in completed set. */ public boolean onStarted(IgniteInternalTx tx) { assert tx.state() == ACTIVE || tx.isRollbackOnly() : "Invalid transaction state [locId=" + cctx.localNodeId() + ", tx=" + tx + ']'; if (isCompleted(tx)) { ConcurrentMap<GridCacheVersion, IgniteInternalTx> txIdMap = transactionMap(tx); txIdMap.remove(tx.xidVersion(), tx); if (log.isDebugEnabled()) log.debug("Attempt to start a completed transaction (will ignore): " + tx); return false; } if (log.isDebugEnabled()) log.debug("Transaction started: " + tx); return true; }