/** * @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); } } } }
/** {@inheritDoc} */ @Override public boolean onNodeLeft(UUID nodeId) { for (GridFuture<?> fut : futures()) if (isMini(fut)) { MiniFuture f = (MiniFuture) fut; if (f.node().id().equals(nodeId)) { // Remove previous mapping. mappings.remove(nodeId); f.onResult(new GridTopologyException("Remote node left grid (will fail): " + nodeId)); return true; } } return false; }