/** * Suspends transaction. It could be resume later. Supported only for optimistic transactions. * * @param tx Transaction to suspend. * @throws IgniteCheckedException If suspension failed. */ public void suspendTx(GridNearTxLocal tx) throws IgniteCheckedException { tx.txState().awaitLastFuture(this); tx.suspend(); }
/** {@inheritDoc} */ @Override public void end(Xid xid, int flags) throws XAException { assert this.xid.equals(xid); if (log.isDebugEnabled()) log.debug("XA resource end(...) [xid=" + xid + ", flags=<" + flags(flags) + ">]"); if ((flags & TMFAIL) > 0) cacheTx.setRollbackOnly(); else if ((flags & TMSUSPEND) == TMSUSPEND) { try { cacheTx.suspend(); } catch (IgniteCheckedException e) { throwException("Failed to suspend cache transaction: " + e.getMessage(), e); } } }
/** * Suspends transaction. It could be resume later. Supported only for optimistic transactions. * * @param tx Transaction to suspend. * @throws IgniteCheckedException If suspension failed. */ public void suspendTx(GridNearTxLocal tx) throws IgniteCheckedException { tx.txState().awaitLastFuture(this); tx.suspend(); }
/** {@inheritDoc} */ @Override public void end(Xid xid, int flags) throws XAException { assert this.xid.equals(xid); if (log.isDebugEnabled()) log.debug("XA resource end(...) [xid=" + xid + ", flags=<" + flags(flags) + ">]"); if ((flags & TMFAIL) > 0) cacheTx.setRollbackOnly(); else if ((flags & TMSUSPEND) == TMSUSPEND) { try { cacheTx.suspend(); } catch (IgniteCheckedException e) { throwException("Failed to suspend cache transaction: " + e.getMessage(), e); } } }