/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> commitAsync() { return commitNearTxLocalAsync(); }
/** * @throws IgniteCheckedException If failed. */ public void commit() throws IgniteCheckedException { commitNearTxLocalAsync().get(); }
/** * @param tx Transaction to commit. * @return Commit future. */ @SuppressWarnings("unchecked") public IgniteInternalFuture<IgniteInternalTx> commitTxAsync(GridNearTxLocal tx) { GridCacheContext ctx = tx.txState().singleCacheContext(this); if (ctx == null) { tx.txState().awaitLastFuture(this); return tx.commitNearTxLocalAsync(); } else return ctx.cache().commitTxAsync(tx); }
return nonInterruptable(commitNearTxLocalAsync().chain( new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() { @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
IgniteInternalFuture<IgniteInternalTx> f = tx.commitNearTxLocalAsync();
/** * @throws Exception If failed. */ @Test public void testGridNearTxLocalDuplicateAsyncCommit() throws Exception { IgniteKernal ignite = (IgniteKernal)grid(0); IgniteInternalCache<Object, Object> utilityCache = ignite.context().cache().utilityCache(); try (GridNearTxLocal itx = MvccFeatureChecker.forcedMvcc() ? utilityCache.txStartEx(PESSIMISTIC, REPEATABLE_READ) : utilityCache.txStartEx(OPTIMISTIC, SERIALIZABLE)) { utilityCache.put("1", "1"); itx.commitNearTxLocalAsync(); itx.commitNearTxLocalAsync().get(); } }
return nonInterruptable(commitNearTxLocalAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() { @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut) throws IgniteCheckedException {
/** {@inheritDoc} */ @Override public IgniteInternalFuture<IgniteInternalTx> commitAsync() { return commitNearTxLocalAsync(); }
/** * @throws IgniteCheckedException If failed. */ public void commit() throws IgniteCheckedException { commitNearTxLocalAsync().get(); }
/** * @param tx Transaction to commit. * @return Commit future. */ @SuppressWarnings("unchecked") public IgniteInternalFuture<IgniteInternalTx> commitTxAsync(GridNearTxLocal tx) { GridCacheContext ctx = tx.txState().singleCacheContext(this); if (ctx == null) { tx.txState().awaitLastFuture(this); return tx.commitNearTxLocalAsync(); } else return ctx.cache().commitTxAsync(tx); }
return nonInterruptable(commitNearTxLocalAsync().chain( new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() { @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut)
IgniteInternalFuture<IgniteInternalTx> f = tx.commitNearTxLocalAsync();
return nonInterruptable(commitNearTxLocalAsync().chain(new CX1<IgniteInternalFuture<IgniteInternalTx>, GridCacheReturn>() { @Override public GridCacheReturn applyx(IgniteInternalFuture<IgniteInternalTx> txFut) throws IgniteCheckedException {