@Override public GridNearTxPrepareResponse apply(TxDeadlock deadlock, Exception e) { if (e != null) U.warn(log, "Failed to detect deadlock.", e); else { e = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided timeout for " + "transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx)) : null); if (!ERR_UPD.compareAndSet(GridNearOptimisticTxPrepareFuture.this, null, e) && err instanceof IgniteTxTimeoutCheckedException) { err = e; } } onDone(null, e); return null; } }, cctx.tm().detectDeadlock(tx, keys)));
@Override public void apply(IgniteInternalFuture<TxDeadlock> fut) { try { TxDeadlock deadlock = fut.get(); err = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided " + "timeout for transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx.shared())) : null); } catch (IgniteCheckedException e) { err = e; U.warn(log, "Failed to detect deadlock.", e); } synchronized (LockTimeoutObject.this) { onComplete(false, true); } } });
@Override public void apply(IgniteInternalFuture<TxDeadlock> fut) { try { TxDeadlock deadlock = fut.get(); err = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided " + "timeout for transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx.shared())) : null); } catch (IgniteCheckedException e) { err = e; U.warn(log, "Failed to detect deadlock.", e); } synchronized (LockTimeoutObject.this) { onComplete(false, true); } } });
case "TransactionRollbackException": throw new TransactionRollbackException(arg); case "TransactionHeuristicException": throw new TransactionHeuristicException(arg); case "TransactionDeadlockException": throw new TransactionDeadlockException(arg); case "IgniteFutureCancelledException": throw new IgniteFutureCancelledException(arg); case "ServiceDeploymentException": throw new ServiceDeploymentException(arg,
@Override public GridNearTxPrepareResponse apply(TxDeadlock deadlock, Exception e) { if (e != null) U.warn(log, "Failed to detect deadlock.", e); else { e = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided timeout for " + "transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx)) : null); if (!ERR_UPD.compareAndSet(GridNearOptimisticTxPrepareFuture.this, null, e) && err instanceof IgniteTxTimeoutCheckedException) { err = e; } } onDone(null, e); return null; } }, cctx.tm().detectDeadlock(tx, keys)));
@Override public void apply(IgniteInternalFuture<TxDeadlock> fut) { try { TxDeadlock deadlock = fut.get(); err = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided " + "timeout for transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx.shared())) : null); } catch (IgniteCheckedException e) { err = e; U.warn(log, "Failed to detect deadlock.", e); } synchronized (LockTimeoutObject.this) { onComplete(false, true); } } });
@Override public void apply(IgniteInternalFuture<TxDeadlock> fut) { try { TxDeadlock deadlock = fut.get(); err = new IgniteTxTimeoutCheckedException("Failed to acquire lock within provided " + "timeout for transaction [timeout=" + tx.timeout() + ", tx=" + CU.txString(tx) + ']', deadlock != null ? new TransactionDeadlockException(deadlock.toString(cctx.shared())) : null); } catch (IgniteCheckedException e) { err = e; U.warn(log, "Failed to detect deadlock.", e); } synchronized (LockTimeoutObject.this) { onComplete(false, true); } } });