/** {@inheritDoc} */ @Override protected void operation(int key) throws Exception { cache.getAndRemove(key); } }
/** {@inheritDoc} */ @Override public V getAndRemove(K key) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) { setFuture(delegate.getAndRemoveAsync(key)); return null; } else return delegate.getAndRemove(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Nullable @Override public Object getAndRemove(Object key) throws IgniteCheckedException { return delegate.get().getAndRemove(keyTransformer.transform(key)); }
/** {@inheritDoc} */ @Override public V getAndRemove(K key) { try { if (isAsync()) { setFuture(delegate.getAndRemoveAsync(key)); return null; } else return delegate.getAndRemove(key); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Nullable @Override public V getAndRemove(K key) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getAndRemove(key); } finally { gate.leave(prev); } }
/** * Set sampling flag. * * @param val Sampling flag state or {@code null} to clear sampling state and mark it as "not set". * @return {@code True} if sampling mode was actually changed by this call. * @throws IgniteCheckedException If failed. */ public boolean sampling(Boolean val) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { Object prev = val != null ? metaCache.getAndPut(sampling, val) : metaCache.getAndRemove(sampling); tx.commit(); return !F.eq(prev, val); } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set sampling flag because Grid is stopping."); }
@Override public void applyx(GridCacheSetHeader hdr) throws IgniteCheckedException { hdr = (GridCacheSetHeader) cctx.cache().withNoRetries().getAndRemove(new GridCacheSetHeaderKey(name)); if (hdr != null) cctx.dataStructures().removeSetData(hdr.id(), hdr.separated()); } };
if (serviceCache().getAndRemove(key) == null) {
cache0.getAndRemove(key);
@Override public void applyx(GridCacheQueueHeader hdr) throws IgniteCheckedException { hdr = (GridCacheQueueHeader) cctx.cache().withNoRetries().getAndRemove(new GridCacheQueueHeaderKey(name)); if (hdr == null || hdr.empty()) return; GridCacheQueueAdapter.removeKeys(cctx.cache(), hdr.id(), name, hdr.collocated(), hdr.head(), hdr.tail(), 0); } };
log.debug("Removed zombie assignments: " + e.getValue()); cache.getAndRemove(e.getKey());
cache.getAndRemove(key);
/** {@inheritDoc} */ @Override protected void operation(int key) throws Exception { cache.getAndRemove(key); } }
/** {@inheritDoc} */ @Nullable @Override public V getAndRemove(K key) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { return delegate.getAndRemove(key); } finally { gate.leave(prev); } }
@Override public void applyx(GridCacheSetHeader hdr) throws IgniteCheckedException { hdr = (GridCacheSetHeader) cctx.cache().withNoRetries().getAndRemove(new GridCacheSetHeaderKey(name)); if (hdr != null) cctx.dataStructures().removeSetData(hdr.id(), hdr.separated()); } };
/** * Set sampling flag. * * @param val Sampling flag state or {@code null} to clear sampling state and mark it as "not set". * @return {@code True} if sampling mode was actually changed by this call. * @throws IgniteCheckedException If failed. */ public boolean sampling(Boolean val) throws IgniteCheckedException { if (busyLock.enterBusy()) { try { validTxState(false); try (GridNearTxLocal tx = startTx()) { Object prev = val != null ? metaCache.getAndPut(sampling, val) : metaCache.getAndRemove(sampling); tx.commit(); return !F.eq(prev, val); } } finally { busyLock.leaveBusy(); } } else throw new IllegalStateException("Failed to set sampling flag because Grid is stopping."); }
cache0.getAndRemove(key);
if (serviceCache().getAndRemove(key) == null) {
@Override public void applyx(GridCacheQueueHeader hdr) throws IgniteCheckedException { hdr = (GridCacheQueueHeader) cctx.cache().withNoRetries().getAndRemove(new GridCacheQueueHeaderKey(name)); if (hdr == null || hdr.empty()) return; GridCacheQueueAdapter.removeKeys(cctx.cache(), hdr.id(), name, hdr.collocated(), hdr.head(), hdr.tail(), 0); } };