@Override public boolean isFailoverSafe() { try{ initializeReentrantLock(); return sync.failoverSafe; } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public long getAndIncrement() { try { return internalUpdate(1, getAndIncCall, false); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Nullable @Override public Object localExecute(@Nullable IgniteInternalCache cache) { if (cache == null) return 0; try { return cache.localSizeLong(partition, peekModes); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <T, R> R execute(IgfsTask<T, R> task, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg) { try { return saveOrGet(igfs.executeAsync0(task, rslvr, paths, skipNonExistentFiles, maxRangeLen, arg)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <T, R> R execute(Class<? extends IgfsTask<T, R>> taskCls, @Nullable IgfsRecordResolver rslvr, Collection<IgfsPath> paths, boolean skipNonExistentFiles, long maxRangeLen, @Nullable T arg) { try { return saveOrGet(igfs.executeAsync0(taskCls, rslvr, paths, skipNonExistentFiles, maxRangeLen, arg)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <R, T> Collection<R> broadcast(IgniteClosure<T, R> job, @Nullable T arg) { try { return saveOrGet(broadcastAsync0(job, arg)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void run(Collection<? extends IgniteRunnable> jobs) { try { saveOrGet(runAsync0(jobs)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public boolean hasQueuedThreads() { try{ initializeReentrantLock(); return sync.hasQueuedThreads(); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
@Override public Collection<SecuritySubject> authenticatedSubjects() { try { return ctx.security().authenticatedSubjects(); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void await() { try { initializeLatch(); U.await(internalLatch); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void broadcast(IgniteRunnable job) { try { saveOrGet(broadcastAsync0(job)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <R1, R2> R2 call(Collection<? extends IgniteCallable<R1>> jobs, IgniteReducer<R1, R2> rdc) { try { return saveOrGet(callAsync0(jobs, rdc)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <R1, R2, T> R2 apply(IgniteClosure<T, R1> job, Collection<? extends T> args, IgniteReducer<R1, R2> rdc) { try { return saveOrGet(applyAsync0(job, args, rdc)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc}*/ @Override public void countDownAll() { try { retryTopologySafe(new CountDownCallable(0)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void affinityRun(@NotNull Collection<String> cacheNames, Object affKey, IgniteRunnable job) { CU.validateCacheNames(cacheNames); try { saveOrGet(affinityRunAsync0(cacheNames, affKey, job)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public <R> R affinityCall(String cacheName, Object affKey, IgniteCallable<R> job) { CU.validateCacheName(cacheName); try { return saveOrGet(affinityCallAsync0(cacheName, affKey, job)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public int size() { try { GridCacheQueueHeader hdr = (GridCacheQueueHeader)cache.get(queueKey); checkRemoved(hdr); return hdr.size(); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void close() { try { if (rmvd) return; ctx.kernalContext().dataStructures().removeSet(name, ctx); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override protected Void run(VisorCacheToggleStatisticsTaskArg arg) { try { ignite.context().cache().enableStatistics(arg.getCacheNames(), arg.getState()); } catch (IgniteCheckedException e) { throw U.convertException(e); } return null; }
/** {@inheritDoc} */ @Override public void close() { if (!rmvd) { try { boolean force = sync != null && (sync.isBroken() && !sync.failoverSafe); ctx.kernalContext().dataStructures().removeReentrantLock(name, ctx.group().name(), force); } catch (IgniteCheckedException e) { throw U.convertException(e); } } }