/** {@inheritDoc}*/ @Override public void countDownAll() { try { retryTopologySafe(new CountDownCallable(0)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public int countDown(int val) { A.ensure(val > 0, "val should be positive"); try { return retryTopologySafe(new CountDownCallable(val)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
if (initGuard.compareAndSet(UNINITIALIZED_LATCH_STATE, CREATING_LATCH_STATE)) { try { internalLatch = retryTopologySafe(new Callable<CountDownLatch>() { @Override public CountDownLatch call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(updateCall);
/** {@inheritDoc} */ @Override public void set(final T val) { checkRemoved(); try { if (ctx.dataStructures().knownType(val)) cacheView.invoke(key, new ReferenceSetEntryProcessor<>(val)); else { CU.retryTopologySafe(new Callable<Void>() { @Override public Void call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) { GridCacheAtomicReferenceValue<T> ref = cacheView.get(key); if (ref == null) throw new IgniteException("Failed to find atomic reference with given name: " + name); cacheView.put(key, new GridCacheAtomicReferenceValue<>(val)); tx.commit(); } return null; } }); } } catch (EntryProcessorException e) { throw new IgniteException(e.getMessage(), e); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void set(final T val, final S stamp) { checkRemoved(); try { if (ctx.dataStructures().knownType(val) && ctx.dataStructures().knownType(stamp)) cacheView.invoke(key, new StampedSetEntryProcessor<>(val, stamp)); else { CU.retryTopologySafe(new Callable<Void>() { @Override public Void call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) { GridCacheAtomicStampedValue<T, S> ref = cacheView.get(key); if (ref == null) throw new IgniteException("Failed to find atomic stamped with given name: " + name); cacheView.put(key, new GridCacheAtomicStampedValue<>(val, stamp)); tx.commit(); } return null; } }); } } catch (EntryProcessorException e) { throw new IgniteException(e.getMessage(), e); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
return CU.retryTopologySafe(new Callable<T>() { @Override public T call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
/** {@inheritDoc}*/ @Override public void countDownAll() { try { retryTopologySafe(new CountDownCallable(0)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public int countDown(int val) { A.ensure(val > 0, "val should be positive"); try { return retryTopologySafe(new CountDownCallable(val)); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
if (initGuard.compareAndSet(UNINITIALIZED_LATCH_STATE, CREATING_LATCH_STATE)) { try { internalLatch = retryTopologySafe(new Callable<CountDownLatch>() { @Override public CountDownLatch call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(updateCall);
/** {@inheritDoc} */ @Override public void set(final T val) { checkRemoved(); try { if (ctx.dataStructures().knownType(val)) cacheView.invoke(key, new ReferenceSetEntryProcessor<>(val)); else { CU.retryTopologySafe(new Callable<Void>() { @Override public Void call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) { GridCacheAtomicReferenceValue<T> ref = cacheView.get(key); if (ref == null) throw new IgniteException("Failed to find atomic reference with given name: " + name); cacheView.put(key, new GridCacheAtomicReferenceValue<>(val)); tx.commit(); } return null; } }); } } catch (EntryProcessorException e) { throw new IgniteException(e.getMessage(), e); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
/** {@inheritDoc} */ @Override public void set(final T val, final S stamp) { checkRemoved(); try { if (ctx.dataStructures().knownType(val) && ctx.dataStructures().knownType(stamp)) cacheView.invoke(key, new StampedSetEntryProcessor<>(val, stamp)); else { CU.retryTopologySafe(new Callable<Void>() { @Override public Void call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) { GridCacheAtomicStampedValue<T, S> ref = cacheView.get(key); if (ref == null) throw new IgniteException("Failed to find atomic stamped with given name: " + name); cacheView.put(key, new GridCacheAtomicStampedValue<>(val, stamp)); tx.commit(); } return null; } }); } } catch (EntryProcessorException e) { throw new IgniteException(e.getMessage(), e); } catch (IgniteCheckedException e) { throw U.convertException(e); } }
return CU.retryTopologySafe(new Callable<T>() { @Override public T call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {
return CU.retryTopologySafe(new Callable<Boolean>() { @Override public Boolean call() throws Exception { try (GridNearTxLocal tx = CU.txStartInternal(ctx, cacheView, PESSIMISTIC, REPEATABLE_READ)) {