/** {@inheritDoc} */ @Override protected void cancelQuery() throws IgniteCheckedException { if (fut != null) fut.cancel(); }
/** {@inheritDoc} */ @Override public boolean cancel() throws IgniteCheckedException { return embedded.cancel(); }
/** {@inheritDoc} */ @Override public boolean cancel() throws IgniteCheckedException { return fut.cancel(); }
/** {@inheritDoc} */ @Override public boolean cancel() throws IgniteCheckedException { return fut.cancel(); }
/** {@inheritDoc} */ @Override public boolean cancel(boolean mayInterruptIfRunning) { try { fut.cancel(); } catch (IgniteCheckedException e) { U.error(log, "Failed to cancel task: " + fut, e); } return true; }
/** {@inheritDoc} */ @Override public boolean cancel() throws IgniteException { try { return fut.cancel(); } catch (IgniteCheckedException e) { throw convertException(e); } }
/** * Cancels given future. * * @param fut Future to cancel. */ private void cancelFuture(IgniteInternalFuture<?> fut) { try { fut.cancel(); } catch (IgniteCheckedException e) { U.error(log, "Failed to cancel task: " + fut, e); } }
/** {@inheritDoc} */ @Override public List<Runnable> shutdownNow() { List<IgniteInternalFuture<?>> cpFuts; // Cancel all tasks. synchronized (mux) { cpFuts = new ArrayList<>(futs); isBeingShutdown = true; } for (IgniteInternalFuture<?> task : cpFuts) { try { task.cancel(); } catch (IgniteCheckedException e) { U.error(log, "Failed to cancel task: " + task, e); } } return Collections.emptyList(); }
/** {@inheritDoc} */ @Override public boolean cancel() throws IgniteCheckedException { if (onCancelled()) { for (IgniteInternalFuture<T> fut : futures()) fut.cancel(); return true; } return false; }
/** * Adds a future to this compound future. * * @param fut Future to add. */ public final void add(IgniteInternalFuture<T> fut) { assert fut != null; synchronized (this) { if (futs == null) futs = fut; else if (futs instanceof IgniteInternalFuture) { Collection<IgniteInternalFuture> futs0 = new ArrayList<>(4); futs0.add((IgniteInternalFuture)futs); futs0.add(fut); futs = futs0; } else ((Collection<IgniteInternalFuture>)futs).add(fut); } fut.listen(this); if (isCancelled()) { try { fut.cancel(); } catch (IgniteCheckedException e) { onDone(e); } } }
if (!fut.cancel()) { if (fut.isDone()) { Boolean res = fut.get();
fut.cancel();
curFut.cancel(); // Force cancellation.
/** * Interrupt the operation started in {@link BackgroundOperation#start()} method and join interrupted thread. */ void stop() throws Exception { if (fut == null) return; try { fut.get(stopTimeout()); } catch (IgniteFutureTimeoutCheckedException e) { fut.cancel(); fut.get(); } finally { fut = null; } } }
@Override public boolean cancel() throws IgniteCheckedException { super.cancel(); if (isDone()) return false; runFut.cancel(); threadFactory.interruptAllThreads(); return onCancelled(); } };
fut.cancel();
/** * @param fut Future to cancel. * @throws Exception If failed. */ private void testMessageSet(IgniteInternalFuture<?> fut) throws Exception { cancelLatch.await(); assertTrue(fut.cancel()); resLatch.countDown(); assertTrue(U.await(finishLatch, 5000, MILLISECONDS)); Map map = U.field(((IgniteKernal)grid(0)).context().io(), "msgSetMap"); info("Map: " + map); assertTrue(map.isEmpty()); }
fut.cancel();
acquireWriteLock.cancel();
fut.cancel();