/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable Object res, @Nullable Throwable err, boolean cancel) { if (err == null && this.err != null) err = new IgniteCheckedException(this.err); return super.onDone(res, err, cancel); }
/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable R res, @Nullable Throwable err, boolean cancel) { if(super.onDone(res, err, cancel)){ endTime = U.currentTimeMillis(); return true; } return false; } }
/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Collection<K> res, @Nullable Throwable err) { if (super.onDone(res, err)) { if (trackable) cctx.dht().removeFuture(this); return true; } return false; }
/** * */ void waitPreviousReconnect() { if (curReconnectFut != null && !curReconnectFut.isDone()) { assert reconnectDone != null; curReconnectFut.onDone(STOP_RECONNECT); try { reconnectDone.get(); } catch (IgniteCheckedException ignote) { // No-op. } } }
/** * 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); } } }
/** * Check completeness of the future. */ private void checkComplete() { if (initialized() && !isDone() && lsnrCalls == futuresCount()) { try { onDone(rdc != null ? rdc.reduce() : null); } catch (RuntimeException e) { logError(logger(), "Failed to execute compound future reducer: " + this, e); onDone(e); } catch (AssertionError e) { logError(logger(), "Failed to execute compound future reducer: " + this, e); onDone(e); throw e; } } }
res.onDone(e);
/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable Object res, @Nullable Throwable err, boolean cancel) { if (err == null && this.err != null) err = new IgniteCheckedException(this.err); return super.onDone(res, err, cancel); }
/** {@inheritDoc} */ @Override protected boolean onDone(@Nullable R res, @Nullable Throwable err, boolean cancel) { if(super.onDone(res, err, cancel)){ endTime = U.currentTimeMillis(); return true; } return false; } }
/** {@inheritDoc} */ @Override public boolean onDone(@Nullable Collection<K> res, @Nullable Throwable err) { if (super.onDone(res, err)) { if (trackable) cctx.dht().removeFuture(this); return true; } return false; }
/** * */ void waitPreviousReconnect() { if (curReconnectFut != null && !curReconnectFut.isDone()) { assert reconnectDone != null; curReconnectFut.onDone(STOP_RECONNECT); try { reconnectDone.get(); } catch (IgniteCheckedException ignote) { // No-op. } } }
/** * Adds a future to this compound future. * * @param fut Future to add. */ @SuppressWarnings("unchecked") 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); } } }
/** * Check completeness of the future. */ private void checkComplete() { if (initialized() && !isDone() && lsnrCalls == futuresCount()) { try { onDone(rdc != null ? rdc.reduce() : null); } catch (RuntimeException e) { logError(logger(), "Failed to execute compound future reducer: " + this, e); onDone(e); } catch (AssertionError e) { logError(logger(), "Failed to execute compound future reducer: " + this, e); onDone(e); throw e; } } }