@Override public Void call() throws Exception { clientCache.remove(k); return null; } }, CacheServerNotFoundException.class, null);
@Override public void applyx(IgniteCache<String, Integer> cache) { for (int i = 0; i < cnt; i++) { String key = "key" + i; // Use removeAll for serializable tx to avoid version check. if (isolation == TransactionIsolation.SERIALIZABLE) cache.removeAll(Collections.singleton(key)); else cache.remove(key); } } });
@Override public Void call() throws Exception { cache.remove("key1", null); return null; } }, NullPointerException.class, null);
@Override public boolean applyx() throws IgniteCheckedException { jcache(fi).removeAll(); if (jcache(fi).size(CachePeekMode.ALL) > 0) { for (Cache.Entry<String, ?> k : jcache(fi).localEntries()) jcache(fi).remove(k.getKey()); } return jcache(fi).localSize(CachePeekMode.ALL) == 0; } },
@Override public Void apply(IgniteCache<Integer, Integer> cache) { cache.remove(key); return null; } }
@Override public Void apply(IgniteCache<Integer, Integer> cache) { cache.remove(key); return null; } }
@Override public Void apply(IgniteCache<Integer, Integer> cache) { cache.remove(key); return null; } }
@Override public Void apply(IgniteCache<Integer, Integer> cache) { cache.remove(key); return null; } }
@Override public void applyx(IgniteCache<Object, Object> cache) { for (int i = 0; i < cnt; i++) { boolean removed = cache.remove("key" + i); assertTrue(removed); } } });
/** {@inheritDoc} */ @Override public Boolean call() throws Exception { return cache().remove(key); } }
@Override public Void call() throws Exception { grid(0).cache(DEFAULT_CACHE_NAME).remove(key); return null; } }, CacheWriterException.class, null);
/** * @param cnt Number of removing elements. */ private void clearCache(int cnt) { for (int i = 0; i < cnt; i++) ignite.cache(DEFAULT_CACHE_NAME).remove(i); }
/** {@inheritDoc} */ @Override public void remove() { it.remove(); cctx.grid().cache(cctx.name()).remove(cur.getKey(), cur.getValue()); } }
/** */ @Test public void testRemove1() { checkOperation(() -> cache.remove(1)); }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") @Override public ClientResponse process(ClientConnectionContext ctx) { boolean res = cache(ctx).remove(key(), val()); return new ClientBooleanResponse(requestId(), res); } }
@Override public Void call() throws Exception { IgniteTransactions txs = transactions(); try (Transaction tx = txs.txStart()) { cache.put(key, 2); cache.remove(null); tx.commit(); } return null; } }, NullPointerException.class, null);
/** * Increment cache statistics. * * @param cache cache. */ private void incrementCacheStatistics(IgniteCache<Integer, String> cache) { cache.get(1); cache.put(1, "one"); cache.get(1); cache.remove(1); }
/** * @throws Exception If failed. */ @Test public void testPeekRemove() throws Exception { IgniteCache<String, Integer> cache = primaryCache("key"); cache.put("key", 1); cache.remove("key"); assertNull(cache.localPeek("key")); }