ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yzhda...@apache.org
Subject [18/50] [abbrv] incubator-ignite git commit: # IGNITE-56 Inline temporary methods.
Date Thu, 12 Feb 2015 09:44:43 GMT
# IGNITE-56 Inline temporary methods.


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

Branch: refs/heads/sprint-1
Commit: d4c7e86b8f816d370a6a9051de0f15767c8551e3
Parents: 7d498c4
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Tue Feb 10 20:28:17 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Tue Feb 10 20:28:17 2015 +0300

----------------------------------------------------------------------
 .../ClientAbstractMultiThreadedSelfTest.java    |  7 +--
 .../ClientAbstractMultiNodeSelfTest.java        | 10 ++--
 .../integration/ClientAbstractSelfTest.java     |  2 +-
 .../java/org/apache/ignite/IgniteCache.java     | 10 ----
 .../processors/cache/IgniteCacheProxy.java      | 29 ------------
 .../ignite/internal/GridProjectionSelfTest.java |  2 +-
 .../checkpoint/GridCheckpointTaskSelfTest.java  |  4 +-
 .../GridDeploymentMessageCountSelfTest.java     |  4 +-
 .../cache/GridCacheAbstractMetricsSelfTest.java | 15 +++---
 .../cache/GridCacheBasicStoreAbstractTest.java  |  2 +-
 .../cache/GridCacheClearAllSelfTest.java        |  2 +-
 ...idCacheConfigurationConsistencySelfTest.java |  2 +-
 .../cache/GridCacheDeploymentSelfTest.java      |  7 ++-
 .../GridCacheEvictionEventAbstractTest.java     |  3 +-
 .../GridCacheGroupLockAbstractSelfTest.java     | 50 ++++++++++----------
 .../cache/GridCacheMemoryModeSelfTest.java      |  2 +-
 .../cache/GridCacheMvccPartitionedSelfTest.java |  2 +-
 .../cache/GridCacheNestedTxAbstractTest.java    |  3 +-
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  8 ++--
 .../cache/GridCacheP2PUndeploySelfTest.java     |  4 +-
 .../cache/GridCachePartitionedGetSelfTest.java  |  4 +-
 .../GridCachePreloadingEvictionsSelfTest.java   |  6 +--
 .../processors/cache/GridCacheStopSelfTest.java |  4 +-
 .../cache/GridCacheSwapPreloadSelfTest.java     |  2 +-
 .../GridCacheValueBytesPreloadingSelfTest.java  |  4 +-
 ...idCacheValueConsistencyAbstractSelfTest.java |  2 +-
 .../IgniteTxExceptionAbstractSelfTest.java      |  5 +-
 .../cache/IgniteTxMultiNodeAbstractTest.java    |  8 ++--
 .../IgniteTxStoreExceptionAbstractSelfTest.java |  5 +-
 ...eAbstractDataStructuresFailoverSelfTest.java | 26 +++++-----
 ...idCachePartitionedNodeRestartTxSelfTest.java | 12 ++---
 ...tractDistributedByteArrayValuesSelfTest.java |  8 ++--
 .../GridCacheAbstractNodeRestartSelfTest.java   |  4 +-
 .../GridCacheClientModesAbstractSelfTest.java   |  8 ++--
 .../GridCacheMultiNodeAbstractTest.java         |  9 ++--
 ...GridCachePreloadRestartAbstractSelfTest.java |  2 +-
 ...iteTxConsistencyRestartAbstractSelfTest.java |  4 +-
 ...xOriginatingNodeFailureAbstractSelfTest.java |  2 +-
 ...cOriginatingNodeFailureAbstractSelfTest.java |  4 +-
 .../dht/GridCacheAtomicNearCacheSelfTest.java   |  2 +-
 .../dht/GridCacheColocatedDebugTest.java        |  4 +-
 .../dht/GridCacheDhtEntrySelfTest.java          |  4 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |  4 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |  6 +--
 .../dht/GridCacheDhtInternalEntrySelfTest.java  |  4 +-
 .../dht/GridCacheDhtMultiBackupTest.java        |  3 +-
 .../dht/GridCacheDhtPreloadDelayedSelfTest.java | 10 ++--
 .../GridCacheDhtPreloadDisabledSelfTest.java    |  4 +-
 .../GridCacheDhtPreloadMessageCountTest.java    |  2 +-
 ...ockPartitionedMultiNodeAbstractSelfTest.java | 12 ++---
 ...ePartitionedNearDisabledMetricsSelfTest.java |  2 +-
 .../atomic/GridCacheAtomicPreloadSelfTest.java  |  2 +-
 ...GridCacheValueConsistencyAtomicSelfTest.java |  2 +-
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java | 10 ++--
 ...eAtomicNearOnlyMultiNodeFullApiSelfTest.java |  2 +-
 .../near/GridCacheNearMetricsSelfTest.java      |  2 +-
 .../near/GridCacheNearOnlySelfTest.java         |  6 +--
 .../near/GridCacheNearOnlyTopologySelfTest.java |  5 +-
 .../GridCacheNearPartitionedClearSelfTest.java  |  3 +-
 .../GridCachePartitionedAffinitySelfTest.java   |  4 +-
 ...achePartitionedMultiNodeCounterSelfTest.java | 12 ++---
 ...achePartitionedMultiNodeFullApiSelfTest.java |  2 +-
 ...hePartitionedQueryMultiThreadedSelfTest.java |  2 +-
 ...idCacheReplicatedUnswapAdvancedSelfTest.java |  7 +--
 .../GridCacheReplicatedPreloadSelfTest.java     |  2 +-
 .../GridCacheBatchEvictUnswapSelfTest.java      |  4 +-
 ...heConcurrentEvictionConsistencySelfTest.java |  3 +-
 .../GridCacheEvictionTouchSelfTest.java         |  4 +-
 .../GridCacheLocalByteArrayValuesSelfTest.java  | 10 ++--
 .../GridDataLoaderProcessorSelfTest.java        | 10 ++--
 .../util/future/GridFinishedFutureSelfTest.java |  2 +-
 .../loadtests/colocation/GridTestMain.java      |  4 +-
 .../mapper/GridContinuousMapperTask1.java       |  3 +-
 .../mapper/GridContinuousMapperTask2.java       |  3 +-
 .../swap/GridSwapEvictAllBenchmark.java         |  4 +-
 .../p2p/GridAbstractMultinodeRedeployTest.java  |  4 +-
 .../CacheCheckpointSpiSecondCacheSelfTest.java  |  2 +-
 .../near/GridCachePartitionedQuerySelfTest.java |  2 +-
 .../cache/VisorCacheCompactCommandSpec.scala    |  4 +-
 79 files changed, 209 insertions(+), 255 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/clients/src/test/java/org/apache/ignite/client/ClientAbstractMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/client/ClientAbstractMultiThreadedSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/client/ClientAbstractMultiThreadedSelfTest.java
index 8bded32..b517a7d 100644
--- a/modules/clients/src/test/java/org/apache/ignite/client/ClientAbstractMultiThreadedSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/client/ClientAbstractMultiThreadedSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.client;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.client.balancer.*;
 import org.apache.ignite.client.impl.*;
 import org.apache.ignite.client.ssl.*;
@@ -464,11 +465,11 @@ public abstract class ClientAbstractMultiThreadedSelfTest extends GridCommonAbst
 
             ClusterNode node = ignite.cluster().mapKeyToNode(PARTITIONED_CACHE_NAME, key);
 
-            if (!puts.get(key).get2().equals(gridMap.get(node.id()).jcache(PARTITIONED_CACHE_NAME).peek(key))) {
+            if (!puts.get(key).get2().equals(gridMap.get(node.id()).jcache(PARTITIONED_CACHE_NAME).localPeek(key, CachePeekMode.ONHEAP))) {
                 // printAffinityState(gridMap.values());
 
                 failNotEquals("Node don't have value for key [nodeId=" + node.id() + ", key=" + key + "]",
-                    puts.get(key).get2(), gridMap.get(node.id()).jcache(PARTITIONED_CACHE_NAME).peek(key));
+                    puts.get(key).get2(), gridMap.get(node.id()).jcache(PARTITIONED_CACHE_NAME).localPeek(key, CachePeekMode.ONHEAP));
             }
 
             // Assert that client has properly determined affinity node.
@@ -489,7 +490,7 @@ public abstract class ClientAbstractMultiThreadedSelfTest extends GridCommonAbst
 
             // Check that no other nodes see this key.
             for (UUID id : F.view(gridMap.keySet(), F.notEqualTo(node.id())))
-                assertNull("Got value in near cache.", gridMap.get(id).jcache(PARTITIONED_CACHE_NAME).peek(key));
+                assertNull("Got value in near cache.", gridMap.get(id).jcache(PARTITIONED_CACHE_NAME).localPeek(key, CachePeekMode.ONHEAP));
         }
 
         for (Ignite g : gridMap.values())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractMultiNodeSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractMultiNodeSelfTest.java
index 7077f1e..b6ec6e5 100644
--- a/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractMultiNodeSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractMultiNodeSelfTest.java
@@ -395,7 +395,7 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
 
         cache.put(key, key); // Create entry in near cache, it is invalidated if INVALIDATE flag is set.
 
-        assertNotNull(cache.peek(key));
+        assertNotNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         GridClientData d = client.data(PARTITIONED_CACHE_NAME);
 
@@ -405,9 +405,9 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
             cache = g.jcache(PARTITIONED_CACHE_NAME);
 
             if (affinity(cache).isPrimaryOrBackup(g.cluster().localNode(), key))
-                assertEquals("zzz", cache.peek(key));
+                assertEquals("zzz", cache.localPeek(key, CachePeekMode.ONHEAP));
             else
-                assertNull(cache.peek(key));
+                assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
         }
     }
 
@@ -597,7 +597,7 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
             partitioned.put(key, "val" + key);
 
             for (Map.Entry<UUID, Ignite> entry : gridsByLocNode.entrySet()) {
-                Object val = entry.getValue().jcache(PARTITIONED_CACHE_NAME).peek(key);
+                Object val = entry.getValue().jcache(PARTITIONED_CACHE_NAME).localPeek(key, CachePeekMode.ONHEAP);
 
                 if (primaryNodeId.equals(entry.getKey()))
                     assertEquals("val" + key, val);
@@ -619,7 +619,7 @@ public abstract class ClientAbstractMultiNodeSelfTest extends GridCommonAbstract
             partitioned.pinNodes(node).put(pinnedKey, "val" + pinnedKey);
 
             for (Map.Entry<UUID, Ignite> entry : gridsByLocNode.entrySet()) {
-                Object val = entry.getValue().jcache(PARTITIONED_CACHE_NAME).peek(pinnedKey);
+                Object val = entry.getValue().jcache(PARTITIONED_CACHE_NAME).localPeek(pinnedKey, CachePeekMode.ONHEAP);
 
                 if (primaryNodeId.equals(entry.getKey()) || pinnedNodeId.equals(entry.getKey()))
                     assertEquals("val" + pinnedKey, val);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java
index e2c3495..0cdf4dc 100644
--- a/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/client/integration/ClientAbstractSelfTest.java
@@ -762,7 +762,7 @@ public abstract class ClientAbstractSelfTest extends GridCommonAbstractTest {
 
         assertTrue(namedData.put("k", "v"));
 
-        grid().jcache(CACHE_NAME).evict("k");
+        grid().jcache(CACHE_NAME).localEvict(Collections.<Object>singleton("k"));
 
         assertNull(namedData.flagsOn(GridClientCacheFlag.SKIP_SWAP, GridClientCacheFlag.SKIP_STORE).get("k"));
         assertEquals("v", namedData.flagsOn(GridClientCacheFlag.SKIP_STORE).get("k"));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index c399d8d..52712d8 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -58,16 +58,6 @@ import java.util.concurrent.locks.*;
  * @param <V> Cache value type.
  */
 public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncSupport {
-    /// To be inline!!!
-    public V peek(K key);
-    public boolean isEmpty();
-    public void evict(K key);
-    public void promote(K key);
-    CacheConfiguration configuration();
-    boolean isLocked(K key);
-    boolean isLockedByThread(K key);
-    //public void clear(K key);
-
     /** {@inheritDoc} */
     public @Override IgniteCache<K, V> withAsync();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 5c7b792..a28eefd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -1080,33 +1080,4 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K, V
     @Override public String toString() {
         return S.toString(IgniteCacheProxy.class, this);
     }
-
-    // To be inline
-    @Override public V peek(K key) {
-        return localPeek(key, CachePeekMode.ONHEAP);
-    }
-
-    public boolean isEmpty() {
-        return localSize() == 0;
-    }
-
-    @Override public void evict(K key) {
-        localEvict(Collections.<K>singleton(key));
-    }
-
-    @Override public void promote(K key) {
-        localPromote(Collections.singleton(key));
-    }
-
-    @Override public CacheConfiguration configuration() {
-        return getConfiguration(CacheConfiguration.class);
-    }
-
-    @Override public boolean isLocked(K key) {
-        return isLocalLocked(key, false);
-    }
-
-    @Override public boolean isLockedByThread(K key) {
-        return isLocalLocked(key, true);
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
index ca11187..1f749e6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridProjectionSelfTest.java
@@ -63,7 +63,7 @@ public class GridProjectionSelfTest extends GridProjectionAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected ClusterGroup projection() {
-        return grid(0).forPredicate(F.<ClusterNode>nodeForNodeIds(ids));
+        return grid(0).forPredicate(F.nodeForNodeIds(ids));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java
index e051fe9..42ce8f1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/checkpoint/GridCheckpointTaskSelfTest.java
@@ -104,8 +104,8 @@ public class GridCheckpointTaskSelfTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        assert grid(1).jcache(CACHE_NAME).isEmpty() : grid(1).jcache(CACHE_NAME);
-        assert grid(2).jcache(CACHE_NAME).isEmpty() : grid(2).jcache(CACHE_NAME);
+        assert grid(1).jcache(CACHE_NAME).localSize() == 0 : grid(1).jcache(CACHE_NAME);
+        assert grid(2).jcache(CACHE_NAME).localSize() == 0 : grid(2).jcache(CACHE_NAME);
 
         stopAllGrids();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
index dbe2dde..7f940a9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/managers/deployment/GridDeploymentMessageCountSelfTest.java
@@ -136,7 +136,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest {
             cache.put("key", valCls.newInstance());
 
             for (int i = 0; i < 2; i++)
-                assertNotNull("For grid: " + i, grid(i).jcache(null).peek("key"));
+                assertNotNull("For grid: " + i, grid(i).jcache(null).localPeek("key", CachePeekMode.ONHEAP));
 
             for (MessageCountingCommunicationSpi spi : commSpis.values()) {
                 assertTrue(spi.deploymentMessageCount() > 0);
@@ -150,7 +150,7 @@ public class GridDeploymentMessageCountSelfTest extends GridCommonAbstractTest {
                 cache.put(key, valCls.newInstance());
 
                 for (int k = 0; k < 2; k++)
-                    assertNotNull(grid(k).jcache(null).peek(key));
+                    assertNotNull(grid(k).jcache(null).localPeek(key, CachePeekMode.ONHEAP));
             }
 
             for (MessageCountingCommunicationSpi spi : commSpis.values())

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 d672098..de4ab7c 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
@@ -19,6 +19,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.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -80,7 +81,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
 
             g.jcache(null).removeAll();
 
-            assert g.jcache(null).isEmpty();
+            assert g.jcache(null).localSize() == 0;
 
             g.jcache(null).mxBean().clear();
 
@@ -95,7 +96,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         for (int i = 0; i < gridCount(); i++) {
             Ignite g = grid(i);
 
-            g.jcache(null).configuration().setStatisticsEnabled(true);
+            g.jcache(null).getConfiguration(CacheConfiguration.class).setStatisticsEnabled(true);
         }
     }
 
@@ -584,7 +585,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
         for (int i = 0; i < keyCnt; i++) {
             assertNull("Value is not null for key: " + i, cache.get(i));
 
-            if (cache.configuration().getCacheMode() == CacheMode.REPLICATED ||
+            if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == CacheMode.REPLICATED ||
                 affinity(cache).isPrimary(grid(0).localNode(), i))
                 expReads++;
             else
@@ -668,12 +669,12 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
     public void testManualEvictions() throws Exception {
         IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
-        if (cache.configuration().getCacheMode() == CacheMode.PARTITIONED)
+        if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == CacheMode.PARTITIONED)
             return;
 
         cache.put(1, 1);
 
-        cache.evict(1);
+        cache.localEvict(Collections.singleton(1));
 
         assertEquals(0L, cache.metrics().getCacheRemovals());
         assertEquals(1L, cache.metrics().getCacheEvictions());
@@ -683,7 +684,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testTxEvictions() throws Exception {
-        if (grid(0).jcache(null).configuration().getAtomicityMode() != CacheAtomicityMode.ATOMIC)
+        if (grid(0).jcache(null).getConfiguration(CacheConfiguration.class).getAtomicityMode() != CacheAtomicityMode.ATOMIC)
             checkTtl(true);
     }
 
@@ -691,7 +692,7 @@ public abstract class GridCacheAbstractMetricsSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     public void testNonTxEvictions() throws Exception {
-        if (grid(0).jcache(null).configuration().getAtomicityMode() == CacheAtomicityMode.ATOMIC)
+        if (grid(0).jcache(null).getConfiguration(CacheConfiguration.class).getAtomicityMode() == CacheAtomicityMode.ATOMIC)
             checkTtl(false);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java
index 15baaec..b05da88 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicStoreAbstractTest.java
@@ -125,7 +125,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract
         cache.put(100, "hacuna matata");
         assertEquals(1, map.size());
 
-        cache.localEvict(Collections.<Integer>singleton(100));
+        cache.localEvict(Collections.singleton(100));
         assertEquals(1, map.size());
 
         assertEquals("hacuna matata", cache.getAndRemove(100));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 0bd90cb..511756d 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
@@ -160,7 +160,7 @@ public class GridCacheClearAllSelfTest extends GridCommonAbstractTest {
 
         // Expect caches with the given name to be clear on all nodes.
         for (int i = 0; i < GRID_CNT - 1; i++)
-            assert grid(i).jcache(CACHE_NAME).isEmpty();
+            assert grid(i).jcache(CACHE_NAME).localSize() == 0;
 
         // ... but cache with another name should remain untouched.
         assert grid(GRID_CNT - 1).jcache(CACHE_NAME_OTHER).localSize() == KEY_CNT_OTHER;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 7421fce..c26fc8b1 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).jcache("myCache").configuration().getCacheMode() == CacheConfiguration.DFLT_CACHE_MODE;
+        assert startGrid(1).jcache("myCache").getConfiguration(CacheConfiguration.class).getCacheMode() == CacheConfiguration.DFLT_CACHE_MODE;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 9f001a0..ab11e89 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
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -204,14 +203,14 @@ public class GridCacheDeploymentSelfTest extends GridCommonAbstractTest {
             stopGrid(GRID_NAME);
 
             for (int i = 0; i < 10; i++) {
-                if (g1.jcache(null).isEmpty() && g2.jcache(null).isEmpty())
+                if (g1.jcache(null).localSize() == 0 && g2.jcache(null).localSize() == 0)
                     break;
 
                 U.sleep(500);
             }
 
-            assert g1.jcache(null).isEmpty();
-            assert g2.jcache(null).isEmpty();
+            assert g1.jcache(null).localSize() == 0;
+            assert g2.jcache(null).localSize() == 0;
 
             startGrid(3);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 d957410..b4ef299 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
@@ -27,6 +27,7 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 
+import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
@@ -112,7 +113,7 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
 
         c.put("1", "val1");
 
-        c.evict("1");
+        c.localEvict(Collections.singleton("1"));
 
         latch.await();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 5ab5ada..cd889e6 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
@@ -192,10 +192,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
     }
 
@@ -240,10 +240,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
@@ -273,10 +273,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertNull("For index: " + i, gCache.peek(key1));
+                assertNull("For index: " + i, gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertNull("For index: " + i, gCache.peek(key2));
+                assertNull("For index: " + i, gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
     }
 
@@ -321,10 +321,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
@@ -386,7 +386,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
         }
 
         final CountDownLatch unlockLatch = new CountDownLatch(1);
@@ -477,7 +477,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
         }
 
         Lock lock = cache.lock(key1);
@@ -497,7 +497,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
                 IgniteCache<Object, Object> gCache = g.jcache(null);
 
                 if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                    assertEquals("For index: " + i, "val01", gCache.peek(key1));
+                    assertEquals("For index: " + i, "val01", gCache.localPeek(key1, CachePeekMode.ONHEAP));
             }
         }
         finally {
@@ -583,10 +583,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
     }
 
@@ -674,10 +674,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
@@ -755,10 +755,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val01", gCache.peek(key1));
+                assertEquals("For index: " + i, "val01", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val02", gCache.peek(key2));
+                assertEquals("For index: " + i, "val02", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
     }
 
@@ -818,10 +818,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
@@ -899,10 +899,10 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
         }
 
         grid(0).events().localListen(locks, EVT_CACHE_OBJECT_LOCKED);
@@ -1164,16 +1164,16 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
             IgniteCache<Object, Object> gCache = g.jcache(null);
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key1))
-                assertEquals("For index: " + i, "val1", gCache.peek(key1));
+                assertEquals("For index: " + i, "val1", gCache.localPeek(key1, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key2))
-                assertEquals("For index: " + i, "val2", gCache.peek(key2));
+                assertEquals("For index: " + i, "val2", gCache.localPeek(key2, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key3))
-                assertEquals("For index: " + i, "val3", gCache.peek(key3));
+                assertEquals("For index: " + i, "val3", gCache.localPeek(key3, CachePeekMode.ONHEAP));
 
             if (g.affinity(null).isPrimaryOrBackup(g.cluster().localNode(), key4))
-                assertEquals("For index: " + i, "val4", gCache.peek(key4));
+                assertEquals("For index: " + i, "val4", gCache.localPeek(key4, CachePeekMode.ONHEAP));
         }
 
         // Check the store.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 d4b04df..c0c902b 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
@@ -177,7 +177,7 @@ public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
 
         Ignite g = startGrid();
 
-        CacheConfiguration cfg = g.jcache(null).configuration();
+        CacheConfiguration cfg = g.jcache(null).getConfiguration(CacheConfiguration.class);
 
         assertEquals(memoryMode, cfg.getMemoryMode());
         assertEquals(0, cfg.getOffHeapMaxMemory());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
index 6590b9a..5935287 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMvccPartitionedSelfTest.java
@@ -264,7 +264,7 @@ public class GridCacheMvccPartitionedSelfTest extends GridCommonAbstractTest {
 
         entry.addNearLocal(node1, 1, ver1, 0, true);
 
-        entry.readyNearLocal(ver1, ver1, empty(), empty(), Collections.<GridCacheVersion>singletonList(ver0));
+        entry.readyNearLocal(ver1, ver1, empty(), empty(), Collections.singletonList(ver0));
 
         entry.addRemote(node1, 1, ver0, 0, false, true);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
index 079afbb..cec2b2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheNestedTxAbstractTest.java
@@ -18,7 +18,6 @@
 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.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -88,7 +87,7 @@ public class GridCacheNestedTxAbstractTest extends GridCommonAbstractTest {
         for (int i = 0; i < GRID_CNT; i++) {
             grid(i).jcache(null).removeAll();
 
-            assert grid(i).jcache(null).isEmpty();
+            assert grid(i).jcache(null).localSize() == 0;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
index d248d56..bcde898 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
@@ -572,19 +572,19 @@ public abstract class GridCacheOffHeapTieredAbstractSelfTest extends GridCacheAb
             assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
         }
 
-        assertNull(c.peek(key));
+        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
 
         c.put(key, key);
 
-        assertNull(c.peek(key));
+        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
 
         assertEquals(key, c.get(key));
 
-        assertNull(c.peek(key));
+        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
 
         assertTrue(c.remove(key));
 
-        assertNull(c.peek(key));
+        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
 
         for (int i = 0; i < gridCount(); i++) {
             assertEquals("Unexpected entries for grid: " + i, 0, internalCache(i).offHeapEntriesCount());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
index fff6ae0..7dd0105 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheP2PUndeploySelfTest.java
@@ -293,12 +293,12 @@ public class GridCacheP2PUndeploySelfTest extends GridCommonAbstractTest {
         long end = System.currentTimeMillis() + timeout;
 
         while (end - System.currentTimeMillis() >= 0) {
-            if (cache.isEmpty())
+            if (cache.localSize() == 0)
                 return true;
 
             Thread.sleep(500);
         }
 
-        return cache.isEmpty();
+        return cache.localSize() == 0;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
index d5622b6..860bed5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
@@ -147,9 +147,9 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
 
                 assert !await();
 
-                c.evict(KEY);
+                c.localEvict(Collections.singleton(KEY));
 
-                assert c.peek(KEY) == null;
+                assert c.localPeek(KEY, CachePeekMode.ONHEAP) == null;
 
                 val = c.get(KEY);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index 9bce48b..ff4086e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -18,7 +18,6 @@
 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.events.*;
 import org.apache.ignite.internal.*;
@@ -34,6 +33,7 @@ import org.apache.ignite.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
+import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
@@ -127,7 +127,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
                             Cache.Entry<Integer, Object> entry = randomEntry(ignite1);
 
                             if (entry != null)
-                                ignite1.jcache(null).evict(entry.getKey());
+                                ignite1.jcache(null).localEvict(Collections.<Object>singleton(entry.getKey()));
                             else
                                 info("Entry is null.");
                         }
@@ -167,7 +167,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
                 Cache.Entry<Integer, Object> entry = randomEntry(ignite1);
 
                 if (entry != null)
-                    cache1.evict(entry.getKey());
+                    cache1.localEvict(Collections.singleton(entry.getKey()));
                 else
                     info("Entry is null.");
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
index 2961e28..56ef1a0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheStopSelfTest.java
@@ -134,8 +134,8 @@ public class GridCacheStopSelfTest extends GridCommonAbstractTest {
 
             assertNotNull(cache);
 
-            assertEquals(atomic ? ATOMIC : TRANSACTIONAL, cache.configuration().getAtomicityMode());
-            assertEquals(replicated ? REPLICATED : PARTITIONED, cache.configuration().getCacheMode());
+            assertEquals(atomic ? ATOMIC : TRANSACTIONAL, cache.getConfiguration(CacheConfiguration.class).getAtomicityMode());
+            assertEquals(replicated ? REPLICATED : PARTITIONED, cache.getConfiguration(CacheConfiguration.class).getCacheMode());
 
             Collection<IgniteInternalFuture<?>> putFuts = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 56aeb58..be093af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -116,7 +116,7 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
             info("Evict finished.");
 
             for (int i = 0; i < ENTRY_CNT; i++)
-                assertNull(cache.peek(i));
+                assertNull(cache.localPeek(i, CachePeekMode.ONHEAP));
 
             assert cache.localSize(CachePeekMode.PRIMARY, CachePeekMode.BACKUP, CachePeekMode.NEAR,
                 CachePeekMode.ONHEAP) == 0;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
index ef16c6e..f8fa6b8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
@@ -131,10 +131,10 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
 
         if (memMode == ONHEAP_TIERED) {
             for (int i = 0; i < keyCnt; i++)
-                grid(0).jcache(null).evict(String.valueOf(i));
+                grid(0).jcache(null).localEvict(Collections.<Object>singleton(String.valueOf(i)));
 
             for (int i = 0; i < keyCnt; i++)
-                grid(0).jcache(null).promote(String.valueOf(i));
+                grid(0).jcache(null).localPromote(Collections.singleton(String.valueOf(i)));
         }
 
         startGrid(2);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
index c9b4fa9..51cea4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
@@ -274,7 +274,7 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
             Long firstVal = null;
 
             for (int g = 0; g < gridCount(); g++) {
-                Long val = (Long)grid(g).jcache(null).peek(i);
+                Long val = (Long)grid(g).jcache(null).localPeek(i, CachePeekMode.ONHEAP);
 
                 if (firstVal == null && val != null)
                     firstVal = val;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
index 8a85688..3398418 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxExceptionAbstractSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
@@ -541,10 +540,10 @@ public abstract class IgniteTxExceptionAbstractSelfTest extends GridCacheAbstrac
     private Integer keyForNode(ClusterNode node, int type) {
         IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
-        if (cache.configuration().getCacheMode() == LOCAL)
+        if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == LOCAL)
             return ++lastKey;
 
-        if (cache.configuration().getCacheMode() == REPLICATED && type == NOT_PRIMARY_AND_BACKUP)
+        if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == REPLICATED && type == NOT_PRIMARY_AND_BACKUP)
             return ++lastKey;
 
         for (int key = lastKey + 1; key < (lastKey + 10_000); key++) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
index 708c112..1fa5984 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
@@ -654,7 +654,7 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
                 for (int ii = 0; ii < GRID_CNT; ii++)
                     assertEquals(null, grid(ii).jcache(null).get(Integer.toString(i)));
 
-            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).peek(RMVD_CNTR_KEY));
+            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).localPeek(RMVD_CNTR_KEY, CachePeekMode.ONHEAP));
         }
         finally {
             stopAllGrids();
@@ -701,7 +701,7 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
 
             assertTrue(entries.isEmpty());
 
-            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).peek(RMVD_CNTR_KEY));
+            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).localPeek(RMVD_CNTR_KEY, CachePeekMode.ONHEAP));
         }
         finally {
             stopAllGrids();
@@ -799,7 +799,7 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
                     assertEquals("Got invalid value from cache [gridIdx=" + ii + ", key=" + i + ']',
                         null, grid(ii).jcache(null).get(Integer.toString(i)));
 
-            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).peek(RMVD_CNTR_KEY));
+            assertEquals(-GRID_CNT * RETRIES, grid(0).jcache(null).localPeek(RMVD_CNTR_KEY, CachePeekMode.ONHEAP));
         }
         finally {
             stopAllGrids();
@@ -811,7 +811,7 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
      */
     private void printCounter() throws IgniteCheckedException {
         info("***");
-        info("*** Peeked counter: " + grid(0).jcache(null).peek(CNTR_KEY));
+        info("*** Peeked counter: " + grid(0).jcache(null).localPeek(CNTR_KEY, CachePeekMode.ONHEAP));
         info("*** Got counter: " + grid(0).jcache(null).get(CNTR_KEY));
         info("***");
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
index 3c0d641..3e0c2a5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.distributed.near.*;
-import org.apache.ignite.internal.transactions.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.testframework.*;
 import org.apache.ignite.transactions.*;
@@ -548,10 +547,10 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb
     private Integer keyForNode(ClusterNode node, int type) {
         IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
-        if (cache.configuration().getCacheMode() == LOCAL)
+        if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == LOCAL)
             return ++lastKey;
 
-        if (cache.configuration().getCacheMode() == REPLICATED && type == NOT_PRIMARY_AND_BACKUP)
+        if (cache.getConfiguration(CacheConfiguration.class).getCacheMode() == REPLICATED && type == NOT_PRIMARY_AND_BACKUP)
             return ++lastKey;
 
         for (int key = lastKey + 1; key < (lastKey + 10_000); key++) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
index c8c3b8b..3415848 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheAbstractDataStructuresFailoverSelfTest.java
@@ -231,9 +231,9 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
         try (IgniteAtomicReference atomic = grid(0).atomicReference(STRUCTURE_NAME, 10, true)) {
             Ignite g = startGrid(NEW_GRID_NAME);
 
-            assert g.<Integer>atomicReference(STRUCTURE_NAME, 10, true).get() == 10;
+            assert g.atomicReference(STRUCTURE_NAME, 10, true).get() == 10;
 
-            g.<Integer>atomicReference(STRUCTURE_NAME, 10, true).set(20);
+            g.atomicReference(STRUCTURE_NAME, 10, true).set(20);
 
             stopGrid(NEW_GRID_NAME);
 
@@ -256,7 +256,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
                             try {
                                 Ignite g = startGrid(name);
 
-                                assert g.<Integer>atomicReference(STRUCTURE_NAME, 1, true).get() > 0;
+                                assert g.atomicReference(STRUCTURE_NAME, 1, true).get() > 0;
                             }
                             finally {
                                 if (i != TOP_CHANGE_CNT - 1)
@@ -281,7 +281,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
             fut.get();
 
             for (Ignite g : G.allGrids())
-                assertEquals(val, (int)g.<Integer>atomicReference(STRUCTURE_NAME, 1, true).get());
+                assertEquals(val, (int)g.atomicReference(STRUCTURE_NAME, 1, true).get());
         }
     }
 
@@ -304,7 +304,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
 
                                     Ignite g = startGrid(name);
 
-                                    assert g.<Integer>atomicReference(STRUCTURE_NAME, 1, true).get() > 0;
+                                    assert g.atomicReference(STRUCTURE_NAME, 1, true).get() > 0;
                                 }
                             }
                             finally {
@@ -331,7 +331,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
             fut.get();
 
             for (Ignite g : G.allGrids())
-                assert g.<Integer>atomicReference(STRUCTURE_NAME, 1, true).get() == val;
+                assert g.atomicReference(STRUCTURE_NAME, 1, true).get() == val;
         }
     }
 
@@ -342,16 +342,16 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
         try (IgniteAtomicStamped atomic = grid(0).atomicStamped(STRUCTURE_NAME, 10, 10, true)) {
             Ignite g = startGrid(NEW_GRID_NAME);
 
-            IgniteBiTuple<Integer, Integer> t = g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 10, 10, true).get();
+            IgniteBiTuple<Integer, Integer> t = g.atomicStamped(STRUCTURE_NAME, 10, 10, true).get();
 
             assert t.get1() == 10;
             assert t.get2() == 10;
 
-            g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 10, 10, true).set(20, 20);
+            g.atomicStamped(STRUCTURE_NAME, 10, 10, true).set(20, 20);
 
             stopGrid(NEW_GRID_NAME);
 
-            t = grid(0).<Integer, Integer>atomicStamped(STRUCTURE_NAME, 10, 10, true).get();
+            t = grid(0).atomicStamped(STRUCTURE_NAME, 10, 10, true).get();
 
             assert t.get1() == 20;
             assert t.get2() == 20;
@@ -374,7 +374,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
                                 Ignite g = startGrid(name);
 
                                 IgniteBiTuple<Integer, Integer> t =
-                                    g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
+                                    g.atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
 
                                 assert t.get1() > 0;
                                 assert t.get2() > 0;
@@ -407,7 +407,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
             fut.get();
 
             for (Ignite g : G.allGrids()) {
-                IgniteBiTuple<Integer, Integer> t = g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
+                IgniteBiTuple<Integer, Integer> t = g.atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
 
                 assert t.get1() == val;
                 assert t.get2() == val;
@@ -435,7 +435,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
                                     Ignite g = startGrid(name);
 
                                     IgniteBiTuple<Integer, Integer> t =
-                                        g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
+                                        g.atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
 
                                     assert t.get1() > 0;
                                     assert t.get2() > 0;
@@ -470,7 +470,7 @@ public abstract class GridCacheAbstractDataStructuresFailoverSelfTest extends Ig
             fut.get();
 
             for (Ignite g : G.allGrids()) {
-                IgniteBiTuple<Integer, Integer> t = g.<Integer, Integer>atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
+                IgniteBiTuple<Integer, Integer> t = g.atomicStamped(STRUCTURE_NAME, 1, 1, true).get();
 
                 assert t.get1() == val;
                 assert t.get2() == val;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
index 2e3737f..7caf95d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartTxSelfTest.java
@@ -159,7 +159,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < MAX_GRID_NUM; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             try (IgniteTx tx = grid(i).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                 Integer val = (Integer) grid(i).jcache(null).get(key);
@@ -184,7 +184,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < 20; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             try (IgniteTx tx = grid(i).transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
                 GridCacheInternalKey key = new GridCacheInternalKeyImpl(name);
@@ -215,7 +215,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
         for (int i = INIT_GRID_NUM; i < 20; i++) {
             startGrid(i);
 
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
             IgniteAtomicLong atomic = grid(i).atomicLong(name, 0, true);
 
@@ -240,7 +240,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
 
@@ -263,7 +263,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
 
@@ -288,7 +288,7 @@ public class GridCachePartitionedNodeRestartTxSelfTest extends GridCommonAbstrac
             assert startGrid(i) != null;
 
         for (int i = 0; i < INIT_GRID_NUM; i++)
-            assert PARTITIONED == grid(i).jcache(null).configuration().getCacheMode();
+            assert PARTITIONED == grid(i).jcache(null).getConfiguration(CacheConfiguration.class).getCacheMode();
 
         // Init cache data.
         grid(0).atomicLong(key, 0, true).getAndSet(INIT_GRID_NUM);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
index 1eaba88..0333c19 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
@@ -271,7 +271,7 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
      */
     public void testSwap() throws Exception {
         for (IgniteCache<Integer, Object> cache : caches)
-            assert cache.configuration().isSwapEnabled();
+            assert cache.getConfiguration(CacheConfiguration.class).isSwapEnabled();
 
         byte[] val1 = wrap(1);
 
@@ -295,11 +295,11 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
 
         assert Arrays.equals(val1, (byte[])primaryCache.get(SWAP_TEST_KEY));
 
-        primaryCache.evict(SWAP_TEST_KEY);
+        primaryCache.localEvict(Collections.singleton(SWAP_TEST_KEY));
 
-        assert primaryCache.peek(SWAP_TEST_KEY) == null;
+        assert primaryCache.localPeek(SWAP_TEST_KEY, CachePeekMode.ONHEAP) == null;
 
-        primaryCache.promote(SWAP_TEST_KEY);
+        primaryCache.localPromote(Collections.singleton(SWAP_TEST_KEY));
 
         assert Arrays.equals(val1, (byte[])primaryCache.localPeek(SWAP_TEST_KEY, CachePeekMode.ONHEAP));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index 481f43a..461f657 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -21,8 +21,6 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
-import org.apache.ignite.internal.cluster.*;
-import org.apache.ignite.internal.transactions.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -890,7 +888,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     private void printFailureDetails(IgniteCache<Integer, String> c, int key, int attempt) {
         error("*** Failure details ***");
         error("Key: " + key);
-        error("Partition: " + c.configuration().getAffinity().partition(key));
+        error("Partition: " + c.getConfiguration(CacheConfiguration.class).getAffinity().partition(key));
         error("Attempt: " + attempt);
         error("Node: " + c.unwrap(Ignite.class).cluster().localNode().id());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
index a632d37..0da8b11 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
@@ -107,11 +107,11 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
         for (int key = 0; key < 10; key++) {
             for (int i = 1; i < gridCount(); i++) {
                 if (grid(i).affinity(null).isPrimaryOrBackup(grid(i).localNode(), key))
-                    assertEquals(key, grid(i).jcache(null).peek(key));
+                    assertEquals(key, grid(i).jcache(null).localPeek(key, CachePeekMode.ONHEAP));
             }
 
             if (nearEnabled())
-                assertEquals(key, nearOnly.peek(key));
+                assertEquals(key, nearOnly.localPeek(key, CachePeekMode.ONHEAP));
 
             assertNull(nearOnly.localPeek(key, CachePeekMode.PRIMARY, CachePeekMode.BACKUP));
         }
@@ -133,14 +133,14 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
         for (int key = 0; key < 10; key++) {
             // At start near only cache does not have any values.
             if (nearEnabled())
-                assertNull(nearOnly.peek(key));
+                assertNull(nearOnly.localPeek(key, CachePeekMode.ONHEAP));
 
             // Get should succeed.
             assertEquals(key, nearOnly.get(key));
 
             // Now value should be cached.
             if (nearEnabled())
-                assertEquals(key, nearOnly.peek(key));
+                assertEquals(key, nearOnly.localPeek(key, CachePeekMode.ONHEAP));
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 45e16ba..8634de7 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
@@ -18,12 +18,9 @@
 package org.apache.ignite.internal.processors.cache.distributed;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
-import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.tostring.*;
-import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -349,9 +346,9 @@ public abstract class GridCacheMultiNodeAbstractTest extends GridCommonAbstractT
 
         cache1.clear();
 
-        assert cache1.isEmpty();
-        assert cache2.isEmpty();
-        assert cache3.isEmpty();
+        assert cache1.localSize() == 0;
+        assert cache2.localSize() == 0;
+        assert cache3.localSize() == 0;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
index fffb39c..da111a6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
@@ -315,7 +315,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon
     private void printFailureDetails(IgniteCache<Integer, String> c, int key, int attempt) {
         error("*** Failure details ***");
         error("Key: " + key);
-        error("Partition: " + c.configuration().getAffinity().partition(key));
+        error("Partition: " + c.getConfiguration(CacheConfiguration.class).getAffinity().partition(key));
         error("Attempt: " + attempt);
         error("Node: " + c.unwrap(Ignite.class).cluster().localNode().id());
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
index 1a3a870..043f54f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxConsistencyRestartAbstractSelfTest.java
@@ -187,14 +187,14 @@ public abstract class IgniteTxConsistencyRestartAbstractSelfTest extends GridCom
 
                 if (grid.affinity(null).isPrimaryOrBackup(grid.localNode(), k)) {
                     if (val == null) {
-                        val = cache.peek(k);
+                        val = cache.localPeek(k, CachePeekMode.ONHEAP);
 
                         assertNotNull("Failed to peek value for key: " + k, val);
                     }
                     else
                         assertEquals("Failed to find value in cache [primary=" +
                             grid.affinity(null).isPrimary(grid.localNode(), k) + ']',
-                            val, cache.peek(k));
+                            val, cache.localPeek(k, CachePeekMode.ONHEAP));
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
index 2309fd8..8b6fdb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxOriginatingNodeFailureAbstractSelfTest.java
@@ -216,7 +216,7 @@ public abstract class IgniteTxOriginatingNodeFailureAbstractSelfTest extends Gri
 
                         assertNotNull(cache);
 
-                        assertEquals(partial ? initVal : val, cache.peek(key));
+                        assertEquals(partial ? initVal : val, cache.localPeek(key, CachePeekMode.ONHEAP));
 
                         return null;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
index da93be9..d006ca5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest.java
@@ -256,7 +256,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                         assertNotNull(cache);
 
                         assertEquals("Failed to check entry value on node: " + checkNodeId,
-                            fullFailure ? initVal : val, cache.peek(key));
+                            fullFailure ? initVal : val, cache.localPeek(key, CachePeekMode.ONHEAP));
 
                         return null;
                     }
@@ -387,7 +387,7 @@ public abstract class IgniteTxPessimisticOriginatingNodeFailureAbstractSelfTest
                         assertNotNull(cache);
 
                         assertEquals("Failed to check entry value on node: " + checkNodeId,
-                            !commmit ? initVal : val, cache.peek(key));
+                            !commmit ? initVal : val, cache.localPeek(key, CachePeekMode.ONHEAP));
 
                         return null;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
index 725b3de..9e4adf7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
@@ -616,7 +616,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
             checkEntry(grid(i), nearKey, 1, i == 0, expReaders);
         }
 
-        cache0.evict(nearKey); // Remove near entry on grid0.
+        cache0.localEvict(Collections.singleton(nearKey));
 
         for (int i = 0; i < GRID_CNT; i++) {
             UUID[] expReaders = aff.isPrimary(grid(i).localNode(), nearKey) ? new UUID[]{id0} : new UUID[]{};

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
index 9338be9..02fcf6e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
@@ -399,8 +399,8 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
 
             assert !lock.tryLock();
 
-            assert g0.jcache(null).isLocked(key);
-            assert !g0.jcache(null).isLockedByThread(key) : "Key can not be locked by current thread.";
+            assert g0.jcache(null).isLocalLocked(key, false);
+            assert !g0.jcache(null).isLocalLocked(key, true) : "Key can not be locked by current thread.";
 
             unlockLatch.countDown();
             unlockFut.get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/d4c7e86b/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 e3c4e20..7973e9c 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
@@ -91,7 +91,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
             assert near(grid(i)).size() == 0 : "Near cache size is not zero for grid: " + i;
             assert dht(grid(i)).size() == 0 : "DHT cache size is not zero for grid: " + i;
 
-            assert near(grid(i)).isEmpty() : "Near cache is not empty for grid: " + i;
+            assert near(grid(i)).localSize() == 0 : "Near cache is not empty for grid: " + i;
             assert dht(grid(i)).isEmpty() : "DHT cache is not empty for grid: " + i;
         }
     }
@@ -105,7 +105,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
             assertEquals("Near cache size is not zero for grid: " + i, 0, near(grid(i)).size());
             assertEquals("DHT cache size is not zero for grid: " + i, 0, dht(grid(i)).size());
 
-            assert near(grid(i)).isEmpty() : "Near cache is not empty for grid: " + i;
+            assert near(grid(i)).localSize() == 0 : "Near cache is not empty for grid: " + i;
             assert dht(grid(i)).isEmpty() : "DHT cache is not empty for grid: " + i;
         }
 


Mime
View raw message