ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [02/39] incubator-ignite git commit: Ignite-54-55 Clear* API refactored
Date Thu, 05 Feb 2015 21:40:13 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
index baf71cb..6c15b73 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearAllSelfTest.java
@@ -35,7 +35,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.*;
 import static org.apache.ignite.internal.processors.cache.GridCacheAdapter.*;
 
 /**
- * Test {@link org.apache.ignite.cache.GridCache#clearAll()} operations in multinode environment
with nodes having caches with different names.
+ * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} operations in multinode
environment with nodes having caches with different names.
  */
 public class GridCacheClearAllSelfTest extends GridCommonAbstractTest {
     /** Local cache. */
@@ -148,7 +148,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on LOCAL cache with no split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on LOCAL cache with
no split.
      *
      * @throws Exception If failed.
      */
@@ -157,7 +157,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on LOCAL cache with split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on LOCAL cache with
split.
      *
      * @throws Exception If failed.
      */
@@ -166,7 +166,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on PARTITIONED cache with
no split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on PARTITIONED cache
with no split.
      *
      * @throws Exception If failed.
      */
@@ -175,7 +175,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on PARTITIONED cache with
split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on PARTITIONED cache
with split.
      *
      * @throws Exception If failed.
      */
@@ -184,7 +184,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on co-located cache with
no split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on co-located cache
with no split.
      *
      * @throws Exception If failed.
      */
@@ -193,7 +193,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on co-located cache with
split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on co-located cache
with split.
      *
      * @throws Exception If failed.
      */
@@ -202,7 +202,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on REPLICATED cache with
no split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on REPLICATED cache
with no split.
      *
      * @throws Exception If failed.
      */
@@ -211,7 +211,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Test {@link org.apache.ignite.cache.GridCache#clearAll()} on REPLICATED cache with
split.
+     * Test {@link org.apache.ignite.cache.GridCache#clearLocally()} on REPLICATED cache
with split.
      *
      * @throws Exception If failed.
      */
@@ -236,7 +236,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
 
                 fillCache(cache, keysCnt);
 
-                cache.clearAll();
+                cache.clearLocally();
 
                 assert cache.isEmpty();
 
@@ -249,23 +249,23 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
                 // Ensure correct no-op clean of CLIENT_ONLY cache.
                 warmCache(cachesPartitioned[2], keysCnt);
                 assert cachesPartitioned[2].isEmpty();
-                cachesPartitioned[2].clearAll();
+                cachesPartitioned[2].clearLocally();
                 assert cachesPartitioned[2].isEmpty();
 
                 stopGrid(2); // Shutdown Grid in order to remove reader in NEAR_PARTITIONED
cache.
 
-                // Ensure correct clear of NEA_ONLY cache.
+                // Ensure correct clearLocally of NEA_ONLY cache.
                 warmCache(cachesPartitioned[1], keysCnt);
                 assert !cachesPartitioned[1].isEmpty();
-                cachesPartitioned[1].clearAll();
+                cachesPartitioned[1].clearLocally();
                 assert cachesPartitioned[1].isEmpty();
                 fillCache(cachesPartitioned[1], keysCnt);
 
                 stopGrid(1); // Shutdown Grid in order to remove reader in NEAR_PARTITIONED
cache.
 
-                // Ensure correct clear of NEAR_PARTITIONED cache.
+                // Ensure correct clearLocally of NEAR_PARTITIONED cache.
                 assert !cachesPartitioned[0].isEmpty();
-                cachesPartitioned[0].clearAll();
+                cachesPartitioned[0].clearLocally();
                 assert cachesPartitioned[0].isEmpty();
 
                 break;
@@ -280,7 +280,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest
{
                 for (GridCache<Integer, Integer> cache : caches) {
                     assert !cache.isEmpty();
 
-                    cache.clearAll();
+                    cache.clearLocally();
 
                     assert cache.isEmpty();
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
index c605840..3380851 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGetAndTransformStoreAbstractTest.java
@@ -61,7 +61,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends
GridComm
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        cache().clearAll();
+        cache().clearLocally();
 
         store.reset();
     }
@@ -158,7 +158,7 @@ public abstract class GridCacheGetAndTransformStoreAbstractTest extends
GridComm
             stopGrid(2);
 
             while (!cache().isEmpty())
-                cache().globalClearAll(Long.MAX_VALUE);
+                cache().clear(Long.MAX_VALUE);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java
index b72fb80..18f5aa1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGlobalClearAllSelfTest.java
@@ -29,7 +29,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
- * Test {@link org.apache.ignite.cache.GridCache#globalClearAll()} operation in multinode
environment with nodes
+ * Test {@link org.apache.ignite.cache.GridCache#clear()} operation in multinode environment
with nodes
  * having caches with different names.
  */
 public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest {
@@ -131,7 +131,7 @@ public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest
{
     }
 
     /**
-     * Ensure that globalClearAll() clears correct cache and is only executed on nodes with
the cache excluding
+     * Ensure that clear() clears correct cache and is only executed on nodes with the cache
excluding
      * master-node where it is executed locally.
      *
      * @throws Exception If failed.
@@ -155,7 +155,7 @@ public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest
{
         assert grid(GRID_CNT - 1).cache(CACHE_NAME_OTHER).size() == KEY_CNT_OTHER;
 
         // Perform clear.
-        grid(0).cache(CACHE_NAME).globalClearAll();
+        grid(0).cache(CACHE_NAME).clear();
 
         // Expect caches with the given name to be clear on all nodes.
         for (int i = 0; i < GRID_CNT - 1; i++)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
index 432c34d..3b7a1a4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheWriteBehindStoreAbstractTest.java
@@ -65,7 +65,7 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb
         GridCache<?, ?> cache = cache();
 
         if (cache != null)
-            cache.clearAll();
+            cache.clearLocally();
 
         store.reset();
     }
@@ -199,7 +199,7 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb
             assert val.equals(Integer.toString(i));
         }
 
-        cache.clearAll();
+        cache.clearLocally();
 
         assert cache.isEmpty();
         assert cache.isEmpty();
@@ -221,7 +221,7 @@ public abstract class GridCacheWriteBehindStoreAbstractTest extends GridCommonAb
 
         assert cache.size() == 10;
 
-        cache.clearAll();
+        cache.clearLocally();
 
         assert cache.isEmpty();
         assert cache.isEmpty();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
index d904d99..9b1f12a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
@@ -87,7 +87,7 @@ public abstract class GridCacheBasicOpAbstractTest extends GridCommonAbstractTes
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         for (Ignite g : G.allGrids())
-            g.cache(null).clearAll();
+            g.cache(null).clearLocally();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
index 6d3351b..7f455d6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeAbstractTest.java
@@ -409,7 +409,7 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
         assert cache2.size() == 3;
         assert cache3.size() == 3;
 
-        cache1.globalClearAll();
+        cache1.clear();
 
         assert cache1.isEmpty();
         assert cache2.isEmpty();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
index 0e689af..834816b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultiNodeLockAbstractTest.java
@@ -106,7 +106,7 @@ public abstract class GridCacheMultiNodeLockAbstractTest extends GridCommonAbstr
         lsnrs.clear();
 
         for (int i = 1; i <= 3; i++) {
-            cache(i).clearAll();
+            cache(i).clearLocally();
 
             assertTrue(
                 "Cache isn't empty [i=" + i + ", entries=" + ((GridKernal)grid(i)).internalCache().entries()
+ "]",

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
index dc8f159..f6f388c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
@@ -257,7 +257,7 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends
Gri
         nearStore.reset();
 
         for (String key : keys)
-            cache(0).clear(key);
+            cache(0).clearLocally(key);
 
         info(">>> Starting transform transaction");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/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 1e0ae74..05bf711 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
@@ -178,7 +178,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest
{
         assert e0.readers().contains(other.id());
         assert e1 == null || e1.readers().isEmpty();
 
-        assert !near0.clear(key);
+        assert !near0.clearLocally(key);
 
         assertEquals(1, near0.size());
         assertEquals(1, dht0.size());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
index 42ee84e..9506d4a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
@@ -121,7 +121,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
         for (String key : keys)
             assertEquals(null, nearCache.peek(key));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         for (String key : keys)
             assertNull(nearCache.peek(key));
@@ -134,14 +134,14 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
 
         String first = F.first(keys);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertEquals(null, nearCache.peek(first));
         assertEquals(vals.get(first), primary.peek(first));
 
         nearCache.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertTrue(nearCache.isEmpty());
         assertFalse(primary.isEmpty());
@@ -159,7 +159,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
         nearCache.put(first, 101);
         vals.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         for (String key : keys)
             assertEquals(vals.get(key), primary.peek(key));
@@ -198,7 +198,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
         nearCache.putAll(vals);
 
         for (String subKey : subKeys)
-            nearCache.clear(subKey);
+            nearCache.clearLocally(subKey);
 
         for (String key : subKeys) {
             assertNull(nearCache.peek(key));
@@ -207,14 +207,14 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
 
         assertEquals(null, nearCache.peek(lastKey));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         vals.put(lastKey, 102);
 
         nearCache.putAll(vals);
 
         for (String key : keys)
-            nearCache.projection(gte100).clear(key);
+            nearCache.projection(gte100).clearLocally(key);
 
         assertNull(nearCache.peek(lastKey));
 
@@ -468,7 +468,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends
GridCache
         assertEquals(cnt, swapEvts.get());
         assertEquals(cnt, unswapEvts.get());
 
-        cache().clearAll();
+        cache().clearLocally();
 
         // Check with multiple arguments.
         cache().put(k1, 1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
index 075476b..77079c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
@@ -97,7 +97,7 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         for (String key : keys)
             assertEquals((Integer)i++, nearCache.peek(key));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         for (String key : keys)
             assertNull(nearCache.peek(key));
@@ -112,14 +112,14 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends
GridCacheNe
 
         String first = F.first(keys);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertEquals((Integer)0, nearCache.peek(first));
         assertEquals(vals.get(first), primary.peek(first));
 
         nearCache.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertNull(nearCache.peek(first));
         assertFalse(primary.isEmpty());
@@ -137,7 +137,7 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         nearCache.put(first, 101);
         vals.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         for (String key : keys)
             assertEquals(vals.get(key), primary.peek(key));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index f338277..240a672 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -233,7 +233,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         for (String key : keys)
             assertEquals(vals.get(key), nearCache.peek(key));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         for (String key : keys)
             assertNull(nearCache.peek(key));
@@ -248,21 +248,21 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
 
         assertTrue(nearCache.lock(first, 0L));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         assertEquals(vals.get(first), nearCache.peek(first));
         assertEquals(vals.get(first), primary.peek(first));
 
         nearCache.unlock(first);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertEquals(vals.get(first), nearCache.peek(first));
         assertEquals(vals.get(first), primary.peek(first));
 
         nearCache.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         assertTrue(nearCache.isEmpty());
         assertFalse(primary.isEmpty());
@@ -280,7 +280,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         nearCache.put(first, 101);
         vals.put(first, 101);
 
-        nearCache.projection(gte100).clear(first);
+        nearCache.projection(gte100).clearLocally(first);
 
         for (String key : keys)
             assertEquals(vals.get(key), primary.peek(key));
@@ -319,7 +319,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         nearCache.putAll(vals);
 
         for (String subKey : subKeys)
-            nearCache.clear(subKey);
+            nearCache.clearLocally(subKey);
 
         for (String key : subKeys) {
             assertNull(nearCache.peek(key));
@@ -328,14 +328,14 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
 
         assertEquals(vals.get(lastKey), nearCache.peek(lastKey));
 
-        nearCache.clearAll();
+        nearCache.clearLocally();
 
         vals.put(lastKey, 102);
 
         nearCache.putAll(vals);
 
         for (String key : keys)
-            nearCache.projection(gte100).clear(key);
+            nearCache.projection(gte100).clearLocally(key);
 
         assertNull(nearCache.peek(lastKey));
 
@@ -345,7 +345,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
 
     /** {@inheritDoc} */
     @Override public void testGlobalClearAll() throws Exception {
-        // Save entries only on their primary nodes. If we didn't do so, clearAll() will
not remove all entries
+        // Save entries only on their primary nodes. If we didn't do so, clearLocally() will
not remove all entries
         // because some of them were blocked due to having readers.
         for (int i = 0; i < gridCount(); i++) {
             if (i != nearIdx)
@@ -353,7 +353,7 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
                     cache(i).put(key, 1);
         }
 
-        cache().globalClearAll();
+        cache().clear();
 
         for (int i = 0; i < gridCount(); i++)
             assertTrue(String.valueOf(cache(i).entrySet()), cache(i).isEmpty());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
index 9180151..795fee2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
@@ -109,7 +109,7 @@ public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTes
         int key = primaryKey0(grid(0), cache);
 
         cache.putx(key, 1);
-        cache.clear(key);
+        cache.clearLocally(key);
 
         for (int i = 0; i < GRID_CNT; i++) {
             GridCache cache0 = cacheForIndex(i);
@@ -120,7 +120,7 @@ public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTes
         }
 
         cache.putx(key, 1);
-        cache.clear(key);
+        cache.clearLocally(key);
 
         assertEquals(0, cache.size());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManagerSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManagerSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManagerSelfTest.java
index 0ec979d..6226063 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManagerSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/fs/GridGgfsDataManagerSelfTest.java
@@ -133,9 +133,9 @@ public class GridGgfsDataManagerSelfTest extends GridGgfsCommonAbstractTest
{
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         for (int i = 0; i < NODES_CNT; i++) {
-            grid(i).cachex(META_CACHE_NAME).clearAll();
+            grid(i).cachex(META_CACHE_NAME).clearLocally();
 
-            grid(i).cachex(DATA_CACHE_NAME).clearAll();
+            grid(i).cachex(DATA_CACHE_NAME).clearLocally();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java
index b781f59..6819d1c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheBenchmark.java
@@ -118,7 +118,7 @@ public class GridCacheBenchmark {
                     }
                 }, THREADS, WARM_UP_TIME);
 
-                cache.clearAll();
+                cache.clearLocally();
 
                 System.gc();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheLoadTest.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheLoadTest.java
index 75e032b..55d973c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheLoadTest.java
@@ -150,7 +150,7 @@ public final class GridCacheLoadTest extends GridCacheAbstractLoadTest
{
             if (LOAD)
                 test.loadTest(test.writeClos, test.readClos);
 
-            G.ignite().cache(null).clearAll();
+            G.ignite().cache(null).clearLocally();
 
             System.gc();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
index 213b634..2962153 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
@@ -83,7 +83,7 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest
{
         GridCache<?, ?> cache = cache();
 
         if (cache != null)
-            cache.clearAll();
+            cache.clearLocally();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateAccessStrategyAdapter.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateAccessStrategyAdapter.java
b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateAccessStrategyAdapter.java
index bb69773..0b45da4 100644
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateAccessStrategyAdapter.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/GridHibernateAccessStrategyAdapter.java
@@ -299,7 +299,7 @@ public abstract class GridHibernateAccessStrategyAdapter {
      */
     static void evictAll(CacheProjection<Object,Object> cache) throws CacheException
{
         try {
-            cache.globalClearAll();
+            cache.clear();
         }
         catch (IgniteCheckedException e) {
             throw new CacheException(e);
@@ -345,7 +345,7 @@ public abstract class GridHibernateAccessStrategyAdapter {
 
             assert cache != null;
 
-            cache.clear(key);
+            cache.clearLocally(key);
 
             return null;
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
index 8c886ae..d43a056 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
@@ -79,7 +79,7 @@ public class GridHibernateL2CacheConfigurationSelfTest extends GridCommonAbstrac
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         for (GridCache<?, ?> cache : grid(0).caches())
-            cache.clearAll();
+            cache.clearLocally();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
index 3aab215..1e824e7 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
@@ -1918,6 +1918,6 @@ public class GridHibernateL2CacheSelfTest extends GridCommonAbstractTest
{
         sesFactory2 = null;
 
         for (GridCache<?, ?> cache : grid(0).caches())
-            cache.globalClearAll();
+            cache.clear();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index 7c79018..c547161 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -175,7 +175,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest
{
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).cache(null).clearAll();
+        grid(0).cache(null).clearLocally();
     }
 
     /** Resets event counters. */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
index 7c93844..d181579 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -257,7 +257,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
         assert size(ValueObject.class) == PUT_CNT - 5;
 
         for (Integer key : keys)
-            cache.clear(key);
+            cache.clearLocally(key);
 
         assert cache.isEmpty();
         assertEquals(0, cache.size());
@@ -300,7 +300,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
 
         // Invalidate will remove entries.
         for (Integer key : keys)
-            cache.clear(key);
+            cache.clearLocally(key);
 
         assert cache.isEmpty();
         assertEquals(0, cache.size());
@@ -333,7 +333,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
             keys[i] = i;
 
         for (Integer key : keys)
-            cache.clear(key);
+            cache.clearLocally(key);
 
         assert cache.isEmpty();
         assertEquals(0, cache.size());
@@ -371,7 +371,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest
{
             keys[i] = i;
 
         for (Integer key : keys)
-            cache.clear(key);
+            cache.clearLocally(key);
 
         assert cache.isEmpty();
         assertEquals(0, cache.size());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
index 4feb06a..1ce43d1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
@@ -184,7 +184,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
      * @throws Exception If test failed.
      */
     public void testLocalQuery() throws Exception {
-        cache1.clearAll();
+        cache1.clearLocally();
 
         IgniteTx tx = cache1.txStart();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f02ce983/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
index ef7c968..a07ff6c 100644
--- a/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
+++ b/modules/visor-console/src/test/scala/org/apache/ignite/visor/commands/cache/VisorCacheCompactCommandSpec.scala
@@ -79,7 +79,7 @@ class VisorCacheCompactCommandSpec extends VisorRuntimeBaseSpec(2) {
     it should "show correct result for default cache" in {
         Ignition.ignite("node-1").cache[Int, Int](null).putAll(Map(1 -> 1, 2 -> 2,
3 -> 3))
 
-        Ignition.ignite("node-1").cache[Int, Int](null).clear(1)
+        Ignition.ignite("node-1").cache[Int, Int](null).clearLocally(1)
 
         VisorCacheCompactCommand().compact(Nil, None)
     }
@@ -87,7 +87,7 @@ class VisorCacheCompactCommandSpec extends VisorRuntimeBaseSpec(2) {
     it should "show correct result for named cache" in {
         Ignition.ignite("node-1").cache[Int, Int]("cache").putAll(Map(1 -> 1, 2 ->
2, 3 -> 3))
 
-        Ignition.ignite("node-1").cache[Int, Int]("cache").clear(1)
+        Ignition.ignite("node-1").cache[Int, Int]("cache").clearLocally(1)
 
         visor.cache("-compact -c=cache")
     }


Mime
View raw message