/** * @param nodeId Sender. * @param res Result. */ @SuppressWarnings("ForLoopReplaceableByForEach") public void onResult(UUID nodeId, GridNearTxFinishResponse res) { if (!isDone()) { FinishMiniFuture finishFut = null; synchronized (futs) { for (int i = 0; i < futs.size(); i++) { IgniteInternalFuture<IgniteInternalTx> fut = futs.get(i); if (fut.getClass() == FinishMiniFuture.class) { FinishMiniFuture f = (FinishMiniFuture) fut; if (f.futureId().equals(res.miniId())) { assert f.node().id().equals(nodeId); finishFut = f; break; } } } } if (finishFut != null) finishFut.onNearFinishResponse(res); } }
/** * @param nodeId Sender. * @param res Result. */ void onResult(UUID nodeId, GridNearTxFinishResponse<K, V> res) { if (!isDone()) for (GridFuture<GridCacheTx> fut : futures()) { if (isMini(fut)) { MiniFuture f = (MiniFuture) fut; if (f.futureId().equals(res.miniId())) { assert f.node().id().equals(nodeId); f.onResult(res); } } } }