GridCompoundIdentityFuture<Object> cf = new GridCompoundIdentityFuture<>(); fut.onEvent(evtType, cntr != null ? cntr.get() : 0); cf.add(fut); cf.markInitialized(); cf.get(WAIT_TIMEOUT);
/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable T res, @Nullable Throwable err, boolean cancel) { if(super.onDone(res, err, cancel)){ endTime = U.currentTimeMillis(); return true; } return false; } }
res0.add(task); res0.markInitialized(); res0.listen(future -> { VacuumMetrics metrics = null; Throwable ex = null;
res0.add(task); res0.markInitialized(); res0.listen(future -> { VacuumMetrics metrics = null; Throwable ex = null;
/** * Runs vacuum on all nodes and waits for its completion. * * @throws IgniteCheckedException If failed. */ private void runVacuumSync() throws IgniteCheckedException { GridCompoundIdentityFuture<VacuumMetrics> fut = new GridCompoundIdentityFuture<>(); // Run vacuum manually. for (Ignite node : G.allGrids()) { if (!node.configuration().isClientMode()) { MvccProcessorImpl crd = mvccProcessor(node); if (!crd.mvccEnabled() || GridTestUtils.getFieldValue(crd, "vacuumWorkers") == null) continue; assert GridTestUtils.getFieldValue(crd, "txLog") != null; fut.add(crd.runVacuum()); } } fut.markInitialized(); // Wait vacuum finished. fut.get(getTestTimeout()); }
/** {@inheritDoc} */ @Override public boolean onDone(Collection<GridCacheEntryInfo> res, Throwable err) { if (super.onDone(res, err)) { // Release all partitions reserved by this future. if (parts != null) cctx.topology().releasePartitions(parts); return true; } return false; }
/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable T res, @Nullable Throwable err, boolean cancel) { if(super.onDone(res, err, cancel)){ endTime = U.currentTimeMillis(); return true; } return false; } }
/** {@inheritDoc} */ @Override public boolean onDone(Collection<GridCacheEntryInfo> res, Throwable err) { if (super.onDone(res, err)) { // Release all partitions reserved by this future. if (parts != null) cctx.topology().releasePartitions(parts); return true; } return false; }