IGNITE-54-55 Remove 'filter' parameter from GridCache.removeAll() method.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/19a53fe6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/19a53fe6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/19a53fe6 Branch: refs/heads/ignite-57 Commit: 19a53fe6559c9c1a371c406d56ccd6eac87c6f45 Parents: 88c298c Author: sevdokimov <[email protected]> Authored: Tue Feb 3 15:01:41 2015 +0300 Committer: sevdokimov <[email protected]> Committed: Tue Feb 3 15:01:41 2015 +0300 ---------------------------------------------------------------------- .../apache/ignite/cache/CacheProjection.java | 5 +- .../processors/cache/GridCacheAdapter.java | 18 +--- .../cache/GridCacheProjectionImpl.java | 4 +- .../processors/cache/GridCacheProxyImpl.java | 4 +- .../processors/cache/IgniteCacheProxy.java | 17 ---- .../dht/atomic/GridDhtAtomicCache.java | 4 +- .../distributed/near/GridNearAtomicCache.java | 4 +- .../local/atomic/GridLocalAtomicCache.java | 4 +- ...cheAbstractFullApiMultithreadedSelfTest.java | 22 ----- .../cache/GridCacheAbstractFullApiSelfTest.java | 89 -------------------- .../GridCacheAbstractProjectionSelfTest.java | 27 ------ .../dht/GridCacheDhtEntrySelfTest.java | 2 +- ...GridCacheDhtEvictionNearReadersSelfTest.java | 2 +- .../dht/GridCacheDhtEvictionSelfTest.java | 2 +- ...hePartitionedQueryMultiThreadedSelfTest.java | 2 +- .../GridCacheAbstractFieldsQuerySelfTest.java | 4 +- .../GridCacheQueryMultiThreadedSelfTest.java | 2 +- 17 files changed, 22 insertions(+), 190 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java index 7d072b6..bf21d50 100644 --- a/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java +++ b/modules/core/src/main/java/org/apache/ignite/cache/CacheProjection.java @@ -1647,13 +1647,10 @@ public interface CacheProjection<K, V> extends Iterable<CacheEntry<K, V>> { * This method is not available if any of the following flags are set on projection: * {@link CacheFlag#LOCAL}, {@link CacheFlag#READ}. * - * @param filter Filter used to supply keys for remove operation (if {@code null}, - * then nothing will be removed). * @throws IgniteCheckedException If remove failed. * @throws CacheFlagException If flags validation failed. */ - public void removeAll(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) - throws IgniteCheckedException; + public void removeAll() throws IgniteCheckedException; /** * Asynchronously removes mappings from cache for entries for which the optionally passed in filters do http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java index fc840cf..c80e171 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java @@ -3380,11 +3380,8 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, } /** {@inheritDoc} */ - @Override public void removeAll(IgnitePredicate<CacheEntry<K, V>>... filter) throws IgniteCheckedException { + @Override public void removeAll() throws IgniteCheckedException { try { - if (F.isEmptyOrNulls(filter)) - filter = ctx.trueArray(); - long topVer; do { @@ -3396,7 +3393,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, IgniteFuture<Object> fut = null; if (!nodes.isEmpty()) - fut = ctx.closures().callAsyncNoFailover(BROADCAST, new GlobalRemoveAllCallable<>(name(), topVer, REMOVE_ALL_BATCH_SIZE, filter), nodes, true); + fut = ctx.closures().callAsyncNoFailover(BROADCAST, new GlobalRemoveAllCallable<>(name(), topVer, REMOVE_ALL_BATCH_SIZE), nodes, true); if (fut != null) fut.get(); @@ -5246,9 +5243,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, /** Remove batch size. */ private long rmvBatchSz; - /** Filters. */ - private IgnitePredicate<CacheEntry<K, V>>[] filter; - /** Injected grid instance. */ @IgniteInstanceResource private Ignite ignite; @@ -5266,11 +5260,10 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, * @param rmvBatchSz Remove batch size. * @param filter Filter. */ - private GlobalRemoveAllCallable(String cacheName, long topVer, long rmvBatchSz, IgnitePredicate<CacheEntry<K, V>> ... filter) { + private GlobalRemoveAllCallable(String cacheName, long topVer, long rmvBatchSz) { this.cacheName = cacheName; this.topVer = topVer; this.rmvBatchSz = rmvBatchSz; - this.filter = filter; } /** @@ -5287,7 +5280,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, assert cache != null; - for (K k : cache.keySet(filter)) { + for (K k : cache.keySet()) { if (ctx.affinity().primary(ctx.localNode(), k, topVer)) keys.add(k); if (keys.size() >= rmvBatchSz) { @@ -5306,8 +5299,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, U.writeString(out, cacheName); out.writeLong(topVer); out.writeLong(rmvBatchSz); - out.writeObject(filter); - } /** {@inheritDoc} */ @@ -5315,7 +5306,6 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K, V>, cacheName = U.readString(in); topVer = in.readLong(); rmvBatchSz = in.readLong(); - filter = (IgnitePredicate<CacheEntry<K, V>>[]) in.readObject(); } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java index 2de6f53..d0ed9fc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java @@ -1172,9 +1172,9 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K, V } /** {@inheritDoc} */ - @Override public void removeAll(@Nullable IgnitePredicate<CacheEntry<K, V>>... filter) + @Override public void removeAll() throws IgniteCheckedException { - cache.removeAll(and(filter, false)); + cache.removeAll(); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java index da5e899..74cabb7 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java @@ -1573,12 +1573,12 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K, V>, Externali } /** {@inheritDoc} */ - @Override public void removeAll(@Nullable IgnitePredicate<CacheEntry<K, V>>[] filter) + @Override public void removeAll() throws IgniteCheckedException { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); try { - delegate.removeAll(filter); + delegate.removeAll(); } finally { gate.leave(prev); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java index d0e3e60..40d2a3b 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java @@ -414,23 +414,6 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach } } - /** - * @param filter Filter. - */ - public void removeAll(IgnitePredicate<CacheEntry<K, V>>... filter) { - GridCacheProjectionImpl<K, V> prev = gate.enter(prj); - - try { - delegate.removeAll(filter); - } - catch (IgniteCheckedException e) { - throw cacheException(e); - } - finally { - gate.leave(prev); - } - } - /** {@inheritDoc} */ @Override public boolean containsKey(K key) { GridCacheProjectionImpl<K, V> prev = gate.enter(prj); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java index 154bf8e..b952105 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java @@ -506,8 +506,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public void removeAll(IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { - super.removeAll(filter); // TODO: IGNITE-?? Fix asynÑ cleanup + @Override public void removeAll() throws IgniteCheckedException { + super.removeAll(); // TODO: IGNITE-?? Fix asynÑ cleanup //removeAllAsync(filter).get(); } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java index 9ab8d86..e35d23d 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearAtomicCache.java @@ -629,8 +629,8 @@ public class GridNearAtomicCache<K, V> extends GridNearCacheAdapter<K, V> { } /** {@inheritDoc} */ - @Override public void removeAll(IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { - dht.removeAll(keySet(filter)); + @Override public void removeAll() throws IgniteCheckedException { + dht.removeAll(keySet()); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java index 2c4a774..fbad22e 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java @@ -464,8 +464,8 @@ public class GridLocalAtomicCache<K, V> extends GridCacheAdapter<K, V> { /** {@inheritDoc} */ @SuppressWarnings("unchecked") - @Override public void removeAll(IgnitePredicate<CacheEntry<K, V>>[] filter) throws IgniteCheckedException { - removeAll(keySet(filter)); + @Override public void removeAll() throws IgniteCheckedException { + removeAll(keySet()); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java index 1efc144..cb527d9 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java @@ -343,28 +343,6 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid /** * @throws Exception In case of error. */ - public void testRemoveAllFiltered() throws Exception { - runTest(new CIX1<GridCache<String,Integer>>() { - @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { - final int rnd = random(); - - cache.removeAll(new P1<CacheEntry<String, Integer>>() { - @Override public boolean apply(CacheEntry<String, Integer> e) { - Integer val = e.peek(); - - return val != null && val < rnd; - } - }); - - for (int i = 0; i < rnd; i++) - assert cache.peek("key" + i) == null; - } - }); - } - - /** - * @throws Exception In case of error. - */ public void testRemoveAllAsync() throws Exception { runTest(new CIX1<GridCache<String,Integer>>() { @Override public void applyx(GridCache<String, Integer> cache) throws IgniteCheckedException { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java index 3b487fd..f6ab016 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java @@ -2551,43 +2551,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract /** * @throws Exception In case of error. */ - public void testRemoveAllFiltered() throws Exception { - cache().put("key1", 1); - cache().put("key2", 2); - cache().put("key3", 100); - cache().put("key4", 101); - cache().put("key5", 102); - - checkSize(F.asSet("key1", "key2", "key3", "key4", "key5")); - - cache().removeAll(F.asList("key2", "key3", "key4"), gte100); - - checkSize(F.asSet("key1", "key2", "key5")); - - checkContainsKey(true, "key1"); - checkContainsKey(true, "key2"); - checkContainsKey(true, "key5"); - - checkContainsKey(false, "key3"); - checkContainsKey(false, "key4"); - - cache().put("key6", 200); - cache().put("key7", 201); - - checkSize(F.asSet("key1", "key2", "key5", "key6", "key7")); - - for (int i = 0; i < gridCount(); i++) - cache(i).removeAll(gte200); - - checkSize(F.asSet("key1", "key2", "key5")); - - checkContainsKey(false, "key6"); - checkContainsKey(false, "key7"); - } - - /** - * @throws Exception In case of error. - */ public void testRemoveAllAsync() throws Exception { cache().put("key1", 1); cache().put("key2", 2); @@ -3068,58 +3031,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract } /** - * @throws Exception If failed. - */ - public void testRemoveFilteredAfterClear() throws Exception { - GridEx grid = grid(0); - - CacheDistributionMode distroMode = grid.cache(null).configuration().getDistributionMode(); - - if (distroMode == CacheDistributionMode.NEAR_ONLY || distroMode == CacheDistributionMode.CLIENT_ONLY) { - if (gridCount() < 2) - return; - - grid = grid(1); - } - - CacheProjection<Integer, Integer> cache = grid.cache(null); - - List<Integer> keys = new ArrayList<>(); - - int key = 0; - - for (int k = 0; k < 2; k++) { - while (!grid.cache(null).affinity().isPrimary(grid.localNode(), key)) - key++; - - keys.add(key); - - key++; - } - - System.out.println(keys); - - for (Integer k : keys) - cache.put(k, k + 1); - - cache.clear(); - - for (int g = 0; g < gridCount(); g++) { - Ignite grid0 = grid(g); - - grid0.cache(null).removeAll(new IgnitePredicate<CacheEntry<Object,Object>>() { - @Override public boolean apply(CacheEntry<Object, Object> e) { - Object val = e.peek(); - - return val instanceof Integer && (Integer)val > 0; - } - }); - - assertTrue(grid0.cache(null).isEmpty()); - } - } - - /** * @throws Exception In case of error. */ public void testClear() throws Exception { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java index 7dbd6a8..4d9bd9d 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractProjectionSelfTest.java @@ -804,31 +804,4 @@ public abstract class GridCacheAbstractProjectionSelfTest extends GridCacheAbstr tx.commit(); } - - /** - * @throws IgniteCheckedException In case of error. - */ - public void testTypedProjection() throws Exception { - GridCache<Object, Object> cache = grid(0).cache(null); - - cache.putx("1", "test string"); - cache.putx("2", 0); - - final CacheProjection<String, String> prj = cache.projection(String.class, String.class); - - final CountDownLatch latch = new CountDownLatch(1); - - prj.removeAll(new P1<CacheEntry<String, String>>() { - @Override - public boolean apply(CacheEntry<String, String> e) { - info(" --> " + e.peek().getClass()); - - latch.countDown(); - - return true; - } - }); - - assertTrue(latch.await(1, SECONDS)); - } } http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java index 05bf711..9078982 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java @@ -100,7 +100,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest { @SuppressWarnings({"SizeReplaceableByIsEmpty"}) @Override protected void afterTest() throws Exception { for (int i = 0; i < GRID_CNT; i++) { - near(grid(i)).removeAll(F.<CacheEntry<Integer, String>>alwaysTrue()); + near(grid(i)).removeAll(); assertEquals("Near cache size is not zero for grid: " + i, 0, near(grid(i)).size()); assertEquals("DHT cache size is not zero for grid: " + i, 0, dht(grid(i)).size()); http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java index fee7183..0773eb0 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java @@ -130,7 +130,7 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT @SuppressWarnings({"unchecked"}) @Override protected void afterTest() throws Exception { for (int i = 0; i < GRID_CNT; i++) { - near(grid(i)).removeAll(new IgnitePredicate[] {F.alwaysTrue()}); + near(grid(i)).removeAll(); assert near(grid(i)).isEmpty() : "Near cache is not empty [idx=" + i + "]"; assert dht(grid(i)).isEmpty() : "Dht cache is not empty [idx=" + i + "]"; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java index fab65a9..1cc9d09 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java @@ -124,7 +124,7 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest { @SuppressWarnings({"unchecked"}) @Override protected void afterTest() throws Exception { for (int i = 0; i < GRID_CNT; i++) { - near(grid(i)).removeAll(new IgnitePredicate[] {F.alwaysTrue()}); + near(grid(i)).removeAll(); assert near(grid(i)).isEmpty() : "Near cache is not empty [idx=" + i + "]"; assert dht(grid(i)).isEmpty() : "Dht cache is not empty [idx=" + i + "]"; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java index 1ff2317..5d13829 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQueryMultiThreadedSelfTest.java @@ -101,7 +101,7 @@ public class GridCachePartitionedQueryMultiThreadedSelfTest extends GridCommonAb // Clean up all caches. for (int i = 0; i < GRID_CNT; i++) - grid(i).cache(null).removeAll(F.<CacheEntry<Object, Object>>alwaysTrue()); + grid(i).cache(null).removeAll(); } /** {@inheritDoc} */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java index 0364cab..05eecfd 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java @@ -790,7 +790,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs assert qry.execute().get().isEmpty(); - cache.removeAll(F.<CacheEntry<Object, Object>>alwaysTrue()); + cache.removeAll(); } /** @throws Exception If failed. */ @@ -880,7 +880,7 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs } } - cache.removeAll(F.<CacheEntry<PersonKey, Person>>alwaysTrue()); + cache.removeAll(); } /** @throws Exception If failed. */ http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/19a53fe6/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java ---------------------------------------------------------------------- diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java index d206ce8..725d8e7 100644 --- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java +++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java @@ -184,7 +184,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest for (int i = 0; i < GRID_CNT; i++) { GridCache<Object, Object> c = grid(i).cache(null); - c.removeAll(F.<CacheEntry<Object, Object>>alwaysTrue()); + c.removeAll(); // Fix for tests where mapping was removed at primary node // but was not removed at others.
