@Override public Void call() throws Exception { cache.removeAll(keys); return null; } });
/** {@inheritDoc} */ @Override public void removeAll(Set<? extends K> keys) { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.removeAllAsync(keys)); else delegate.removeAll(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll() { IgniteInternalCache<K, V> delegate = getDelegateSafe(); try { if (isAsync()) setFuture(delegate.removeAllAsync()); else delegate.removeAll(); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll() throws IgniteCheckedException { delegate.get().removeAll(); }
/** {@inheritDoc} */ @Override public void removeAll(Set<? extends K> keys) { try { if (isAsync()) setFuture(delegate.removeAllAsync(keys)); else delegate.removeAll(keys); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll(@Nullable Collection keys) throws IgniteCheckedException { delegate.get().removeAll(transform(keys)); }
/** {@inheritDoc} */ @Override public void removeAll() { try { if (isAsync()) setFuture(delegate.removeAllAsync()); else delegate.removeAll(); } catch (IgniteCheckedException | IgniteException e) { throw cacheException(e); } }
/** {@inheritDoc} */ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.removeAll(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public void removeAll() throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.removeAll(); } finally { gate.leave(prev); } }
@Override public void run() { while (run) { TreeMap<Integer, String> vals = generateValues(keys); try { // Explicit lock. cache.lock(vals.firstKey(), 0); try { // Put or remove. if (ThreadLocalRandom.current().nextDouble(1) < 0.65) cache.putAll(vals); else cache.removeAll(vals.keySet()); } catch (IgniteCheckedException e) { U.error(log(), "Failed cache operation.", e); } finally { cache.unlock(vals.firstKey()); } U.sleep(100); } catch (Throwable e){ U.error(log(), "Failed unlock.", e); err = e; return; } } } };
@Override public Void call() throws Exception { cache.removeAll(keys); return null; } });
/** {@inheritDoc} */ @Override public void removeAll(@Nullable Collection<? extends K> keys) throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.removeAll(keys); } finally { gate.leave(prev); } }
/** {@inheritDoc} */ @Override public void removeAll() throws IgniteCheckedException { CacheOperationContext prev = gate.enter(opCtx); try { delegate.removeAll(); } finally { gate.leave(prev); } }