/** {@inheritDoc} */ @Override public IgniteFuture<Void> commitAsync() throws IgniteException { enter(); try { return (IgniteFuture<Void>)createFuture(cctx.commitTxAsync(tx)); } finally { leave(); } }
/** {@inheritDoc} */ @Override public void commit(Xid xid, boolean onePhase) throws XAException { assert this.xid.equals(xid); if (log.isDebugEnabled()) log.debug("XA resource commit(...) [xid=" + xid + ", onePhase=" + onePhase + "]"); try { ctx.cache().context().commitTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throwException("Failed to commit cache transaction: " + e.getMessage(), e); } }
/** {@inheritDoc} */ @Override public void commit() { enter(); try { IgniteInternalFuture<IgniteInternalTx> commitFut = cctx.commitTxAsync(tx); if (async) saveFuture(commitFut); else commitFut.get(); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { leave(); } }
/** {@inheritDoc} */ @Override public void afterCompletion(int status) { switch (status) { case Status.STATUS_COMMITTED: if (log.isDebugEnabled()) log.debug("Synchronization.afterCompletion(STATUS_COMMITTED) [xid=" + cacheTx.xid() + "]"); try { ctx.cache().context().commitTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throw new CacheException("Failed to commit cache transaction.", e); } break; case Status.STATUS_ROLLEDBACK: if (log.isDebugEnabled()) log.debug("Synchronization.afterCompletion(STATUS_ROLLEDBACK) [xid=" + cacheTx.xid() + "]"); try { ctx.cache().context().rollbackTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throw new CacheException("Failed to rollback cache transaction.", e); } break; default: throw new IllegalArgumentException("Unknown transaction status: " + status); } }
/** {@inheritDoc} */ @Override public IgniteFuture<Void> commitAsync() throws IgniteException { enter(); try { return (IgniteFuture<Void>)createFuture(cctx.commitTxAsync(tx)); } finally { leave(); } }
/** {@inheritDoc} */ @Override public void commit(Xid xid, boolean onePhase) throws XAException { assert this.xid.equals(xid); if (log.isDebugEnabled()) log.debug("XA resource commit(...) [xid=" + xid + ", onePhase=" + onePhase + "]"); try { ctx.cache().context().commitTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throwException("Failed to commit cache transaction: " + e.getMessage(), e); } }
/** {@inheritDoc} */ @Override public void commit() { enter(); try { IgniteInternalFuture<IgniteInternalTx> commitFut = cctx.commitTxAsync(tx); if (async) saveFuture(commitFut); else commitFut.get(); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { leave(); } }
/** {@inheritDoc} */ @Override public void afterCompletion(int status) { switch (status) { case Status.STATUS_COMMITTED: if (log.isDebugEnabled()) log.debug("Synchronization.afterCompletion(STATUS_COMMITTED) [xid=" + cacheTx.xid() + "]"); try { ctx.cache().context().commitTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throw new CacheException("Failed to commit cache transaction.", e); } break; case Status.STATUS_ROLLEDBACK: if (log.isDebugEnabled()) log.debug("Synchronization.afterCompletion(STATUS_ROLLEDBACK) [xid=" + cacheTx.xid() + "]"); try { ctx.cache().context().rollbackTxAsync(cacheTx).get(); } catch (IgniteCheckedException e) { throw new CacheException("Failed to rollback cache transaction.", e); } break; default: throw new IllegalArgumentException("Unknown transaction status: " + status); } }