ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [4/4] incubator-ignite git commit: # IGNITE-54-55 Add "CachePeekMode.ONHEAP" parameter for all localPeek() call in the tests.
Date Fri, 06 Feb 2015 11:52:10 GMT
# IGNITE-54-55 Add "CachePeekMode.ONHEAP" parameter for all localPeek() call in the tests.


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

Branch: refs/heads/ignite-56
Commit: 15c3c912cdd01d0fd197de11e5bb9639309815c9
Parents: e742003
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Fri Feb 6 14:51:30 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Fri Feb 6 14:51:30 2015 +0300

----------------------------------------------------------------------
 .../JettyRestProcessorAbstractSelfTest.java     | 59 ++++++++---------
 ...cheAbstractFullApiMultithreadedSelfTest.java | 29 ++++-----
 .../cache/GridCacheAbstractFullApiSelfTest.java | 58 ++++++++---------
 .../cache/GridCacheAbstractSelfTest.java        |  2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |  4 +-
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java | 66 ++++++++++----------
 ...eAtomicNearOnlyMultiNodeFullApiSelfTest.java | 12 ++--
 .../near/GridCacheNearMultiNodeSelfTest.java    | 34 +++++-----
 .../near/GridCacheNearOneNodeSelfTest.java      |  8 +--
 ...idCacheNearOnlyMultiNodeFullApiSelfTest.java | 16 ++---
 ...GridCachePartitionedFilteredPutSelfTest.java |  2 +-
 .../near/GridPartitionedBackupLoadSelfTest.java |  4 +-
 .../IgniteCacheExpiryPolicyAbstractTest.java    |  4 +-
 .../IgniteCacheLoadAllAbstractTest.java         |  6 +-
 .../GridDataLoaderProcessorSelfTest.java        |  2 +-
 15 files changed, 154 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
index 9d8144e..fadc399 100644
--- a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
+++ b/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.ignite.internal.processors.rest;
 
+import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.util.typedef.*;
 
 import java.io.*;
@@ -246,7 +247,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Put command result: " + ret);
 
-        assertEquals("putVal", jcache().localPeek("putKey"));
+        assertEquals("putVal", jcache().localPeek("putKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -282,8 +283,8 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         jsonEquals(ret, cachePattern(true, true));
 
-        assertEquals("addVal1", jcache().localPeek("addKey1"));
-        assertEquals("addVal2", jcache().localPeek("addKey2"));
+        assertEquals("addVal1", jcache().localPeek("addKey1", CachePeekMode.ONHEAP));
+        assertEquals("addVal2", jcache().localPeek("addKey2", CachePeekMode.ONHEAP));
     }
 
     /**
@@ -316,8 +317,8 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Put all command result: " + ret);
 
-        assertEquals("putVal1", jcache().localPeek("putKey1"));
-        assertEquals("putVal2", jcache().localPeek("putKey2"));
+        assertEquals("putVal1", jcache().localPeek("putKey1", CachePeekMode.ONHEAP));
+        assertEquals("putVal2", jcache().localPeek("putKey2", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cacheBulkPattern(true, true));
     }
@@ -328,7 +329,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     public void testRemove() throws Exception {
         jcache().put("rmvKey", "rmvVal");
 
-        assertEquals("rmvVal", jcache().localPeek("rmvKey"));
+        assertEquals("rmvVal", jcache().localPeek("rmvKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "rmv", "key", "rmvKey"));
 
@@ -337,7 +338,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove command result: " + ret);
 
-        assertNull(jcache().localPeek("rmvKey"));
+        assertNull(jcache().localPeek("rmvKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -351,10 +352,10 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
         jcache().put("rmvKey3", "rmvVal3");
         jcache().put("rmvKey4", "rmvVal4");
 
-        assertEquals("rmvVal1", jcache().localPeek("rmvKey1"));
-        assertEquals("rmvVal2", jcache().localPeek("rmvKey2"));
-        assertEquals("rmvVal3", jcache().localPeek("rmvKey3"));
-        assertEquals("rmvVal4", jcache().localPeek("rmvKey4"));
+        assertEquals("rmvVal1", jcache().localPeek("rmvKey1", CachePeekMode.ONHEAP));
+        assertEquals("rmvVal2", jcache().localPeek("rmvKey2", CachePeekMode.ONHEAP));
+        assertEquals("rmvVal3", jcache().localPeek("rmvKey3", CachePeekMode.ONHEAP));
+        assertEquals("rmvVal4", jcache().localPeek("rmvKey4", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "rmvall", "k1", "rmvKey1", "k2", "rmvKey2"));
 
@@ -363,10 +364,10 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove all command result: " + ret);
 
-        assertNull(jcache().localPeek("rmvKey1"));
-        assertNull(jcache().localPeek("rmvKey2"));
-        assertEquals("rmvVal3", jcache().localPeek("rmvKey3"));
-        assertEquals("rmvVal4", jcache().localPeek("rmvKey4"));
+        assertNull(jcache().localPeek("rmvKey1", CachePeekMode.ONHEAP));
+        assertNull(jcache().localPeek("rmvKey2", CachePeekMode.ONHEAP));
+        assertEquals("rmvVal3", jcache().localPeek("rmvKey3", CachePeekMode.ONHEAP));
+        assertEquals("rmvVal4", jcache().localPeek("rmvKey4", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cacheBulkPattern(true, true));
 
@@ -377,10 +378,10 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Remove all command result: " + ret);
 
-        assertNull(jcache().localPeek("rmvKey1"));
-        assertNull(jcache().localPeek("rmvKey2"));
-        assertNull(jcache().localPeek("rmvKey3"));
-        assertNull(jcache().localPeek("rmvKey4"));
+        assertNull(jcache().localPeek("rmvKey1", CachePeekMode.ONHEAP));
+        assertNull(jcache().localPeek("rmvKey2", CachePeekMode.ONHEAP));
+        assertNull(jcache().localPeek("rmvKey3", CachePeekMode.ONHEAP));
+        assertNull(jcache().localPeek("rmvKey4", CachePeekMode.ONHEAP));
         assertTrue(jcache().localSize() == 0);
 
         jsonEquals(ret, cacheBulkPattern(true, true));
@@ -392,7 +393,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     public void testCas() throws Exception {
         jcache().put("casKey", "casOldVal");
 
-        assertEquals("casOldVal", jcache().localPeek("casKey"));
+        assertEquals("casOldVal", jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val2", "casOldVal", "val1", "casNewVal"));
 
@@ -401,7 +402,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAS command result: " + ret);
 
-        assertEquals("casNewVal", jcache().localPeek("casKey"));
+        assertEquals("casNewVal", jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
 
@@ -414,7 +415,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     public void testReplace() throws Exception {
         jcache().put("repKey", "repOldVal");
 
-        assertEquals("repOldVal", jcache().localPeek("repKey"));
+        assertEquals("repOldVal", jcache().localPeek("repKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "rep", "key", "repKey", "val", "repVal"));
 
@@ -423,7 +424,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("Replace command result: " + ret);
 
-        assertEquals("repVal", jcache().localPeek("repKey"));
+        assertEquals("repVal", jcache().localPeek("repKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -535,7 +536,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     public void testCar() throws Exception {
         jcache().put("casKey", "casOldVal");
 
-        assertEquals("casOldVal", jcache().localPeek("casKey"));
+        assertEquals("casOldVal", jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val2", "casOldVal"));
 
@@ -544,7 +545,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAR command result: " + ret);
 
-        assertNull(jcache().localPeek("casKey"));
+        assertNull(jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -553,7 +554,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
      * @throws Exception If failed.
      */
     public void testPutIfAbsent() throws Exception {
-        assertNull(jcache().localPeek("casKey"));
+        assertNull(jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey", "val1", "casNewVal"));
 
@@ -562,7 +563,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("PutIfAbsent command result: " + ret);
 
-        assertEquals("casNewVal", jcache().localPeek("casKey"));
+        assertEquals("casNewVal", jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }
@@ -573,7 +574,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
     public void testCasRemove() throws Exception {
         jcache().put("casKey", "casVal");
 
-        assertEquals("casVal", jcache().localPeek("casKey"));
+        assertEquals("casVal", jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         String ret = content(F.asMap("cmd", "cas", "key", "casKey"));
 
@@ -582,7 +583,7 @@ abstract class JettyRestProcessorAbstractSelfTest extends AbstractRestProcessorS
 
         info("CAS Remove command result: " + ret);
 
-        assertNull(jcache().localPeek("casKey"));
+        assertNull(jcache().localPeek("casKey", CachePeekMode.ONHEAP));
 
         jsonEquals(ret, cachePattern(true, true));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
index 8e9bbbd..531b3fa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiMultithreadedSelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache;
 
 import com.google.common.collect.*;
 import org.apache.ignite.*;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -245,14 +246,14 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
                 assert cache.getAndRemove("wrongKey") == null;
                 assert !cache.remove("key" + rnd1, -1);
 
-                assert cache.localPeek("key" + rnd1) == null || cache.localPeek("key" + rnd1) == rnd1;
-                assert cache.localPeek("key" + rnd2) == null || cache.localPeek("key" + rnd2) == rnd2;
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == rnd1;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == rnd2;
 
-                assert cache.localPeek("key" + rnd1) == null || cache.getAndRemove("key" + rnd1) == rnd1;
-                assert cache.localPeek("key" + rnd2) == null || cache.remove("key" + rnd2, rnd2);
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.getAndRemove("key" + rnd1) == rnd1;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.remove("key" + rnd2, rnd2);
 
-                assert cache.localPeek("key" + rnd1) == null;
-                assert cache.localPeek("key" + rnd2) == null;
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null;
             }
         });
     }
@@ -276,14 +277,14 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
 
                 assert !cacheAsync.<Boolean>future().get();
 
-                assert cache.localPeek("key" + rnd1) == null || cache.localPeek("key" + rnd1) == rnd1;
-                assert cache.localPeek("key" + rnd2) == null || cache.localPeek("key" + rnd2) == rnd2;
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == rnd1;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == rnd2;
 
-                assert cache.localPeek("key" + rnd1) == null || removeAsync(cache, "key" + rnd1) == rnd1;
-                assert cache.localPeek("key" + rnd2) == null || removeAsync(cache, "key" + rnd2, rnd2);
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null || removeAsync(cache, "key" + rnd1) == rnd1;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null || removeAsync(cache, "key" + rnd2, rnd2);
 
-                assert cache.localPeek("key" + rnd1) == null;
-                assert cache.localPeek("key" + rnd2) == null;
+                assert cache.localPeek("key" + rnd1, CachePeekMode.ONHEAP) == null;
+                assert cache.localPeek("key" + rnd2, CachePeekMode.ONHEAP) == null;
             }
         });
     }
@@ -299,7 +300,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
                 cache.removeAll(rangeKeys(0, rnd));
 
                 for (int i = 0; i < rnd; i++)
-                    assert cache.localPeek("key" + i) == null;
+                    assert cache.localPeek("key" + i, CachePeekMode.ONHEAP) == null;
             }
         });
     }
@@ -319,7 +320,7 @@ public abstract class GridCacheAbstractFullApiMultithreadedSelfTest extends Grid
                 cacheAsync.future().get();
 
                 for (int i = 0; i < rnd; i++)
-                    assert cache.localPeek("key" + i) == null;
+                    assert cache.localPeek("key" + i, CachePeekMode.ONHEAP) == null;
             }
         });
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 2f08f3d..4b61c2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -2290,7 +2290,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         Set<String> keys = new HashSet<>(primaryKeysForCache(cache, 2));
 
         for (String key : keys)
-            assertNull(cache.localPeek(key));
+            assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         Map<String, Integer> vals = new HashMap<>();
 
@@ -2305,28 +2305,28 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         }
 
         for (String key : keys)
-            assertEquals(vals.get(key), cache.localPeek(key));
+            assertEquals(vals.get(key), cache.localPeek(key, CachePeekMode.ONHEAP));
 
         cache.clear();
 
         for (String key : keys)
-            assertNull(cache.localPeek(key));
+            assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         loadAll(cache, keys, true);
 
         for (String key : keys) {
-            assertEquals(vals.get(key), cache.localPeek(key));
+            assertEquals(vals.get(key), cache.localPeek(key, CachePeekMode.ONHEAP));
 
             cache.clear(Collections.singleton(key));
         }
 
         for (String key : keys)
-            assertNull(cache.localPeek(key));
+            assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         loadAll(cache, keys, true);
 
         for (String key : keys)
-            assertEquals(vals.get(key), cache.localPeek(key));
+            assertEquals(vals.get(key), cache.localPeek(key, CachePeekMode.ONHEAP));
     }
 
     /**
@@ -2465,8 +2465,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         cache.localPromote(ImmutableSet.of("key2", "key1"));
 
-        assert cache.localPeek("key1") == null;
-        assert cache.localPeek("key2") == null;
+        assert cache.localPeek("key1", CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek("key2", CachePeekMode.ONHEAP) == null;
     }
 
     /**
@@ -2498,9 +2498,9 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         cache.clear(subKeys);
 
         for (String key : subKeys)
-            assertNull(cache.localPeek(key));
+            assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
-        assertEquals(vals.get(lastKey), cache.localPeek(lastKey));
+        assertEquals(vals.get(lastKey), cache.localPeek(lastKey, CachePeekMode.ONHEAP));
     }
 
     /**
@@ -2671,7 +2671,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         Ignite ignite = primaryIgnite("key");
         IgniteCache<String, Integer> cache = ignite.jcache(null);
 
-        assert cache.localPeek("key") == null;
+        assert cache.localPeek("key", CachePeekMode.ONHEAP) == null;
 
         cache.put("key", 1);
 
@@ -2680,7 +2680,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         try {
             cache.replace("key", 2);
 
-            assert cache.localPeek("key") == 2;
+            assert cache.localPeek("key", CachePeekMode.ONHEAP) == 2;
         }
         finally {
             if (tx != null)
@@ -2716,7 +2716,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
             try (IgniteTx tx = ignite.transactions().txStart(concurrency, READ_COMMITTED)) {
                 cache.remove("key");
 
-                assertNull(cache.localPeek("key"));
+                assertNull(cache.localPeek("key", CachePeekMode.ONHEAP));
 
                 tx.commit();
             }
@@ -2732,7 +2732,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         cache.put("key", 1);
         cache.remove("key");
 
-        assertNull(cache.localPeek("key"));
+        assertNull(cache.localPeek("key", CachePeekMode.ONHEAP));
     }
 
     /**
@@ -2895,11 +2895,11 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         // Expired entry should not be swapped.
         cache.localEvict(Collections.<String>singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         cache.localPromote(Collections.singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         assertTrue(cache.localSize() == 0);
 
@@ -2929,7 +2929,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         c.put(key, 1);
 
-        assertEquals(Integer.valueOf(1), c.localPeek(key));
+        assertEquals(Integer.valueOf(1), c.localPeek(key, CachePeekMode.ONHEAP));
 
         int ttl = 500;
 
@@ -2939,7 +2939,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
         Thread.sleep(ttl + 100);
 
-        assert c.localPeek(key) == null;
+        assert c.localPeek(key, CachePeekMode.ONHEAP) == null;
 
         assert c.localSize() == 0 : "Cache is not empty.";
     }
@@ -2966,7 +2966,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
 
             Thread.sleep(ttl + 100);
 
-            assertNull(c.localPeek(key));
+            assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
 
             assert c.localSize() == 0;
         }
@@ -3209,21 +3209,21 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         cache.put(key2, 2);
         cache.put(key3, 3);
 
-        assert cache.localPeek(key1) == 1;
-        assert cache.localPeek(key2) == 2;
-        assert cache.localPeek(key3) == 3;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == 1;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == 2;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == 3;
 
         cache.localEvict(F.asList(key1, key2));
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == 3;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == 3;
 
         cache().reloadAll(F.asList(key1, key2));
 
-        assert cache.localPeek(key1) == 1;
-        assert cache.localPeek(key2) == 2;
-        assert cache.localPeek(key3) == 3;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == 1;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == 2;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == 3;
     }
 
     /**
@@ -3377,7 +3377,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         Thread.sleep(ttl + 100);
 
         // Peek will actually remove entry from cache.
-        assert cache.localPeek(key) == null;
+        assert cache.localPeek(key, CachePeekMode.ONHEAP) == null;
 
         assert cache.localSize() == 0;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index 65555b5..3c7c43b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -483,7 +483,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     @Nullable protected <K, V> V peek(IgniteCache<K, V> cache, K key) throws Exception {
-        return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP) : cache.localPeek(key);
+        return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.SWAP) : cache.localPeek(key, CachePeekMode.ONHEAP);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index 1df3e68..658a508 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -464,7 +464,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
             for (int i = 0; i < gridCount(); i++) {
                 IgniteCache<Object, Object> cache = jcache(i);
 
-                Object val = cache.localPeek(key);
+                Object val = cache.localPeek(key, CachePeekMode.ONHEAP);
 
                 if (val == null)
                     assertFalse(cache(0).affinity().isPrimaryOrBackup(ignite(i).cluster().localNode(), key));
@@ -476,7 +476,7 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
             for (int i = 0; i < gridCount(); i++) {
                 IgniteCache<Object, Object> cache = jcache(i);
 
-                assertNull("Unexpected non null value for grid " + i, cache.localPeek(key));
+                assertNull("Unexpected non null value for grid " + i, cache.localPeek(key, CachePeekMode.ONHEAP));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
index 87b71c9..e07c27e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
@@ -117,18 +117,18 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         }
 
         for (String key : keys)
-            assertEquals(null, nearCache.localPeek(key));
+            assertEquals(null, nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         nearCache.clear();
 
         for (String key : keys)
-            assertNull(nearCache.localPeek(key));
+            assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         for (Map.Entry<String, Integer> entry : vals.entrySet())
             nearCache.put(entry.getKey(), entry.getValue());
 
         for (String key : keys)
-            assertEquals(null, nearCache.localPeek(key));
+            assertEquals(null, nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
     }
 
@@ -161,11 +161,11 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
             nearCache.clear(Collections.singleton(subKey));
 
         for (String key : subKeys) {
-            assertNull(nearCache.localPeek(key));
-            assertNotNull(primary.localPeek(key));
+            assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
+            assertNotNull(primary.localPeek(key, CachePeekMode.ONHEAP));
         }
 
-        assertEquals(null, nearCache.localPeek(lastKey));
+        assertEquals(null, nearCache.localPeek(lastKey, CachePeekMode.ONHEAP));
     }
 
     /** {@inheritDoc} */
@@ -188,11 +188,11 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         // Expired entry should not be swapped.
         cache.localEvict(Collections.singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         cache.localPromote(Collections.singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         assertTrue(cache.localSize() == 0);
 
@@ -205,7 +205,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         // Will do near get request.
         load(cache, key, true);
 
-        assertEquals(null, cache.localPeek(key));
+        assertEquals(null, cache.localPeek(key, CachePeekMode.ONHEAP));
     }
 
     /** {@inheritDoc} */
@@ -222,39 +222,39 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         cache.put(key2, 2);
         cache.put(key3, 3);
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
 
         cache.localEvict(F.asList(key1, key2));
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
 
         loadAll(cache, ImmutableSet.of(key1, key2), true);
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
 
         cache.localEvict(F.asList(key1, key2));
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
 
         loadAll(cache, ImmutableSet.of(key1, key2), true);
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
 
         cache.localEvict(new HashSet<>(keys));
 
-        assert cache.localPeek(key1) == null;
-        assert cache.localPeek(key2) == null;
-        assert cache.localPeek(key3) == null;
+        assert cache.localPeek(key1, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key2, CachePeekMode.ONHEAP) == null;
+        assert cache.localPeek(key3, CachePeekMode.ONHEAP) == null;
     }
 
     /** {@inheritDoc} */
@@ -267,7 +267,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
 
         c.put(key, 1);
 
-        assertEquals(null, c.localPeek(key));
+        assertEquals(null, c.localPeek(key, CachePeekMode.ONHEAP));
 
         long ttl = 500;
 
@@ -276,7 +276,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
 
         Thread.sleep(ttl + 100);
 
-        assert c.localPeek(key) == null;
+        assert c.localPeek(key, CachePeekMode.ONHEAP) == null;
 
         assert c.localSize() == 0 : "Cache is not empty.";
     }
@@ -333,28 +333,28 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         if (locKeys.contains(k2)) {
             cache.localPromote(Collections.singleton(k2));
 
-            assertEquals((Integer)2, cache.localPeek(k2));
+            assertEquals((Integer)2, cache.localPeek(k2, CachePeekMode.ONHEAP));
 
             cnt++;
         }
         else {
             cache.localPromote(Collections.singleton(k2));
 
-            assertNull(cache.localPeek(k2));
+            assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP));
         }
 
 
         if (locKeys.contains(k3)) {
             cache.localPromote(Collections.singleton(k3));
 
-            assertEquals((Integer)3, cache.localPeek(k3));
+            assertEquals((Integer)3, cache.localPeek(k3, CachePeekMode.ONHEAP));
 
             cnt++;
         }
         else {
             cache.localPromote(Collections.singleton(k3));
 
-            assertNull(cache.localPeek(k3));
+            assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP));
         }
 
         assertEquals(cnt, swapEvts.get());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
index b2d9a5c..ced64ac 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
@@ -95,12 +95,12 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         i = 0;
 
         for (String key : keys)
-            assertEquals((Integer)i++, nearCache.localPeek(key));
+            assertEquals((Integer)i++, nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         nearCache.clear();
 
         for (String key : keys)
-            assertNull(nearCache.localPeek(key));
+            assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         for (Map.Entry<String, Integer> entry : vals.entrySet())
             nearCache.put(entry.getKey(), entry.getValue());
@@ -108,7 +108,7 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         i = 0;
 
         for (String key : keys)
-            assertEquals((Integer)i++, nearCache.localPeek(key));
+            assertEquals((Integer)i++, nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
     }
 
@@ -132,11 +132,11 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         // Expired entry should not be swapped.
         cache.localEvict(Collections.<String>singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         cache.localPromote(Collections.singleton(key));
 
-        assertNull(cache.localPeek(key));
+        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
         assertTrue(cache.localSize() == 0);
 
@@ -149,6 +149,6 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         // Will do near get request.
         load(cache, key, true);
 
-        assertEquals((Integer)1, cache.localPeek(key));
+        assertEquals((Integer)1, cache.localPeek(key, CachePeekMode.ONHEAP));
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
index 6872c5c..4b18561 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
@@ -414,8 +414,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
             assertEquals("3", s);
         }
 
-        assertEquals("2", near.localPeek(2));
-        assertEquals("3", near.localPeek(3));
+        assertEquals("2", near.localPeek(2, CachePeekMode.ONHEAP));
+        assertEquals("3", near.localPeek(3, CachePeekMode.ONHEAP));
 
         assertEquals("2", dht(primaryGrid(2)).peek(2));
         assertEquals("3", dht(primaryGrid(3)).peek(3));
@@ -430,7 +430,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
 
         near.put(2, "2");
 
-        assertEquals("2", near.localPeek(2));
+        assertEquals("2", near.localPeek(2, CachePeekMode.ONHEAP));
         assertEquals("2", near.get(2));
 
         assertEquals("2", dht(primaryGrid(2)).peek(2));
@@ -453,7 +453,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertNotNull(s);
         assertEquals("3", s);
 
-        assertEquals("3", near.localPeek(3));
+        assertEquals("3", near.localPeek(3, CachePeekMode.ONHEAP));
         assertEquals("3", near.get(3));
 
         Ignite primaryIgnite = primaryGrid(3);
@@ -494,8 +494,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertNotNull(s);
         assertEquals("3", s);
 
-        assertEquals("2", near.localPeek(2));
-        assertEquals("3", near.localPeek(3));
+        assertEquals("2", near.localPeek(2, CachePeekMode.ONHEAP));
+        assertEquals("3", near.localPeek(3, CachePeekMode.ONHEAP));
 
         assertEquals("2", near.get(2));
         assertEquals("3", near.get(3));
@@ -525,8 +525,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
                 assertNotNull(s);
                 assertEquals("3", s);
 
-                assertEquals("2", near.localPeek(2));
-                assertEquals("3", near.localPeek(3));
+                assertEquals("2", near.localPeek(2, CachePeekMode.ONHEAP));
+                assertEquals("3", near.localPeek(3, CachePeekMode.ONHEAP));
 
                 assertNotNull(dht(primaryGrid(3)).peek(3, F.asList(GLOBAL)));
 
@@ -546,8 +546,8 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
             assertEquals("3", s);
         }
 
-        assertEquals("2", near.localPeek(2));
-        assertEquals("3", near.localPeek(3));
+        assertEquals("2", near.localPeek(2, CachePeekMode.ONHEAP));
+        assertEquals("3", near.localPeek(3, CachePeekMode.ONHEAP));
 
         assertEquals("2", dht(primaryGrid(2)).peek(2));
         assertEquals("3", dht(primaryGrid(3)).peek(3));
@@ -569,16 +569,16 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         assertFalse(near.putIfAbsent(key, "1"));
         assertEquals("1", near.getAndPutIfAbsent(key, "2"));
 
-        assertEquals("1", near.localPeek(key));
+        assertEquals("1", near.localPeek(key, CachePeekMode.ONHEAP));
         assertEquals(1, near.localSize());
         assertEquals(1, near.localSize());
 
         assertEquals("1", near.getAndReplace(key, "2"));
-        assertEquals("2", near.localPeek(key));
+        assertEquals("2", near.localPeek(key, CachePeekMode.ONHEAP));
 
         assertTrue(near.replace(key, "2"));
 
-        assertEquals("2", near.localPeek(key));
+        assertEquals("2", near.localPeek(key, CachePeekMode.ONHEAP));
         assertEquals(1, near.localSize());
         assertEquals(1, near.localSize());
 
@@ -700,7 +700,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
             assertNotNull(nearEntry2);
             assertTrue("Invalid near entry [hash=" + nearEntry2, nearEntry2.valid(topVer));
 
-            assertEquals(val, cache.localPeek(key));
+            assertEquals(val, cache.localPeek(key, CachePeekMode.ONHEAP));
             assertEquals(val, dht(0).peek(key));
             assertEquals(val, dht(1).peek(key));
 
@@ -719,7 +719,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
             assertEquals(val, cache.get(key));
             assertEquals(val, cache.getAndRemove(key));
 
-            assertNull(cache.localPeek(key));
+            assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
             assertNull(dht(primaryGrid(key)).peek(key));
 
             assertTrue(cache.isLocalLocked(key, false));
@@ -765,7 +765,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         try {
             near.put(key, val);
 
-            assertEquals(val, near.localPeek(key));
+            assertEquals(val, near.localPeek(key, CachePeekMode.ONHEAP));
             assertEquals(val, dht(primaryGrid(key)).peek(key));
 
             assertTrue(near.isLocalLocked(key, false));
@@ -777,7 +777,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
                 assertEquals(val, near.get(key));
                 assertEquals(val, near.getAndRemove(key));
 
-                assertNull(near.localPeek(key));
+                assertNull(near.localPeek(key, CachePeekMode.ONHEAP));
                 assertNull(dht(primaryGrid(key)).peek(key));
 
                 assertTrue(near.isLocalLocked(key, false));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
index 4e53900..9fb2441 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
@@ -216,13 +216,13 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
         try {
             near.put(1, "1");
 
-            assertEquals("1", near.localPeek(1));
+            assertEquals("1", near.localPeek(1, CachePeekMode.ONHEAP));
             assertEquals("1", dht().peek(1));
 
             assertEquals("1", near.get(1));
             assertEquals("1", near.getAndRemove(1));
 
-            assertNull(near.localPeek(1));
+            assertNull(near.localPeek(1, CachePeekMode.ONHEAP));
             assertNull(dht().peek(1));
 
             assertTrue(near.isLocalLocked(1, false));
@@ -247,7 +247,7 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
         try {
             near.put(1, "1");
 
-            assertEquals("1", near.localPeek(1));
+            assertEquals("1", near.localPeek(1, CachePeekMode.ONHEAP));
             assertEquals("1", dht().peek(1));
 
             assertTrue(near.isLocalLocked(1, false));
@@ -259,7 +259,7 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
                 assertEquals("1", near.get(1));
                 assertEquals("1", near.getAndRemove(1));
 
-                assertNull(near.localPeek(1));
+                assertNull(near.localPeek(1, CachePeekMode.ONHEAP));
                 assertNull(dht().peek(1));
 
                 assertTrue(near.isLocalLocked(1, false));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
index 2df1551..95fd9d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyMultiNodeFullApiSelfTest.java
@@ -211,18 +211,18 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         }
 
         for (String key : keys)
-            assertEquals(vals.get(key), nearCache.localPeek(key));
+            assertEquals(vals.get(key), nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         nearCache.clear();
 
         for (String key : keys)
-            assertNull(nearCache.localPeek(key));
+            assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         for (Map.Entry<String, Integer> entry : vals.entrySet())
             nearCache.put(entry.getKey(), entry.getValue());
 
         for (String key : keys)
-            assertEquals(vals.get(key), nearCache.localPeek(key));
+            assertEquals(vals.get(key), nearCache.localPeek(key, CachePeekMode.ONHEAP));
 
         String first = F.first(keys);
 
@@ -233,8 +233,8 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         try {
             nearCache.clear();
 
-            assertEquals(vals.get(first), nearCache.localPeek(first));
-            assertEquals(vals.get(first), primary.localPeek(first));
+            assertEquals(vals.get(first), nearCache.localPeek(first, CachePeekMode.ONHEAP));
+            assertEquals(vals.get(first), primary.localPeek(first, CachePeekMode.ONHEAP));
         }
         finally {
             lock.unlock();
@@ -269,11 +269,11 @@ public class GridCacheNearOnlyMultiNodeFullApiSelfTest extends GridCachePartitio
         nearCache.clear(subKeys);
 
         for (String key : subKeys) {
-            assertNull(nearCache.localPeek(key));
-            assertNotNull(primary.localPeek(key));
+            assertNull(nearCache.localPeek(key, CachePeekMode.ONHEAP));
+            assertNotNull(primary.localPeek(key, CachePeekMode.ONHEAP));
         }
 
-        assertEquals(vals.get(lastKey), nearCache.localPeek(lastKey));
+        assertEquals(vals.get(lastKey), nearCache.localPeek(lastKey, CachePeekMode.ONHEAP));
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java
index ff428f8..69c72d6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFilteredPutSelfTest.java
@@ -120,7 +120,7 @@ public class GridCachePartitionedFilteredPutSelfTest extends GridCommonAbstractT
         }
 
         assert c.localSize() == 0;
-        assert c.localPeek(1) == null;
+        assert c.localPeek(1, CachePeekMode.ONHEAP) == null;
         assert c.get(1) == null;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
index a91f380..f9f6c7d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
@@ -112,11 +112,11 @@ public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest {
             IgniteCache<Integer, Integer> cache = jcache(i);
 
             if (grid(i).affinity(null).isBackup(grid(i).localNode(), 1)) {
-                assert cache.localPeek(1) == 1;
+                assert cache.localPeek(1, CachePeekMode.ONHEAP) == 1;
 
                 assert cache.clear(Collections.singleton(1));
 
-                assert cache.localPeek(1) == null;
+                assert cache.localPeek(1, CachePeekMode.ONHEAP) == null;
 
                 // Store is called in putx method, so we reset counter here.
                 cnt.set(0);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index 6ce9554..3b6571a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -795,7 +795,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
             @Override public boolean apply() {
                 for (int i = 0; i < gridCount(); i++) {
                     for (Integer key : keys) {
-                        Object val = jcache(i).localPeek(key);
+                        Object val = jcache(i).localPeek(key, CachePeekMode.ONHEAP);
 
                         if (val != null) {
                             // log.info("Value [grid=" + i + ", val=" + val + ']');
@@ -815,7 +815,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
             ClusterNode node = grid(i).cluster().localNode();
 
             for (Integer key : keys) {
-                Object val = jcache(i).localPeek(key);
+                Object val = jcache(i).localPeek(key, CachePeekMode.ONHEAP);
 
                 if (val != null) {
                     log.info("Unexpected value [grid=" + i +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
index 3ab9bf7..ed6b574 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/integration/IgniteCacheLoadAllAbstractTest.java
@@ -214,12 +214,12 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract
                 String expVal = expVals.get(key);
 
                 if (aff.isPrimaryOrBackup(node, key)) {
-                    assertEquals(expVal, cache.localPeek(key));
+                    assertEquals(expVal, cache.localPeek(key, CachePeekMode.ONHEAP));
 
                     assertEquals(expVal, cache.get(key));
                 }
                 else {
-                    assertNull(cache.localPeek(key));
+                    assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
                     if (!expVals.containsKey(key))
                         assertNull(cache.get(key));
@@ -227,7 +227,7 @@ public abstract class IgniteCacheLoadAllAbstractTest extends IgniteCacheAbstract
             }
 
             for (int key = keys + 1000; i < keys + 1010; i++) {
-                assertNull(cache.localPeek(key));
+                assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
                 assertNull(cache.get(key));
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/15c3c912/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
index c4b5829..bb24be6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
@@ -820,7 +820,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
             for (int i = 1000; i < 2000; i++) {
                 assertEquals(i, storeMap.get(i));
 
-                assertNull(cache.localPeek(i));
+                assertNull(cache.localPeek(i, CachePeekMode.ONHEAP));
             }
         }
         finally {


Mime
View raw message