/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().countDownLatch(t.get2(), null, 0, false, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ private Object readResolve() throws ObjectStreamException { String name = stash.get(); assert name != null; try { IgniteLock lock = IgnitionEx.localIgnite().context().dataStructures().reentrantLock( name, null, false, false, false); if (lock == null) throw new IllegalStateException("Lock was not found on deserialization: " + name); return lock; } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().atomicLong(t.get2(), null, 0L, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
assert type != null; awaitInitialization(); retryTopologySafe(new IgniteOutClosureX<Object>() { @Override public Object applyx() throws IgniteCheckedException { IgniteInternalCache<GridCacheInternalKey, AtomicDataStructureValue> cache = ctx.cache().cache(cacheName);
awaitInitialization(); checkAtomicsConfiguration(); return null; ctx.cache().dynamicStartCache(cacheConfiguration(cfg, cacheName, grpName), cacheName, null, startQuery(cache.context()); T dataStructure = cast(dsMap.get(key), cls); return retryTopologySafe(new IgniteOutClosureX<T>() { @Override public T applyx() throws IgniteCheckedException { cache.context().gate().enter();
throws IgniteCheckedException awaitInitialization(); ccfg = metaCacheConfiguration(cfg, metaCacheName, grpName); cache = compatibleCache(cfg, grpName, type, name, separated); return retryTopologySafe(new IgniteOutClosureX<T>() { @Override public T applyx() throws IgniteCheckedException { return c.applyx(cache.context());
/** * @param cfg Collection configuration. * @param name Cache name. * @param grpName Group name. * @return Meta cache configuration. */ private CacheConfiguration metaCacheConfiguration(CollectionConfiguration cfg, String name, String grpName) { CacheConfiguration ccfg = cacheConfiguration(cfg, name, grpName); ccfg.setAtomicityMode(TRANSACTIONAL); return ccfg; }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().atomicReference(t.get2(), null, null, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().atomicStamped(t.get2(), null, null, null, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
awaitInitialization(); checkAtomicsConfiguration(); return null; ctx.cache().dynamicStartCache(cacheConfiguration(cfg, cacheName, grpName), cacheName, null, startQuery(cache.context()); T dataStructure = cast(dsMap.get(key), cls); return retryTopologySafe(new IgniteOutClosureX<T>() { @Override public T applyx() throws IgniteCheckedException { cache.context().gate().enter();
throws IgniteCheckedException awaitInitialization(); ccfg = metaCacheConfiguration(cfg, metaCacheName, grpName); cache = compatibleCache(cfg, grpName, type, name, separated); return retryTopologySafe(new IgniteOutClosureX<T>() { @Override public T applyx() throws IgniteCheckedException { return c.applyx(cache.context());
assert type != null; awaitInitialization(); retryTopologySafe(new IgniteOutClosureX<Object>() { @Override public Object applyx() throws IgniteCheckedException { IgniteInternalCache<GridCacheInternalKey, AtomicDataStructureValue> cache = ctx.cache().cache(cacheName);
ctx.cache().dynamicStartCache(cacheConfiguration(cfg, cacheName, grpName), cacheName, null,
/** {@inheritDoc} */ @Override public <T> IgniteAtomicReference<T> atomicReference(String name, AtomicConfiguration cfg, @Nullable T initVal, boolean create) throws IgniteException { guard(); try { checkClusterState(); return ctx.dataStructures().atomicReference(name, cfg, initVal, create); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
/** {@inheritDoc} */ @Override public <T, S> IgniteAtomicStamped<T, S> atomicStamped(String name, AtomicConfiguration cfg, @Nullable T initVal, @Nullable S initStamp, boolean create) throws IgniteException { guard(); try { checkClusterState(); return ctx.dataStructures().atomicStamped(name, cfg, initVal, initStamp, create); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
/** {@inheritDoc} */ @Nullable @Override public IgniteCountDownLatch countDownLatch(String name, int cnt, boolean autoDel, boolean create) { guard(); try { checkClusterState(); return ctx.dataStructures().countDownLatch(name, null, cnt, autoDel, create); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
/** {@inheritDoc} */ @Nullable @Override public IgniteLock reentrantLock( String name, boolean failoverSafe, boolean fair, boolean create ) { guard(); try { checkClusterState(); return ctx.dataStructures().reentrantLock(name, null, failoverSafe, fair, create); } catch (IgniteCheckedException e) { throw U.convertException(e); } finally { unguard(); } }
/** * @param cfg Collection configuration. * @param name Cache name. * @param grpName Group name. * @return Meta cache configuration. */ private CacheConfiguration metaCacheConfiguration(CollectionConfiguration cfg, String name, String grpName) { CacheConfiguration ccfg = cacheConfiguration(cfg, name, grpName); ccfg.setAtomicityMode(TRANSACTIONAL); return ccfg; }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ @SuppressWarnings("unchecked") private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().atomicReference(t.get2(), null, null, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }
/** * Reconstructs object on unmarshalling. * * @return Reconstructed object. * @throws ObjectStreamException Thrown in case of unmarshalling error. */ @SuppressWarnings("unchecked") private Object readResolve() throws ObjectStreamException { try { IgniteBiTuple<GridKernalContext, String> t = stash.get(); return t.get1().dataStructures().atomicStamped(t.get2(), null, null, null, false); } catch (IgniteCheckedException e) { throw U.withCause(new InvalidObjectException(e.getMessage()), e); } finally { stash.remove(); } }