/** {@inheritDoc} */ @Override public R get(long timeout) throws IgniteCheckedException { // Do not replace with static import, as it may not compile. return get(timeout, TimeUnit.MILLISECONDS); }
/** * */ private void waitCompleted() throws IgniteCheckedException { GridFutureAdapter<Void> fut; synchronized (this) { assert destroyFut != null; fut = destroyFut; } fut.get(); }
/** * Synchronously waits for completion of the task for up to the given timeout. * * @param timeout The maximum time to wait in milliseconds. * @throws IgniteCheckedException In case of an error. */ protected void waitForComplete(long timeout) throws IgniteCheckedException { completeStateFut.get(timeout); }
/** {@inheritDoc} */ @Override public void await(long timeout, TimeUnit timeUnit) throws IgniteCheckedException { complete.get(timeout, timeUnit); }
/** * @throws IgniteCheckedException If failed. */ void waitFirstReconnect() throws IgniteCheckedException { firstReconnectFut.get(); }
/** * */ private void waitActivate() { try { activateFut.get(); } catch (IgniteCheckedException e) { // No-op. } }
/** * Await for that worker batch to complete. * * @throws IgniteCheckedException In case any exception has occurred during batch tasks processing. */ void await() throws IgniteCheckedException { fut.get(); }
/** {@inheritDoc} */ @Override public void await() throws IgniteCheckedException { complete.get(); }
@Override public Object call() throws Exception { return callFut2.get(); } }, IgniteCheckedException.class, "TestMessage");
/** * @return Tuple that consists of a local join event and discovery cache at the join time. */ public DiscoveryLocalJoinData localJoin() { try { return locJoin.get(); } catch (IgniteCheckedException e) { throw new IgniteException(e); } }
/** */ public void waitUntilAllSingleMessagesAreSent() throws IgniteCheckedException { allSingleMessagesSent.get(); } }
@Override public Object call() throws Exception { return callFut1.get(); } }, IgniteCheckedException.class, "TestMessage");
/** * @param futs Futs. */ private void closeManagers(Collection<GridFutureAdapter<CacheManager>> futs) { for (GridFutureAdapter<CacheManager> fut : futs) { try { CacheManager mgr = fut.get(); mgr.close(); } catch (Exception ignored) { // No-op. } } }
/** {@inheritDoc} */ @Override public Collection<R> get() throws IgniteCheckedException { if (!isDone()) loadAllPages(); return super.get(); }
/** @return Event that represents a local node joined to topology. */ public DiscoveryEvent localJoinEvent() { try { return locJoin.get().event(); } catch (IgniteCheckedException e) { throw new IgniteException(e); } }
/** {@inheritDoc} */ @Override public Collection<R> get(long timeout, TimeUnit unit) throws IgniteCheckedException { if (!isDone()) loadAllPages(); return super.get(timeout, unit); }
/** * Basically the same as {@link #startWrite(String, byte[])} but for CAS operations. */ private boolean startCas(String key, byte[] expValBytes, byte[] newValBytes) throws IgniteCheckedException { UUID reqId = UUID.randomUUID(); GridFutureAdapter<Boolean> fut = new GridFutureAdapter<>(); updateFuts.put(reqId, fut); DiscoveryCustomMessage msg = new DistributedMetaStorageCasMessage(reqId, key, expValBytes, newValBytes); ctx.discovery().sendCustomEvent(msg); return fut.get(); }
/** {@inheritDoc} */ @Override public void cleanupTaskEnvironment(HadoopTaskInfo info) throws IgniteCheckedException { HadoopTaskContext ctx = ctxs.remove(new T2<>(info.type(), info.taskNumber())).get(); taskCtxClsPool.add(ctx.getClass()); File locDir = taskLocalDir(igniteWorkDirectory(), locNodeId, info); if (locDir.exists()) U.delete(locDir); }
@Override public Object call() throws Exception { GridFutureAdapter<String> fut = new GridFutureAdapter<>(); fut.onCancelled(); return fut.get(); } }, IgniteFutureCancelledCheckedException.class, null);
@Override public Object call() throws Exception { GridFutureAdapter<String> fut = new GridFutureAdapter<>(); fut.onCancelled(); fut.onDone(); return fut.get(); } }, IgniteFutureCancelledCheckedException.class, null);