/** {@inheritDoc} */ @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException { while (!isCancelled()) { sleep(syncTimeout); try { flush(null, true); } catch (IgniteCheckedException e) { U.error(log, "Exception when flushing WAL.", e); } } }
@Override public void applyx() throws IgniteCheckedException { while (true) { int cnt = jobsCnt.incrementAndGet(); if (cnt > 5000) break; IgniteCallable<Boolean> job; job = new ServiceDescriptorsJob(); IgniteFuture<Boolean> fut = ignite1.compute().callAsync(job); if (cnt % LOG_MOD == 0) X.println("Submitted jobs: " + cnt); fut.listen(new CIX1<IgniteFuture<Boolean>>() { @Override public void applyx(IgniteFuture<Boolean> f) { try { assert f.get(); long cnt = resCnt.incrementAndGet(); if (cnt % LOG_MOD == 0) X.println("Results count: " + cnt); } finally { latch.countDown(); } } }); IgniteUtils.sleep(5); } } }, threads, "TEST-THREAD");
/** {@inheritDoc} */ @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException { while (!isCancelled()) { sleep(syncTimeout); try { flush(null, true); } catch (IgniteCheckedException e) { U.error(log, "Exception when flushing WAL.", e); } } }