/** * Initializes this future. */ public void init() { if (remainingTxs == null) { remainingTxs = Collections.emptySet(); onDone(true); } else { assert !remainingTxs.isEmpty(); for (final IgniteInternalTx tx : remainingTxs) { if (!tx.done()) { tx.finishFuture().listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>() { @Override public void apply(IgniteInternalFuture<IgniteInternalTx> t) { remainingTxs.remove(tx); checkRemaining(); } }); } else remainingTxs.remove(tx); } checkRemaining(); } }
log.debug("Found near transaction, will wait for completion: " + tx); tx.finishFuture().listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>() { @Override public void apply(IgniteInternalFuture<IgniteInternalTx> fut) { TransactionState state = tx.state();
res.add(tx.finishFuture());
/** * @param nearVer Near version. * @return Finish future for related remote transactions. */ @SuppressWarnings("unchecked") public IgniteInternalFuture<?> remoteTxFinishFuture(GridCacheVersion nearVer) { GridCompoundFuture<Void, Void> fut = new GridCompoundFuture<>(); for (final IgniteInternalTx tx : activeTransactions()) { if (!tx.local() && nearVer.equals(tx.nearXidVersion())) fut.add((IgniteInternalFuture) tx.finishFuture()); } fut.markInitialized(); return fut; }
allTxFinFut.add(tx.finishFuture());
}, "--tx", "--kill"); tx0.finishFuture().get();
/** * Initializes this future. */ public void init() { if (remainingTxs == null) { remainingTxs = Collections.emptySet(); onDone(true); } else { assert !remainingTxs.isEmpty(); for (final IgniteInternalTx tx : remainingTxs) { if (!tx.done()) { tx.finishFuture().listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>() { @Override public void apply(IgniteInternalFuture<IgniteInternalTx> t) { remainingTxs.remove(tx); checkRemaining(); } }); } else remainingTxs.remove(tx); } checkRemaining(); } }
res.add(tx.finishFuture());
/** * @param nearVer Near version. * @return Finish future for related remote transactions. */ @SuppressWarnings("unchecked") public IgniteInternalFuture<?> remoteTxFinishFuture(GridCacheVersion nearVer) { GridCompoundFuture<Void, Void> fut = new GridCompoundFuture<>(); for (final IgniteInternalTx tx : activeTransactions()) { if (!tx.local() && nearVer.equals(tx.nearXidVersion())) fut.add((IgniteInternalFuture) tx.finishFuture()); } fut.markInitialized(); return fut; }
log.debug("Found near transaction, will wait for completion: " + tx); tx.finishFuture().listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>() { @Override public void apply(IgniteInternalFuture<IgniteInternalTx> fut) { TransactionState state = tx.state();
allTxFinFut.add(tx.finishFuture());