ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [2/2] incubator-ignite git commit: # IGNITE-56 Migration tests to IgniteCache
Date Mon, 09 Feb 2015 12:53:01 GMT
# IGNITE-56 Migration tests to IgniteCache


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/bf7d8766
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/bf7d8766
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/bf7d8766

Branch: refs/heads/ignite-96-tests
Commit: bf7d876617b1e725bbd135693754dfc3c1a44c6b
Parents: 8ad3ffc
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Feb 9 15:52:53 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Feb 9 15:52:53 2015 +0300

----------------------------------------------------------------------
 .../cache/GridCacheAbstractMetricsSelfTest.java |  41 +++---
 .../GridCacheAbstractRemoveFailureTest.java     |  11 +-
 .../cache/GridCacheAffinityApiSelfTest.java     |   2 +-
 .../cache/GridCacheAffinityRoutingSelfTest.java |  16 +-
 .../cache/GridCacheBasicApiAbstractTest.java    |   8 +-
 .../cache/GridCacheConcurrentMapSelfTest.java   |  73 ++++-----
 .../cache/GridCacheConcurrentMapTest.java       |  10 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |   6 +-
 ...idCacheConfigurationConsistencySelfTest.java |   2 +-
 .../GridCacheDaemonNodeAbstractSelfTest.java    |   8 +-
 .../cache/GridCacheDeploymentSelfTest.java      |  28 ++--
 .../cache/GridCacheEntryVersionSelfTest.java    |   6 +-
 .../GridCacheEvictionEventAbstractTest.java     |   2 +-
 .../GridCacheFinishPartitionsSelfTest.java      |  10 +-
 .../cache/GridCacheGlobalClearAllSelfTest.java  |  19 +--
 .../GridCacheGroupLockAbstractSelfTest.java     | 147 ++++++++++---------
 .../GridCacheGroupLockFailoverSelfTest.java     |   4 +-
 .../cache/GridCacheGroupLockPutTask.java        |  11 +-
 .../GridCacheInterceptorAbstractSelfTest.java   |   2 +-
 .../cache/GridCacheKeyCheckSelfTest.java        |   7 +-
 .../processors/cache/GridCacheLeakTest.java     |   3 +-
 .../GridCacheMarshallerTxAbstractTest.java      |  16 +-
 .../cache/GridCacheMemoryModeSelfTest.java      |   2 +-
 ...GridCacheMixedPartitionExchangeSelfTest.java |   5 +-
 .../cache/GridCacheMultiUpdateLockSelfTest.java |  10 +-
 ...ridCacheMultinodeUpdateAbstractSelfTest.java |   2 +-
 .../cache/GridCacheMvccManagerSelfTest.java     |   4 +-
 .../cache/GridCacheNestedTxAbstractTest.java    |   8 +-
 ...HeapMultiThreadedUpdateAbstractSelfTest.java |  68 ++-------
 ...CacheOffHeapMultiThreadedUpdateSelfTest.java |  76 ++--------
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  72 ++++-----
 ...heOffHeapTieredEvictionAbstractSelfTest.java |  16 +-
 .../cache/GridCacheOffheapUpdateSelfTest.java   |  28 ++--
 .../GridCacheOrderedPreloadingSelfTest.java     |   2 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |  10 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |  10 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |  11 +-
 .../GridCacheReferenceCleanupSelfTest.java      |  34 +++--
 .../cache/GridCacheReloadSelfTest.java          |   4 +-
 ...ridCacheReplicatedSynchronousCommitTest.java |   6 +-
 .../cache/GridCacheSlowTxWarnTest.java          |   6 +-
 .../processors/cache/GridCacheStopSelfTest.java |   5 +-
 .../cache/GridCacheStoreValueBytesSelfTest.java |   4 +-
 .../cache/GridCacheSwapPreloadSelfTest.java     |  12 +-
 .../GridCacheClientModesAbstractSelfTest.java   |   2 +-
 .../ignite/testframework/GridTestUtils.java     |   8 +
 .../junits/common/GridCommonAbstractTest.java   |  15 ++
 47 files changed, 383 insertions(+), 469 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
index 18b0a1c..11f26c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractMetricsSelfTest.java
@@ -458,8 +458,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testPutAllAvgTime() throws Exception {
-        IgniteCache<Integer, Integer> jcache = grid(0).jcache(null);
-        GridCache<Object, Object> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
         assertEquals(0.0, cache.metrics().getAveragePutTime(), 0.0);
         assertEquals(0, cache.metrics().getCachePuts());
@@ -470,7 +469,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         values.put(2, 2);
         values.put(3, 3);
 
-        jcache.putAll(values);
+        cache.putAll(values);
 
         float averagePutTime = cache.metrics().getAveragePutTime();
 
@@ -482,7 +481,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testPutsReads() throws Exception {
-        GridCache<Integer, Integer> cache0 = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache0 = grid(0).jcache(null);
 
         int keyCnt = keyCount();
 
@@ -493,7 +492,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         for (int i = 0; i < keyCnt; i++) {
             cache0.put(i, i); // +1 put
 
-            boolean isPrimary = cache0.affinity().isPrimary(grid(0).localNode(), i);
+            boolean isPrimary = affinity(cache0).isPrimary(grid(0).localNode(), i);
 
             expReads += expectedReadsPerPut(isPrimary);
             expMisses += expectedMissesPerPut(isPrimary);
@@ -501,7 +500,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
             info("Puts: " + cache0.metrics().getCachePuts());
 
             for (int j = 0; j < gridCount(); j++) {
-                GridCache<Integer, Integer> cache = grid(j).cache(null);
+                IgniteCache<Integer, Integer> cache = grid(j).jcache(null);
 
                 int cacheWrites = (int)cache.metrics().getCachePuts();
 
@@ -520,7 +519,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         int misses = 0;
 
         for (int i = 0; i < gridCount(); i++) {
-            CacheMetrics m = grid(i).cache(null).metrics();
+            CacheMetrics m = grid(i).jcache(null).metrics();
 
             puts += m.getCachePuts();
             reads += m.getCacheGets();
@@ -540,7 +539,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testMissHitPercentage() throws Exception {
-        GridCache<Integer, Integer> cache0 = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache0 = grid(0).jcache(null);
 
         int keyCnt = keyCount();
 
@@ -551,7 +550,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
             info("Puts: " + cache0.metrics().getCachePuts());
 
             for (int j = 0; j < gridCount(); j++) {
-                GridCache<Integer, Integer> cache = grid(j).cache(null);
+                IgniteCache<Integer, Integer> cache = grid(j).jcache(null);
 
                 long cacheWrites = cache.metrics().getCachePuts();
 
@@ -563,7 +562,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         // Check metrics for the whole cache.
         for (int i = 0; i < gridCount(); i++) {
-            CacheMetrics m = grid(i).cache(null).metrics();
+            CacheMetrics m = grid(i).jcache(null).metrics();
 
             assertEquals(m.getCacheHits() * 100f / m.getCacheGets(), m.getCacheHitPercentage(), 0.1f);
             assertEquals(m.getCacheMisses() * 100f / m.getCacheGets(), m.getCacheMissPercentage(), 0.1f);
@@ -574,7 +573,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testMisses() throws Exception {
-        GridCache<Integer, Integer> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
         int keyCnt = keyCount();
 
@@ -585,7 +584,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
             assertNull("Value is not null for key: " + i, cache.get(i));
 
             if (cache.configuration().getCacheMode() == CacheMode.REPLICATED ||
-                cache.affinity().isPrimary(grid(0).localNode(), i))
+                affinity(cache).isPrimary(grid(0).localNode(), i))
                 expReads++;
             else
                 expReads += 2;
@@ -598,7 +597,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         long misses = 0;
 
         for (int i = 0; i < gridCount(); i++) {
-            CacheMetrics m = grid(i).cache(null).metrics();
+            CacheMetrics m = grid(i).jcache(null).metrics();
 
             puts += m.getCachePuts();
             reads += m.getCacheGets();
@@ -616,7 +615,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testMissesOnEmptyCache() throws Exception {
-        GridCache<Integer, Integer> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
         assertEquals("Expected 0 read", 0, cache.metrics().getCacheGets());
         assertEquals("Expected 0 miss", 0, cache.metrics().getCacheMisses());
@@ -624,7 +623,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         Integer key =  null;
 
         for (int i = 0; i < 1000; i++) {
-            if (cache.affinity().isPrimary(grid(0).localNode(), i)) {
+            if (affinity(cache).isPrimary(grid(0).localNode(), i)) {
                 key = i;
 
                 break;
@@ -652,7 +651,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testRemoves() throws Exception {
-        GridCache<Integer, Integer> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
         cache.put(1, 1);
 
@@ -666,7 +665,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testManualEvictions() throws Exception {
-        GridCache<Integer, Integer> cache = grid(0).cache(null);
+        IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
         if (cache.configuration().getCacheMode() == CacheMode.PARTITIONED)
             return;
@@ -683,7 +682,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testTxEvictions() throws Exception {
-        if (grid(0).cache(null).configuration().getAtomicityMode() != CacheAtomicityMode.ATOMIC)
+        if (grid(0).jcache(null).configuration().getAtomicityMode() != CacheAtomicityMode.ATOMIC)
             checkTtl(true);
     }
 
@@ -691,7 +690,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testNonTxEvictions() throws Exception {
-        if (grid(0).cache(null).configuration().getAtomicityMode() == CacheAtomicityMode.ATOMIC)
+        if (grid(0).jcache(null).configuration().getAtomicityMode() == CacheAtomicityMode.ATOMIC)
             checkTtl(false);
     }
 
@@ -704,7 +703,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
         final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
 
-        final GridCache<Integer, Integer> c = grid(0).cache(null);
+        final IgniteCache<Integer, Integer> c = grid(0).jcache(null);
 
         final Integer key = primaryKeys(jcache(0), 1, 0).get(0);
 
@@ -871,8 +870,6 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         // Ensure that old TTL and expire time are not longer "visible".
         entry = ((IgniteKernal)grid(0)).internalCache().peekEx(key);
 
-        assert c.entry(key).getValue() == null;
-
         assertEquals(0, entry.ttl());
         assertEquals(0, entry.expireTime());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
index 3daa5ad..5d77462 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
@@ -26,6 +26,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.testframework.*;
 import org.jdk8.backport.*;
 
+import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -109,7 +110,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
      * @throws Exception If failed.
      */
     public void testPutAndRemove() throws Exception {
-        final GridCache<Integer, Integer> sndCache0 = grid(0).cache(null);
+        final IgniteCache<Integer, Integer> sndCache0 = grid(0).jcache(null);
 
         final AtomicBoolean stop = new AtomicBoolean();
 
@@ -145,7 +146,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
 
                                 break;
                             }
-                            catch (IgniteCheckedException e) {
+                            catch (CacheException e) {
                                 if (put)
                                     log.error("Put failed [key=" + key + ", val=" + i + ']', e);
                                 else
@@ -288,7 +289,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
         for (int i = 0; i < GRID_CNT; i++) {
             Ignite ignite = grid(i);
 
-            GridCache<Integer, Integer> cache = ignite.cache(null);
+            IgniteCache<Integer, Integer> cache = ignite.jcache(null);
 
             for (Map.Entry<Integer, GridTuple<Integer>> expVal : expVals.entrySet()) {
                 Integer val = cache.get(expVal.getKey());
@@ -296,8 +297,8 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCacheAbstra
                 if (!F.eq(expVal.getValue().get(), val)) {
                     failedKeys.add(expVal.getKey());
 
-                    boolean primary = cache.affinity().isPrimary(ignite.cluster().localNode(), expVal.getKey());
-                    boolean backup = cache.affinity().isBackup(ignite.cluster().localNode(), expVal.getKey());
+                    boolean primary = affinity(cache).isPrimary(ignite.cluster().localNode(), expVal.getKey());
+                    boolean backup = affinity(cache).isBackup(ignite.cluster().localNode(), expVal.getKey());
 
                     log.error("Unexpected cache data [exp=" + expVal + ", actual=" + val + ", nodePrimary=" + primary +
                         ", nodeBackup=" + backup + ", nodeId=" + ignite.cluster().localNode().id() + ']');

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
index 0ee6c00..4b58f70 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityApiSelfTest.java
@@ -325,6 +325,6 @@ public class GridCacheAffinityApiSelfTest extends GridCacheAbstractSelfTest {
         int expPart = affinity().partition(affinityMapper().affinityKey(key));
 
         for (int i = 0; i < gridCount(); i++)
-            assertEquals(expPart, grid(i).cache(null).affinity().partition(key));
+            assertEquals(expPart, grid(i).affinity(null).partition(key));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
index 64fa603..79dd588 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAffinityRoutingSelfTest.java
@@ -110,9 +110,9 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
         assert G.allGrids().size() == GRID_CNT;
 
         for (int i = 0; i < KEY_CNT; i++) {
-            grid(0).cache(null).put(i, i);
+            grid(0).jcache(null).put(i, i);
 
-            grid(0).cache(NON_DFLT_CACHE_NAME).put(i, i);
+            grid(0).jcache(NON_DFLT_CACHE_NAME).put(i, i);
         }
     }
 
@@ -305,7 +305,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             if (log.isDebugEnabled())
                 log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
 
-            CacheAffinity<Object> aff = ignite.cache(null).affinity();
+            CacheAffinity<Object> aff = ignite.affinity(null);
 
             return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey));
         }
@@ -361,7 +361,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             if (log.isDebugEnabled())
                 log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
 
-            CacheAffinity<Object> aff = ignite.cache(null).affinity();
+            CacheAffinity<Object> aff = ignite.affinity(null);
 
             return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey));
         }
@@ -421,7 +421,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             if (log.isDebugEnabled())
                 log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
 
-            CacheAffinity<Object> aff = ignite.cache(cacheName).affinity();
+            CacheAffinity<Object> aff = ignite.affinity(cacheName);
 
             return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey));
         }
@@ -485,7 +485,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             if (log.isDebugEnabled())
                 log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
 
-            CacheAffinity<Object> aff = ignite.cache(cacheName()).affinity();
+            CacheAffinity<Object> aff = ignite.affinity(cacheName());
 
             return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey));
         }
@@ -533,7 +533,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
             if (log.isDebugEnabled())
                 log.debug("Running job [node=" + ignite.cluster().localNode().id() + ", job=" + this + "]");
 
-            CacheAffinity<Object> aff = ignite.cache(null).affinity();
+            CacheAffinity<Object> aff = ignite.affinity(null);
 
             return F.eqNodes(ignite.cluster().localNode(), aff.mapKeyToNode(affKey));
         }
@@ -572,7 +572,7 @@ public class GridCacheAffinityRoutingSelfTest extends GridCommonAbstractTest {
         @Override protected Collection<? extends ComputeJob> split(int gridSize, Integer arg) {
             return F.asList(new ComputeJobAdapter() {
                 @Override public Object execute() {
-                    CacheAffinity<Object> aff = ignite.cache(null).affinity();
+                    CacheAffinity<Object> aff = ignite.affinity(null);
 
                     ClusterNode primary = aff.mapKeyToNode(affKey);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
index b23a46d..c1d7f94 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
@@ -430,7 +430,7 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe
      * @throws Exception If error occur.
      */
     public void testBasicOps() throws Exception {
-        GridCache<Integer, String> cache = ignite.cache(null);
+        IgniteCache<Integer, String> cache = ignite.jcache(null);
 
         CountDownLatch latch = new CountDownLatch(1);
 
@@ -594,19 +594,19 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe
      * @throws IgniteCheckedException If test failed.
      */
     public void testGetPutRemove() throws IgniteCheckedException {
-        GridCache<Integer, String> cache = ignite.cache(null);
+        IgniteCache<Integer, String> cache = ignite.jcache(null);
 
         int key = (int)System.currentTimeMillis();
 
         assert cache.get(key) == null;
-        assert cache.put(key, "1") == null;
+        assert cache.getAndPut(key, "1") == null;
 
         String val = cache.get(key);
 
         assert val != null;
         assert "1".equals(val);
 
-        val = cache.remove(key);
+        val = cache.getAndRemove(key);
 
         assert val != null;
         assert "1".equals(val);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java
index 1b10843..a29df74 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapSelfTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
-import org.apache.ignite.cache.*;
+import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -75,7 +75,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRehash() throws Exception {
-        GridCache<Integer, String> c = grid().cache(null);
+        IgniteCache<Integer, String> c = grid().jcache(null);
 
         int cnt = 100 * 1024;
 
@@ -93,7 +93,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
 
         int idx = 0;
 
-        for (Cache.Entry<Integer, String> e : c.entrySet()) {
+        for (Cache.Entry<Integer, String> e : c) {
             assertNotNull(e.getValue());
 
             idx++;
@@ -106,7 +106,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRehashRandom() throws Exception {
-        GridCache<Integer, String> c = grid().cache(null);
+        IgniteCache<Integer, String> c = grid().jcache(null);
 
         int cnt = 100 * 1024;
 
@@ -132,7 +132,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
 
         int idx = 0;
 
-        for (Cache.Entry<Integer, String> e : c.entrySet()) {
+        for (Cache.Entry<Integer, String> e : c) {
             assertNotNull(e.getValue());
 
             idx++;
@@ -154,15 +154,13 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
         multithreaded(new Callable<Object>() {
             @SuppressWarnings("UnusedAssignment")
             @Override public Object call() throws Exception {
-                GridCache<Integer, String> c = grid().cache(null);
+                IgniteCache<Integer, String> c = grid().jcache(null);
 
                 int tid = tidGen.getAndIncrement();
 
                 int start = 2 * 1024 * tid;
 
-                Iterator<String> it1 = null;
-                Iterator<Cache.Entry<Integer, String>> it2 = null;
-                Iterator<Integer> it3 = null;
+                Iterator<Cache.Entry<Integer, String>> it = null;
 
                 boolean created = false;
 
@@ -170,14 +168,8 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
                     int key = i % cnt;
 
                     if (!created && i >= start + tid * 100) {
-                        if (it1 == null)
-                            it1 = c.values().iterator();
-
-                        if (it2 == null)
-                            it2 = c.entrySet().iterator();
-
-                        if (it3 == null)
-                            it3 = c.keySet().iterator();
+                        if (it == null)
+                            it = c.iterator();
 
                         created = true;
                     }
@@ -188,19 +180,11 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
                 }
 
                 // Go through iterators.
-                while(it1.hasNext())
-                    it1.next();
-
-                while(it2.hasNext())
-                    it2.next();
-
-                while(it3.hasNext())
-                    it3.next();
+                while(it.hasNext())
+                    it.next();
 
                 // Make sure that hard references are gone.
-                it1 = null;
-                it2 = null;
-                it3 = null;
+                it = null;
 
                 for (int i = start; i < start + cnt; i++) {
                     int key = i % cnt;
@@ -212,7 +196,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
 
                 int idx = 0;
 
-                for (Cache.Entry<Integer, String> e : c.entrySet()) {
+                for (Cache.Entry<Integer, String> e : c) {
                     assertNotNull(e.getValue());
 
                     idx++;
@@ -250,15 +234,15 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
         multithreaded(new Callable<Object>() {
             @SuppressWarnings("UnusedAssignment")
             @Override public Object call() throws Exception {
-                GridCache<Integer, String> c = grid().cache(null);
+                IgniteCache<Integer, String> c = grid().jcache(null);
 
                 int tid = tidGen.getAndIncrement();
 
                 int start = 2 * 1024 * tid;
 
-                Iterator<String> it1 = null;
+                Iterator<Cache.Entry<Integer, String>> it1 = null;
                 Iterator<Cache.Entry<Integer, String>> it2 = null;
-                Iterator<Integer> it3 = null;
+                Iterator<Cache.Entry<Integer, String>> it3 = null;
 
                 boolean forgot = false;
 
@@ -267,13 +251,13 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
 
                     if (!forgot && i >= start + tid * 100) {
                         if (it1 == null)
-                            it1 = c.values().iterator();
+                            it1 = c.iterator();
 
                         if (it2 == null)
-                            it2 = c.entrySet().iterator();
+                            it2 = c.iterator();
 
                         if (it3 == null)
-                            it3 = c.keySet().iterator();
+                            it3 = c.iterator();
                     }
 
                     c.put(key, Integer.toString(key));
@@ -307,7 +291,7 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
 
                 int idx = 0;
 
-                for (Cache.Entry<Integer, String> e : c.entrySet()) {
+                for (Cache.Entry<Integer, String> e : c) {
                     assertNotNull(e.getValue());
 
                     idx++;
@@ -337,30 +321,23 @@ public class GridCacheConcurrentMapSelfTest extends GridCommonAbstractTest {
      */
     @SuppressWarnings("ResultOfObjectAllocationIgnored")
     public void testEmptyWeakIterator() throws Exception {
-        final GridCache<Integer, String> c = grid().cache(null);
+        final IgniteCache<Integer, String> c = grid().jcache(null);
 
         for (int i = 0; i < 100; i++) {
             multithreaded(new Callable<Object>() {
                 @SuppressWarnings("UnusedAssignment")
                 @Override public Object call() throws Exception {
-                    Iterator<String> it1 = c.values().iterator();
-                    Iterator<Cache.Entry<Integer, String>> it2 = c.entrySet().iterator();
-                    Iterator<Integer> it3 = c.keySet().iterator();
+                    Iterator<Cache.Entry<Integer, String>> it = c.iterator();
 
                     for (int i = 0; i < 1000; i++) {
                         c.put(i, String.valueOf(i));
 
-                        if (i == 0) {
-                            it1.hasNext();
-                            it2.hasNext();
-                            it3.hasNext();
-                        }
+                        if (i == 0)
+                            it.hasNext();
                     }
 
                     // Make sure that hard references are gone.
-                    it1 = null;
-                    it2 = null;
-                    it3 = null;
+                    it = null;
 
                     System.gc();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
index 7aa81bb..dcfc809 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -64,14 +65,15 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).cache(null).removeAll();
+        grid(0).jcache(null).removeAll();
     }
 
     /**
+     * todo uncomment when IGNITE-203 will be done.
      * @throws Exception If failed.
      */
-    public void testRandomEntry() throws Exception {
-        GridCache<String, String> cache = grid(0).cache(null);
+    public void _testRandomEntry() throws Exception {
+        IgniteCache<String, String> cache = grid(0).jcache(null);
 
         for (int i = 0; i < 500; i++)
             cache.put("key" + i, "val" + i);
@@ -89,7 +91,7 @@ public class GridCacheConcurrentMapTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testRandomEntryMultiThreaded() throws Exception {
-        final GridCache<String, String> cache = grid(0).cache(null);
+        final IgniteCache<String, String> cache = grid(0).jcache(null);
 
         final AtomicBoolean done = new AtomicBoolean();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 4e84d72..5cfbacf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -616,12 +616,10 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
          *
          */
         private void doWork()  {
-            GridCache cache = ignite.cache(null);
-
             Session ses = new Session(terminalId());
 
             try {
-                try (IgniteTx tx = cache.txStart()) {
+                try (IgniteTx tx = ignite.transactions().txStart()) {
                     Request req = new Request(getId());
 
                     req.setMessageId(getId());
@@ -729,7 +727,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
         private <T> Object get(String cacheKey, String terminalId) throws IgniteCheckedException {
             Object key = new CacheAffinityKey<>(cacheKey, terminalId);
 
-            return (T) ignite.cache(null).get(key);
+            return (T) ignite.jcache(null).get(key);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
index 916681c..7421fce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
@@ -187,7 +187,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
         cacheMode = null;
         depMode = SHARED;
 
-        assert startGrid(1).cache("myCache").configuration().getCacheMode() == CacheConfiguration.DFLT_CACHE_MODE;
+        assert startGrid(1).jcache("myCache").configuration().getCacheMode() == CacheConfiguration.DFLT_CACHE_MODE;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
index 2aad0d7..56f08e7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDaemonNodeAbstractSelfTest.java
@@ -95,7 +95,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst
 
             startGrid(4);
 
-            GridCache<Integer, Integer> cache = grid(0).cache(null);
+            IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
             for (int i = 0; i < 30; i++)
                 cache.put(i, i);
@@ -126,10 +126,10 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst
 
             startGrid(4);
 
-            GridCache<Integer, Integer> cache = grid(0).cache(null);
+            IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
             for (int i = 0; i < 30; i++) {
-                try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+                try (IgniteTx tx = ignite(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                     cache.put(i, i);
 
                     tx.commit();
@@ -141,7 +141,7 @@ public abstract class GridCacheDaemonNodeAbstractSelfTest extends GridCommonAbst
             for (int i = 30; i < 60; i++)
                 batch.put(i, i);
 
-            try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+            try (IgniteTx tx = ignite(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                 cache.putAll(batch);
                 tx.commit();
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
index c8a7283..26c73a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentSelfTest.java
@@ -206,14 +206,14 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             stopGrid(GRID_NAME);
 
             for (int i = 0; i < 10; i++) {
-                if (g1.cache(null).isEmpty() && g2.cache(null).isEmpty())
+                if (g1.jcache(null).isEmpty() && g2.jcache(null).isEmpty())
                     break;
 
                 U.sleep(500);
             }
 
-            assert g1.cache(null).isEmpty();
-            assert g2.cache(null).isEmpty();
+            assert g1.jcache(null).isEmpty();
+            assert g2.jcache(null).isEmpty();
 
             startGrid(3);
         }
@@ -255,11 +255,11 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
 
             stopGrid(GRID_NAME);
 
-            assert g1.cache(null).size() == 1;
-            assert g1.cache(null).size() == 1;
+            assert g1.jcache(null).localSize() == 1;
+            assert g1.jcache(null).localSize() == 1;
 
-            assert g2.cache(null).size() == 1;
-            assert g2.cache(null).size() == 1;
+            assert g2.jcache(null).localSize() == 1;
+            assert g2.jcache(null).localSize() == 1;
 
             startGrid(3);
         }
@@ -294,7 +294,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
 
             info("Key: " + key);
 
-            GridCache<Object, Object> cache = g0.cache(null);
+            IgniteCache<Object, Object> cache = g0.jcache(null);
 
             assert cache != null;
 
@@ -402,7 +402,7 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
 
             Ignite g = startGrid(0);
 
-            g.cache(null).put(0, valCls.newInstance());
+            g.jcache(null).put(0, valCls.newInstance());
 
             info("Added value to cache 0.");
 
@@ -438,9 +438,9 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             }
             while (!g1.cluster().mapKeyToNode(null, affKey).id().equals(g1.cluster().localNode().id()));
 
-            GridCache<Object, Object> cache = g1.cache(null);
+            IgniteCache<Object, Object> cache = g1.jcache(null);
 
-            try (IgniteTx tx = cache.txStartAffinity(affKey, PESSIMISTIC, REPEATABLE_READ, 0, 1)) {
+            try (IgniteTx tx = g1.transactions().txStartAffinity(null, affKey, PESSIMISTIC, REPEATABLE_READ, 0, 1)) {
                 cache.put(new CacheAffinityKey<>("key1", affKey), "val1");
 
                 tx.commit();
@@ -471,9 +471,9 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
         info("Near: " + near);
 
         for (int i = start; i < start + 10000; i++) {
-            if (g.cache(null).affinity().isPrimary(primary, i) && g.cache(null).affinity().isBackup(backup, i)) {
-                assert !g.cache(null).affinity().isPrimary(near, i) : "Key: " + i;
-                assert !g.cache(null).affinity().isBackup(near, i) : "Key: " + i;
+            if (g.affinity(null).isPrimary(primary, i) && g.affinity(null).isBackup(backup, i)) {
+                assert !g.affinity(null).isPrimary(near, i) : "Key: " + i;
+                assert !g.affinity(null).isBackup(near, i) : "Key: " + i;
 
                 return i;
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java
index 40ce6fb..03f15cd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEntryVersionSelfTest.java
@@ -97,10 +97,10 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest {
 
             for (Integer key : map.keySet()) {
                 info("Affinity nodes [key=" + key + ", nodes=" +
-                    F.viewReadOnly(grid(0).cache(null).affinity().mapKeyToPrimaryAndBackups(key), F.node2id()) + ']');
+                    F.viewReadOnly(grid(0).affinity(null).mapKeyToPrimaryAndBackups(key), F.node2id()) + ']');
             }
 
-            grid(0).cache(null).putAll(map);
+            grid(0).jcache(null).putAll(map);
 
             for (int g = 0; g < 3; g++) {
                 IgniteKernal grid = (IgniteKernal)grid(g);
@@ -127,7 +127,7 @@ public class GridCacheEntryVersionSelfTest extends GridCommonAbstractTest {
 
             startGrid(3);
 
-            grid(0).cache(null).putAll(map);
+            grid(0).jcache(null).putAll(map);
 
             for (int g = 0; g < 4; g++) {
                 IgniteKernal grid = (IgniteKernal)grid(g);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
index 28ffef9..d957410 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
@@ -108,7 +108,7 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
             }
         }, EventType.EVT_CACHE_ENTRY_EVICTED);
 
-        GridCache<String, String> c = g.cache(null);
+        IgniteCache<String, String> c = g.jcache(null);
 
         c.put("1", "val1");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java
index 0ef71a8..cfbe44c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFinishPartitionsSelfTest.java
@@ -84,7 +84,7 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
         String key = "key";
         String val = "value";
 
-        GridCache<String, String> cache = grid.cache(null);
+        IgniteCache<String, String> cache = grid.jcache(null);
 
         int keyPart = grid.<String, String>internalCache().context().affinity().partition(key);
 
@@ -127,9 +127,9 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
                 if (barrier.await() == 0)
                     start.set(System.currentTimeMillis());
 
-                GridCache<String, String> cache = grid(0).cache(null);
+                IgniteCache<String, String> cache = grid(0).jcache(null);
 
-                IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ);
+                IgniteTx tx = grid(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
 
                 cache.get(key);
 
@@ -187,9 +187,9 @@ public class GridCacheFinishPartitionsSelfTest extends GridCacheAbstractSelfTest
      * @throws Exception If failed.
      */
     public void testMvccFinishKeys() throws Exception {
-        GridCache<String, Integer> cache = grid(0).cache(null);
+        IgniteCache<String, Integer> cache = grid(0).jcache(null);
 
-        try (IgniteTx tx = cache.txStart(PESSIMISTIC, REPEATABLE_READ)) {
+        try (IgniteTx tx = grid(0).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
             final String key = "key";
 
             cache.get(key);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/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 18f5aa1..565400f 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
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -29,7 +30,7 @@ import static org.apache.ignite.cache.CacheDistributionMode.*;
 import static org.apache.ignite.cache.CacheMode.*;
 
 /**
- * Test {@link org.apache.ignite.cache.GridCache#clear()} operation in multinode environment with nodes
+ * Test {@link IgniteCache#clear()} operation in multinode environment with nodes
  * having caches with different names.
  */
 public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest {
@@ -139,29 +140,29 @@ public class GridCacheGlobalClearAllSelfTest extends GridCommonAbstractTest {
     public void performTest() throws Exception {
         // Put values into normal replicated cache.
         for (int i = 0; i < KEY_CNT; i++)
-            grid(0).cache(CACHE_NAME).put(i, "val" + i);
+            grid(0).jcache(CACHE_NAME).put(i, "val" + i);
 
         // Put values into a cache with another name.
         for (int i = 0; i < KEY_CNT_OTHER; i++)
-            grid(GRID_CNT - 1).cache(CACHE_NAME_OTHER).put(i, "val" + i);
+            grid(GRID_CNT - 1).jcache(CACHE_NAME_OTHER).put(i, "val" + i);
 
         // Check cache sizes.
         for (int i = 0; i < GRID_CNT - 1; i++) {
-            GridCache<Object, Object> cache = grid(i).cache(CACHE_NAME);
+            IgniteCache<Object, Object> cache = grid(i).jcache(CACHE_NAME);
 
-            assertEquals("Key set [i=" + i + ", keys=" + cache.keySet() + ']', KEY_CNT, cache.size());
+            assertEquals("Key set [i=" + i + ']', KEY_CNT, cache.localSize());
         }
 
-        assert grid(GRID_CNT - 1).cache(CACHE_NAME_OTHER).size() == KEY_CNT_OTHER;
+        assert grid(GRID_CNT - 1).jcache(CACHE_NAME_OTHER).localSize() == KEY_CNT_OTHER;
 
         // Perform clear.
-        grid(0).cache(CACHE_NAME).clear();
+        grid(0).jcache(CACHE_NAME).clear();
 
         // Expect caches with the given name to be clear on all nodes.
         for (int i = 0; i < GRID_CNT - 1; i++)
-            assert grid(i).cache(CACHE_NAME).isEmpty();
+            assert grid(i).jcache(CACHE_NAME).isEmpty();
 
         // ... but cache with another name should remain untouched.
-        assert grid(GRID_CNT - 1).cache(CACHE_NAME_OTHER).size() == KEY_CNT_OTHER;
+        assert grid(GRID_CNT - 1).jcache(CACHE_NAME_OTHER).localSize() == KEY_CNT_OTHER;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
index 7838d9a..5ab5ada 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
@@ -158,12 +158,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
 
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         CacheAffinityKey<String> key1;
         CacheAffinityKey<String> key2;
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -189,12 +189,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
     }
@@ -226,7 +226,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         // Populate cache.
         cache.putAll(F.asMap(
@@ -237,19 +237,19 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -258,7 +258,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             assertEquals("Unexpected number of unlock events: " + unlocks.affectedKeys(), 0, unlocks.affectedKeys().size());
 
 
-            cache.removeAll(F.asList(key1, key2));
+            cache.removeAll(F.asSet(key1, key2));
 
             tx.commit();
         }
@@ -270,12 +270,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertNull("For index: " + i, gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertNull("For index: " + i, gCache.peek(key2));
         }
     }
@@ -307,7 +307,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         // Populate cache.
         cache.putAll(F.asMap(
@@ -318,19 +318,19 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -383,9 +383,9 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
         }
 
@@ -474,9 +474,9 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
         }
 
@@ -494,9 +494,9 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             for (int i = 0; i < gridCount(); i++) {
                 Ignite g = grid(i);
 
-                GridCache<Object, Object> gCache = g.cache(null);
+                IgniteCache<Object, Object> gCache = g.jcache(null);
 
-                if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+                if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                     assertEquals("For index: " + i, "val01", gCache.peek(key1));
             }
         }
@@ -532,13 +532,15 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
 
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        GridCache<UUID, String> cache = grid(0).cache(null);
+        IgniteCache<UUID, String> cache = grid(0).jcache(null);
 
         UUID key1;
         UUID key2;
 
-        try (IgniteTx tx = cache.txStartPartition(cache.affinity().partition(affinityKey), concurrency,
-            READ_COMMITTED, 0, 2)) {
+        CacheAffinity<UUID> affinity = grid(0).affinity(null);
+
+        try (IgniteTx tx = grid(0).transactions().txStartPartition(null, affinity.partition(affinityKey),
+            concurrency, READ_COMMITTED, 0, 2)) {
             // Note that events are not generated for internal keys.
             assertEquals("Unexpected number of lock events: " + locks.affectedKeys(), 0, locks.affectedKeys().size());
             assertEquals("Unexpected number of unlock events: " + unlocks.affectedKeys(), 0,
@@ -548,7 +550,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
 
             GridCacheAffinityManager<Object, Object> affMgr = cacheAdapter.context().affinity();
 
-            GridPartitionLockKey partAffKey = affMgr.partitionAffinityKey(cache.affinity().partition(affinityKey));
+            GridPartitionLockKey partAffKey = affMgr.partitionAffinityKey(affinity.partition(affinityKey));
 
             if (concurrency == PESSIMISTIC)
                 assertTrue(cacheAdapter.entryEx(partAffKey).lockedByThread());
@@ -556,12 +558,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             do {
                 key1 = UUID.randomUUID();
             }
-            while (cache.affinity().partition(key1) != cache.affinity().partition(affinityKey));
+            while (affinity.partition(key1) != affinity.partition(affinityKey));
 
             do {
                 key2 = UUID.randomUUID();
             }
-            while (cache.affinity().partition(key2) != cache.affinity().partition(affinityKey));
+            while (affinity.partition(key2) != affinity.partition(affinityKey));
 
             cache.putAll(F.asMap(
                 key1, "val1",
@@ -578,12 +580,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
     }
@@ -658,7 +660,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         // Populate cache.
         cache.putAll(F.asMap(
@@ -669,19 +671,19 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, isolation, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, isolation, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -719,12 +721,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, isolation, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, isolation, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -750,12 +752,12 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val01", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val02", gCache.peek(key2));
         }
     }
@@ -802,7 +804,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         // Populate cache.
         cache.putAll(F.asMap(
@@ -813,19 +815,19 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, isolation, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, isolation, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -883,7 +885,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         // Populate cache.
         cache.putAll(F.asMap(
@@ -894,19 +896,20 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
         grid(0).events().localListen(unlocks, EVT_CACHE_OBJECT_UNLOCKED);
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
+        try (IgniteTx tx = grid(0).transactions()
+            .txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 2)) {
             if (concurrency == PESSIMISTIC)
                 assertTrue("Failed to wait for lock events: " + affinityKey, locks.awaitKeys(WAIT_TIMEOUT, affinityKey));
             else
@@ -988,19 +991,20 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
     private void checkGroupLockPutWrongKey(IgniteTxConcurrency concurrency) throws Exception {
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        final GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        final IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
-        try (IgniteTx ignored = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 1)) {
+        try (IgniteTx ignored = grid(0).transactions()
+            .txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 1)) {
             // Key with affinity key different from enlisted on tx start should raise exception.
             cache.put(new CacheAffinityKey<>("key1", UUID.randomUUID()), "val1");
 
             fail("Exception should be thrown");
         }
-        catch (IgniteCheckedException ignored) {
+        catch (IgniteException ignored) {
             // Expected exception.
         }
 
-        assertNull(cache.tx());
+        assertNull(grid(0).transactions().tx());
     }
 
     /**
@@ -1024,23 +1028,24 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
     private void checkGroupLockRemoveWrongKey(IgniteTxConcurrency concurrency) throws Exception {
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        final GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        final IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         final CacheAffinityKey<String> key = new CacheAffinityKey<>("key1", UUID.randomUUID());
 
         cache.put(key, "val");
 
-        try (IgniteTx ignored = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 1)) {
+        try (IgniteTx ignored = grid(0).transactions()
+            .txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 1)) {
             // Key with affinity key different from enlisted on tx start should raise exception.
             cache.remove(key);
 
             fail("Exception should be thrown.");
         }
-        catch (IgniteCheckedException ignored) {
+        catch (IgniteException ignored) {
             // Expected exception.
         }
 
-        assertNull(cache.tx());
+        assertNull(grid(0).transactions().tx());
     }
 
     /**
@@ -1080,7 +1085,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         throws Exception {
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        final GridCache<Object, String> cache = grid(0).cache(null);
+        final IgniteCache<Object, String> cache = grid(0).jcache(null);
 
         final CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         final CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
@@ -1089,7 +1094,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         cache.put(key1, "0");
         cache.put(key2, "0");
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, isolation, 0, 3)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, isolation, 0, 3)) {
             assertEquals("0", cache.get(affinityKey));
             assertEquals("0", cache.get(key1));
             assertEquals("0", cache.get(key2));
@@ -1131,7 +1136,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
     private void checkGroupLockWriteThrough(IgniteTxConcurrency concurrency) throws Exception {
         UUID affinityKey = primaryKeyForCache(grid(0));
 
-        GridCache<CacheAffinityKey<String>, String> cache = grid(0).cache(null);
+        IgniteCache<CacheAffinityKey<String>, String> cache = grid(0).jcache(null);
 
         CacheAffinityKey<String> key1 = new CacheAffinityKey<>("key1", affinityKey);
         CacheAffinityKey<String> key2 = new CacheAffinityKey<>("key2", affinityKey);
@@ -1144,7 +1149,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             key3, "val3",
             key4, "val4");
 
-        try (IgniteTx tx = cache.txStartAffinity(affinityKey, concurrency, READ_COMMITTED, 0, 4)) {
+        try (IgniteTx tx = grid(0).transactions().txStartAffinity(null, affinityKey, concurrency, READ_COMMITTED, 0, 4)) {
             cache.put(key1, "val1");
             cache.put(key2, "val2");
             cache.put(key3, "val3");
@@ -1156,18 +1161,18 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            GridCache<Object, Object> gCache = g.cache(null);
+            IgniteCache<Object, Object> gCache = g.jcache(null);
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key1))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
                 assertEquals("For index: " + i, "val1", gCache.peek(key1));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key2))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
                 assertEquals("For index: " + i, "val2", gCache.peek(key2));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key3))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key3))
                 assertEquals("For index: " + i, "val3", gCache.peek(key3));
 
-            if (gCache.affinity().isPrimaryOrBackup(g.cluster().localNode(), key4))
+            if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key4))
                 assertEquals("For index: " + i, "val4", gCache.peek(key4));
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
index 6310175..a7d8b64 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockFailoverSelfTest.java
@@ -267,7 +267,7 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
             int primaryCacheSize = 0;
 
             for (Ignite g : runningWorkers) {
-                info(">>>>> " + g.cache(CACHE_NAME).size());
+                info(">>>>> " + g.jcache(CACHE_NAME).localSize());
 
                 primaryCacheSize += g.cache(CACHE_NAME).primarySize();
             }
@@ -381,7 +381,7 @@ public class GridCacheGroupLockFailoverSelfTest extends GridCommonAbstractTest {
 
         Collection<Integer> ret = new ArrayList<>(keys.size());
 
-        GridCache<Object, Object> cache = workerNode.cache(CACHE_NAME);
+        IgniteCache<Object, Object> cache = workerNode.jcache(CACHE_NAME);
 
         for (Integer key : keys) {
             if (cache.get(key) == null) // Key is absent.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockPutTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockPutTask.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockPutTask.java
index d17be2f..5c96fcc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockPutTask.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheGroupLockPutTask.java
@@ -94,7 +94,7 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
                     try {
                         log.info("Going to put data: " + data.size());
 
-                        GridCache<Object, Object> cache = ignite.cache(cacheName);
+                        IgniteCache<Object, Object> cache = ignite.jcache(cacheName);
 
                         assert cache != null;
 
@@ -106,8 +106,9 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
                             Object affKey = pair.get1();
 
                             // Group lock partition.
-                            try (IgniteTx tx = cache.txStartPartition(cache.affinity().partition(affKey),
-                                optimistic ? OPTIMISTIC : PESSIMISTIC, REPEATABLE_READ, 0, pair.get2().size())) {
+                            try (IgniteTx tx = ignite.transactions().txStartPartition(cacheName,
+                                ignite.affinity(cacheName).partition(affKey), optimistic ? OPTIMISTIC : PESSIMISTIC,
+                                REPEATABLE_READ, 0, pair.get2().size())) {
                                 for (Integer val : pair.get2())
                                     cache.put(val, val);
 
@@ -131,12 +132,10 @@ class GridCacheGroupLockPutTask extends ComputeTaskAdapter<Collection<Integer>,
                  * @return Grouped map.
                  */
                 private Map<Integer, T2<Integer, Collection<Integer>>> groupData(Iterable<Integer> data) {
-                    GridCache<Object, Object> cache = ignite.cache(cacheName);
-
                     Map<Integer, T2<Integer, Collection<Integer>>> res = new HashMap<>();
 
                     for (Integer val : data) {
-                        int part = cache.affinity().partition(val);
+                        int part = ignite.affinity(cacheName).partition(val);
 
                         T2<Integer, Collection<Integer>> tup = res.get(part);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
index 1b3ba1e..8e4f055 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
@@ -1446,7 +1446,7 @@ public abstract class GridCacheInterceptorAbstractSelfTest extends GridCacheAbst
 
         try {
             for (int i = 0; i < gridCount(); i++)
-                assertEquals("Unexpected value for grid " + i, expVal, grid(i).cache(null).get(key));
+                assertEquals("Unexpected value for grid " + i, expVal, grid(i).jcache(null).get(key));
         }
         finally {
             interceptor.disabled = false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
index d44c603..06c5907 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheKeyCheckSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -128,7 +129,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
         this.atomicityMode = atomicityMode;
 
         try {
-            GridCache<IncorrectCacheKey, String> cache = grid(0).cache(null);
+            IgniteCache<IncorrectCacheKey, String> cache = grid(0).jcache(null);
 
             cache.get(new IncorrectCacheKey(0));
 
@@ -148,7 +149,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
         this.atomicityMode = atomicityMode;
 
         try {
-            GridCache<IncorrectCacheKey, String> cache = grid(0).cache(null);
+            IgniteCache<IncorrectCacheKey, String> cache = grid(0).jcache(null);
 
             cache.put(new IncorrectCacheKey(0), "test_value");
 
@@ -168,7 +169,7 @@ public class GridCacheKeyCheckSelfTest extends GridCacheAbstractSelfTest {
         this.atomicityMode = atomicityMode;
 
         try {
-            GridCache<IncorrectCacheKey, String> cache = grid(0).cache(null);
+            IgniteCache<IncorrectCacheKey, String> cache = grid(0).jcache(null);
 
             cache.remove(new IncorrectCacheKey(0));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
index 8f1c3af..23e8109 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLeakTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.cache;
 
+import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.rendezvous.*;
 import org.apache.ignite.configuration.*;
@@ -108,7 +109,7 @@ public class GridCacheLeakTest extends GridCommonAbstractTest {
         try {
             int i = 0;
 
-            GridCache<Object, Object> cache = grid(0).cache(CACHE_NAME);
+            IgniteCache<Object, Object> cache = grid(0).jcache(CACHE_NAME);
 
             while (!Thread.currentThread().isInterrupted()) {
                 UUID key = UUID.randomUUID();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
index 07be4b8..a755055 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMarshallerTxAbstractTest.java
@@ -91,9 +91,9 @@ public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstra
         String key2 = UUID.randomUUID().toString();
         GridCacheWrongValue1 wrongValue = new GridCacheWrongValue1();
 
-        IgniteTx tx = grid().cache(null).txStart(PESSIMISTIC, REPEATABLE_READ);
+        IgniteTx tx = grid().transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
         try {
-            grid().cache(null).put(key, value);
+            grid().jcache(null).put(key, value);
 
             tx.commit();
         }
@@ -101,14 +101,14 @@ public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstra
             tx.close();
         }
 
-        tx = grid().cache(null).txStart(PESSIMISTIC, REPEATABLE_READ);
+        tx = grid().transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
 
         try {
-            assert value.equals(grid().cache(null).get(key));
+            assert value.equals(grid().jcache(null).get(key));
 
-            grid().cache(null).put(key, newValue);
+            grid().jcache(null).put(key, newValue);
 
-            grid().cache(null).put(key2, wrongValue);
+            grid().jcache(null).put(key2, wrongValue);
 
             tx.commit();
         }
@@ -116,10 +116,10 @@ public abstract class GridCacheMarshallerTxAbstractTest extends GridCommonAbstra
             tx.close();
         }
 
-        tx = grid().cache(null).txStart(PESSIMISTIC, REPEATABLE_READ);
+        tx = grid().transactions().txStart(PESSIMISTIC, REPEATABLE_READ);
 
         try {
-            String locVal = (String)grid().cache(null).get(key);
+            String locVal = (String)grid().jcache(null).get(key);
 
             assert locVal != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bf7d8766/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
index c1a84c3..60a5925 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
@@ -185,7 +185,7 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
 
         Ignite g = startGrid();
 
-        CacheConfiguration cfg = g.cache(null).configuration();
+        CacheConfiguration cfg = g.jcache(null).configuration();
 
         assertEquals(memoryMode, cfg.getMemoryMode());
         assertEquals(0, cfg.getOffHeapMaxMemory());


Mime
View raw message