ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntikho...@apache.org
Subject [22/27] ignite git commit: IGNITE-1071 IgniteCache.metrics() method returns local metrics
Date Tue, 29 Mar 2016 08:04:51 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java
index 4bd4c59..b227364 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTransactionalAbstractMetricsSelfTest.java
@@ -231,7 +231,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid
 
         for (int i = 0; i < gridCount(); i++) {
             TransactionMetrics metrics = grid(i).transactions().metrics();
-            CacheMetrics cacheMetrics = grid(i).cache(null).metrics();
+            CacheMetrics cacheMetrics = grid(i).cache(null).localMetrics();
 
             if (i == 0) {
                 assertEquals(TX_CNT, metrics.txCommits());
@@ -276,7 +276,7 @@ public abstract class GridCacheTransactionalAbstractMetricsSelfTest extends Grid
 
         for (int i = 0; i < gridCount(); i++) {
             TransactionMetrics metrics = grid(i).transactions().metrics();
-            CacheMetrics cacheMetrics = grid(i).cache(null).metrics();
+            CacheMetrics cacheMetrics = grid(i).cache(null).localMetrics();
 
             assertEquals(0, metrics.txCommits());
             assertEquals(0, cacheMetrics.getCacheTxCommits());

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/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 463c2c0..aa7f6fa 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
@@ -476,7 +476,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
                 if (tx != null)
                     tx.commit();
 
-                System.out.println(cache.metrics());
+                System.out.println(cache.localMetrics());
 
                 assertEquals("Hello", cache.get(1));
                 assertEquals("World", cache.get(2));

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java
index 3ace98d..16aa72d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledMetricsSelfTest.java
@@ -107,7 +107,7 @@ public class GridCachePartitionedNearDisabledMetricsSelfTest extends GridCacheAb
         long misses = 0;
 
         for (int i = 0; i < gridCount(); i++) {
-            CacheMetrics m = grid(i).cache(null).metrics();
+            CacheMetrics m = grid(i).cache(null).localMetrics();
 
             removes += m.getCacheRemovals();
             reads += m.getCacheGets();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java
index d94fe68..9e4be22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPartitionedTckMetricsSelfTestImpl.java
@@ -50,19 +50,19 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA
             }
         });
 
-        assertEquals(1L, cache.metrics().getCachePuts());
+        assertEquals(1L, cache.localMetrics().getCachePuts());
 
         assertEquals(20, result);
-        assertEquals(1L, cache.metrics().getCacheHits());
-        assertEquals(100.0f, cache.metrics().getCacheHitPercentage());
-        assertEquals(0L, cache.metrics().getCacheMisses());
-        assertEquals(0f, cache.metrics().getCacheMissPercentage());
-        assertEquals(1L, cache.metrics().getCachePuts());
-        assertEquals(1L, cache.metrics().getCacheRemovals());
-        assertEquals(0L, cache.metrics().getCacheEvictions());
-        assert cache.metrics().getAveragePutTime() >= 0;
-        assert cache.metrics().getAverageGetTime() >= 0;
-        assert cache.metrics().getAverageRemoveTime() >= 0;
+        assertEquals(1L, cache.localMetrics().getCacheHits());
+        assertEquals(100.0f, cache.localMetrics().getCacheHitPercentage());
+        assertEquals(0L, cache.localMetrics().getCacheMisses());
+        assertEquals(0f, cache.localMetrics().getCacheMissPercentage());
+        assertEquals(1L, cache.localMetrics().getCachePuts());
+        assertEquals(1L, cache.localMetrics().getCacheRemovals());
+        assertEquals(0L, cache.localMetrics().getCacheEvictions());
+        assert cache.localMetrics().getAveragePutTime() >= 0;
+        assert cache.localMetrics().getAverageGetTime() >= 0;
+        assert cache.localMetrics().getAverageRemoveTime() >= 0;
     }
 
     /**
@@ -73,36 +73,36 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA
 
         cache.put(1, 10);
 
-        assertEquals(0, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.remove(1);
 
-        assertEquals(0, cache.metrics().getCacheHits());
-        assertEquals(1, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheHits());
+        assertEquals(1, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.remove(1);
 
-        assertEquals(0, cache.metrics().getCacheHits());
-        assertEquals(0, cache.metrics().getCacheMisses());
-        assertEquals(1, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheHits());
+        assertEquals(0, cache.localMetrics().getCacheMisses());
+        assertEquals(1, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.put(1, 10);
         assertTrue(cache.remove(1, 10));
 
-        assertEquals(1, cache.metrics().getCacheHits());
-        assertEquals(0, cache.metrics().getCacheMisses());
-        assertEquals(2, cache.metrics().getCacheRemovals());
-        assertEquals(2, cache.metrics().getCachePuts());
+        assertEquals(1, cache.localMetrics().getCacheHits());
+        assertEquals(0, cache.localMetrics().getCacheMisses());
+        assertEquals(2, cache.localMetrics().getCacheRemovals());
+        assertEquals(2, cache.localMetrics().getCachePuts());
 
         assertFalse(cache.remove(1, 10));
 
-        assertEquals(1, cache.metrics().getCacheHits());
-        assertEquals(1, cache.metrics().getCacheMisses());
-        assertEquals(2, cache.metrics().getCacheRemovals());
-        assertEquals(2, cache.metrics().getCachePuts());
+        assertEquals(1, cache.localMetrics().getCacheHits());
+        assertEquals(1, cache.localMetrics().getCacheMisses());
+        assertEquals(2, cache.localMetrics().getCacheRemovals());
+        assertEquals(2, cache.localMetrics().getCachePuts());
     }
 
     /**
@@ -120,18 +120,18 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA
         ++missCount;
         assertFalse(result);
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         assertNull(cache.localPeek(1));
 
         cache.put(1, 10);
         ++putCount;
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         assertNotNull(cache.localPeek(1));
 
@@ -141,18 +141,18 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA
         ++hitCount;
         ++putCount;
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         result = cache.replace(1, 40, 50);
 
         assertFalse(result);
         ++hitCount;
 
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
-        assertEquals(missCount, cache.metrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
     }
 
     /**
@@ -170,17 +170,17 @@ public class GridCacheAtomicPartitionedTckMetricsSelfTestImpl extends GridCacheA
         ++putCount;
         assertTrue(result);
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         result = cache.putIfAbsent(1, 1);
 
         cache.containsKey(123);
 
         assertFalse(result);
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
-        assertEquals(missCount, cache.metrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java
index 01ed157..09ff519 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMetricsSelfTest.java
@@ -72,7 +72,7 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             assert g.cache(null).localSize() == 0;
 
-            g.cache(null).mxBean().clear();
+            g.cache(null).localMxBean().clear();
         }
     }
 
@@ -116,8 +116,8 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Puts: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Puts: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -131,23 +131,23 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             IgniteCache<Object, Object> jcache = g.cache(null);
 
-            info("Puts: " + jcache.metrics().getCachePuts());
-            info("Reads: " + jcache.metrics().getCacheGets());
+            info("Puts: " + jcache.localMetrics().getCachePuts());
+            info("Reads: " + jcache.localMetrics().getCacheGets());
 
             if (affinity(jcache).isPrimaryOrBackup(g.cluster().localNode(), key))
-                assertEquals(1, jcache.metrics().getCachePuts());
+                assertEquals(1, jcache.localMetrics().getCachePuts());
             else
-                assertEquals(0, jcache.metrics().getCachePuts());
+                assertEquals(0, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimary(g.cluster().localNode(), key)) {
-                assertEquals(2, jcache.metrics().getCacheGets());
-                assertEquals(1, jcache.metrics().getCacheHits());
-                assertEquals(1, jcache.metrics().getCacheMisses());
+                assertEquals(2, jcache.localMetrics().getCacheGets());
+                assertEquals(1, jcache.localMetrics().getCacheHits());
+                assertEquals(1, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
         }
     }
@@ -171,8 +171,8 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Puts: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Puts: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -184,24 +184,24 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
             IgniteCache<Object, Object> jcache = g.cache(null);
 
             if (affinity(jcache).isPrimaryOrBackup(g.cluster().localNode(), key))
-                assertEquals(1, jcache.metrics().getCachePuts());
+                assertEquals(1, jcache.localMetrics().getCachePuts());
             else
-                assertEquals(0, jcache.metrics().getCachePuts());
+                assertEquals(0, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimary(g.cluster().localNode(), key)) {
-                assertEquals(1, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(1, jcache.metrics().getCacheMisses());
+                assertEquals(1, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(1, jcache.localMetrics().getCacheMisses());
             }
             else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){
-                assertEquals(1, jcache.metrics().getCacheGets());
-                assertEquals(1, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(1, jcache.localMetrics().getCacheGets());
+                assertEquals(1, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
         }
     }
@@ -225,8 +225,8 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -238,22 +238,22 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             IgniteCache<Object, Object> jcache = g.cache(null);
 
-            assertEquals(1, jcache.metrics().getCachePuts());
+            assertEquals(1, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimary(g.cluster().localNode(), key)) {
-                assertEquals(1, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(1, jcache.metrics().getCacheMisses());
+                assertEquals(1, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(1, jcache.localMetrics().getCacheMisses());
             }
             else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(1, jcache.metrics().getCacheGets());
-                assertEquals(1, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(1, jcache.localMetrics().getCacheGets());
+                assertEquals(1, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
         }
     }
@@ -275,14 +275,14 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 cache0.get(i); // +1 read.
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -296,20 +296,20 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             IgniteCache<Object, Object> jcache = g.cache(null);
 
-            info("Writes: " + jcache.metrics().getCachePuts());
-            info("Reads: " + jcache.metrics().getCacheGets());
+            info("Writes: " + jcache.localMetrics().getCachePuts());
+            info("Reads: " + jcache.localMetrics().getCacheGets());
 
-            assertEquals(0, jcache.metrics().getCachePuts());
+            assertEquals(0, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimary(g.cluster().localNode(), key)) {
-                assertEquals(2, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(2, jcache.metrics().getCacheMisses());
+                assertEquals(2, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(2, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
         }
     }
@@ -331,14 +331,14 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 cache0.get(i); // +1 read.
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -350,17 +350,17 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             IgniteCache<Object, Object> jcache = g.cache(null);
 
-            assertEquals(0, jcache.metrics().getCachePuts());
+            assertEquals(0, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimaryOrBackup(g.cluster().localNode(), key)) {
-                assertEquals(2, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(2, jcache.metrics().getCacheMisses());
+                assertEquals(2, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(2, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
         }
     }
@@ -383,10 +383,10 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
                 key = i;
 
-                info("Writes: " + cache0.metrics().getCachePuts());
-                info("Reads: " + cache0.metrics().getCacheGets());
-                info("Hits: " + cache0.metrics().getCacheHits());
-                info("Misses: " + cache0.metrics().getCacheMisses());
+                info("Writes: " + cache0.localMetrics().getCachePuts());
+                info("Reads: " + cache0.localMetrics().getCacheGets());
+                info("Hits: " + cache0.localMetrics().getCacheHits());
+                info("Misses: " + cache0.localMetrics().getCacheMisses());
                 info("Affinity nodes: " + U.nodes2names(affinity(cache0).mapKeyToPrimaryAndBackups(i)));
 
                 break;
@@ -398,22 +398,22 @@ public class GridCacheNearMetricsSelfTest extends GridCacheAbstractSelfTest {
 
             IgniteCache<Object, Object> jcache = g.cache(null);
 
-            assertEquals(0, jcache.metrics().getCachePuts());
+            assertEquals(0, jcache.localMetrics().getCachePuts());
 
             if (affinity(jcache).isPrimary(g.cluster().localNode(), key)) {
-                assertEquals(2, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(2, jcache.metrics().getCacheMisses());
+                assertEquals(2, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(2, jcache.localMetrics().getCacheMisses());
             }
             else if (affinity(jcache).isBackup(g.cluster().localNode(), key)){
-                assertEquals(0, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(0, jcache.metrics().getCacheMisses());
+                assertEquals(0, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(0, jcache.localMetrics().getCacheMisses());
             }
             else {
-                assertEquals(2, jcache.metrics().getCacheGets());
-                assertEquals(0, jcache.metrics().getCacheHits());
-                assertEquals(2, jcache.metrics().getCacheMisses());
+                assertEquals(2, jcache.localMetrics().getCacheGets());
+                assertEquals(0, jcache.localMetrics().getCacheHits());
+                assertEquals(2, jcache.localMetrics().getCacheMisses());
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index 02eb9d8..16faa45 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -114,7 +114,7 @@ public class GridCachePartitionedHitsAndMissesSelfTest extends GridCommonAbstrac
             long misses = 0;
 
             for (int i = 0; i < GRID_CNT; i++) {
-                CacheMetrics m = grid(i).cache(null).metrics();
+                CacheMetrics m = grid(i).cache(null).localMetrics();
 
                 hits += m.getCacheHits();
                 misses += m.getCacheMisses();

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
index b638236..15ac96e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/CacheLocalOffHeapAndSwapMetricsSelfTest.java
@@ -113,74 +113,74 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapEntriesCount());
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
+        assertEquals(0, cache.localMetrics().getOffHeapHits());
+        assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
+        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
+
+        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
 
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
 
         for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
-        assertEquals(100 / 3.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
-        assertEquals(100 - (100 / 3.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
+        assertEquals(100 / 3.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100 - (100 / 3.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
 
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.remove(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getOffHeapHits());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapHits());
         assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
+            cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
         assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getOffHeapRemovals());
+            cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapRemovals());
 
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(0, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
     }
 
     /**
@@ -194,62 +194,62 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapGets());
-        assertEquals(0, cache.metrics().getSwapHits());
-        assertEquals(0f, cache.metrics().getSwapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
-        assertEquals(100f, cache.metrics().getSwapMissPercentage());
-        assertEquals(0, cache.metrics().getSwapRemovals());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapGets());
+        assertEquals(0, cache.localMetrics().getSwapHits());
+        assertEquals(0f, cache.localMetrics().getSwapHitPercentage());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapMisses());
+        assertEquals(100f, cache.localMetrics().getSwapMissPercentage());
+        assertEquals(0, cache.localMetrics().getSwapRemovals());
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getSwapEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapHits());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapMisses());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapRemovals());
 
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getSwapEntriesCount());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getSwapEntriesCount());
 
         for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
-        assertEquals(100 / 3.0, cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
-        assertEquals(100 - (100 / 3.0), cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 3, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapHits());
+        assertEquals(100 / 3.0, cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapMisses());
+        assertEquals(100 - (100 / 3.0), cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapRemovals());
 
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.metrics().getSwapEntriesCount());
+        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getSwapEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.remove(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getSwapHits());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getSwapHits());
         assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+            cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapMisses());
         assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.metrics().getSwapRemovals());
+            cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getSwapRemovals());
 
-        assertEquals(0, cache.metrics().getSwapEntriesCount());
+        assertEquals(0, cache.localMetrics().getSwapEntriesCount());
     }
 
     /**
@@ -263,116 +263,116 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapGets());
-        assertEquals(0, cache.metrics().getSwapHits());
-        assertEquals(0f, cache.metrics().getSwapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
-        assertEquals(100f, cache.metrics().getSwapMissPercentage());
-        assertEquals(0, cache.metrics().getSwapRemovals());
-
-        assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
+        assertEquals(0, cache.localMetrics().getOffHeapHits());
+        assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
+        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
+        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
+
+        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
+
+        assertEquals(cache.localMetrics().getOffHeapEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapGets());
+        assertEquals(0, cache.localMetrics().getSwapHits());
+        assertEquals(0f, cache.localMetrics().getSwapHitPercentage());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapMisses());
+        assertEquals(100f, cache.localMetrics().getSwapMissPercentage());
+        assertEquals(0, cache.localMetrics().getSwapRemovals());
+
+        assertEquals(cache.localMetrics().getOffHeapEvictions(), cache.localMetrics().getSwapEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
-        assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapMisses());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
-
-        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
+        assertEquals(0, cache.localMetrics().getOffHeapHits());
+        assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
+
+        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
+
+        assertEquals(cache.localMetrics().getOffHeapEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapHits());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapMisses());
+        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapRemovals());
+
+        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getSwapEntriesCount());
 
         for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
             cache.get(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapMisses());
-        assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getSwapHits());
-        assertEquals(100 / 3.0, cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
-        assertEquals(100 - (100 / 3.0), cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getSwapRemovals());
-
-        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
+        assertEquals(0, cache.localMetrics().getOffHeapHits());
+        assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapMisses());
+        assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
+
+        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
+
+        assertEquals(cache.localMetrics().getOffHeapEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 3, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapHits());
+        assertEquals(100 / 3.0, cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapMisses());
+        assertEquals(100 - (100 / 3.0), cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT, cache.localMetrics().getSwapRemovals());
+
+        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getSwapEntriesCount());
 
         for (int i = 0; i < KEYS_CNT; i++)
             cache.remove(i);
 
         printStat();
 
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.metrics().getOffHeapGets());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapHits());
+        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
+        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapHits());
         assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE, cache.metrics().getOffHeapMisses());
+            cache.localMetrics().getOffHeapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE, cache.localMetrics().getOffHeapMisses());
         assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapRemovals());
+            cache.localMetrics().getOffHeapMissPercentage(), 0.1);
+        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapRemovals());
 
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(0, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
+        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
+        assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
+        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
 
-        assertEquals(cache.metrics().getOffHeapEvictions(), cache.metrics().getSwapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapGets());
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapHits());
+        assertEquals(cache.localMetrics().getOffHeapEvictions(), cache.localMetrics().getSwapPuts());
+        assertEquals(KEYS_CNT * 4 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getSwapGets());
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getSwapHits());
         assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE - OFFHEAP_MAX_CNT) / (KEYS_CNT * 4.0 - MAX_SIZE - OFFHEAP_MAX_CNT),
-            cache.metrics().getSwapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getSwapMisses());
+            cache.localMetrics().getSwapHitPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2, cache.localMetrics().getSwapMisses());
         assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE - OFFHEAP_MAX_CNT),
-            cache.metrics().getSwapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.metrics().getSwapRemovals());
+            cache.localMetrics().getSwapMissPercentage(), 0.1);
+        assertEquals(KEYS_CNT * 2 - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getSwapRemovals());
 
-        assertEquals(0, cache.metrics().getSwapEntriesCount());
+        assertEquals(0, cache.localMetrics().getSwapEntriesCount());
     }
 
     /**
@@ -380,36 +380,36 @@ public class CacheLocalOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractT
      */
     protected void printStat() {
         System.out.println("!!! -------------------------------------------------------");
-        System.out.println("!!! Puts: cache = " + cache.metrics().getCachePuts() +
-            ", offheap = " + cache.metrics().getOffHeapPuts() +
-            ", swap = " + cache.metrics().getSwapPuts());
-        System.out.println("!!! Gets: cache = " + cache.metrics().getCacheGets() +
-            ", offheap = " + cache.metrics().getOffHeapGets() +
-            ", swap = " + cache.metrics().getSwapGets());
-        System.out.println("!!! Removes: cache = " + cache.metrics().getCacheRemovals() +
-            ", offheap = " + cache.metrics().getOffHeapRemovals() +
-            ", swap = " + cache.metrics().getSwapRemovals());
-        System.out.println("!!! Evictions: cache = " + cache.metrics().getCacheEvictions() +
-            ", offheap = " + cache.metrics().getOffHeapEvictions() +
+        System.out.println("!!! Puts: cache = " + cache.localMetrics().getCachePuts() +
+            ", offheap = " + cache.localMetrics().getOffHeapPuts() +
+            ", swap = " + cache.localMetrics().getSwapPuts());
+        System.out.println("!!! Gets: cache = " + cache.localMetrics().getCacheGets() +
+            ", offheap = " + cache.localMetrics().getOffHeapGets() +
+            ", swap = " + cache.localMetrics().getSwapGets());
+        System.out.println("!!! Removes: cache = " + cache.localMetrics().getCacheRemovals() +
+            ", offheap = " + cache.localMetrics().getOffHeapRemovals() +
+            ", swap = " + cache.localMetrics().getSwapRemovals());
+        System.out.println("!!! Evictions: cache = " + cache.localMetrics().getCacheEvictions() +
+            ", offheap = " + cache.localMetrics().getOffHeapEvictions() +
             ", swap = none" );
-        System.out.println("!!! Hits: cache = " + cache.metrics().getCacheHits() +
-            ", offheap = " + cache.metrics().getOffHeapHits() +
-            ", swap = " + cache.metrics().getSwapHits());
-        System.out.println("!!! Hit(%): cache = " + cache.metrics().getCacheHitPercentage() +
-            ", offheap = " + cache.metrics().getOffHeapHitPercentage() +
-            ", swap = " + cache.metrics().getSwapHitPercentage());
-        System.out.println("!!! Misses: cache = " + cache.metrics().getCacheMisses() +
-            ", offheap = " + cache.metrics().getOffHeapMisses() +
-            ", swap = " + cache.metrics().getSwapMisses());
-        System.out.println("!!! Miss(%): cache = " + cache.metrics().getCacheMissPercentage() +
-            ", offheap = " + cache.metrics().getOffHeapMissPercentage() +
-            ", swap = " + cache.metrics().getSwapMissPercentage());
-        System.out.println("!!! Entries: cache = " + cache.metrics().getSize() +
-            ", offheap = " + cache.metrics().getOffHeapEntriesCount() +
-            ", swap = " + cache.metrics().getSwapEntriesCount());
+        System.out.println("!!! Hits: cache = " + cache.localMetrics().getCacheHits() +
+            ", offheap = " + cache.localMetrics().getOffHeapHits() +
+            ", swap = " + cache.localMetrics().getSwapHits());
+        System.out.println("!!! Hit(%): cache = " + cache.localMetrics().getCacheHitPercentage() +
+            ", offheap = " + cache.localMetrics().getOffHeapHitPercentage() +
+            ", swap = " + cache.localMetrics().getSwapHitPercentage());
+        System.out.println("!!! Misses: cache = " + cache.localMetrics().getCacheMisses() +
+            ", offheap = " + cache.localMetrics().getOffHeapMisses() +
+            ", swap = " + cache.localMetrics().getSwapMisses());
+        System.out.println("!!! Miss(%): cache = " + cache.localMetrics().getCacheMissPercentage() +
+            ", offheap = " + cache.localMetrics().getOffHeapMissPercentage() +
+            ", swap = " + cache.localMetrics().getSwapMissPercentage());
+        System.out.println("!!! Entries: cache = " + cache.localMetrics().getSize() +
+            ", offheap = " + cache.localMetrics().getOffHeapEntriesCount() +
+            ", swap = " + cache.localMetrics().getSwapEntriesCount());
         System.out.println("!!! Size: cache = none" +
-            ", offheap = " + cache.metrics().getOffHeapAllocatedSize() +
-            ", swap = " + cache.metrics().getSwapSize());
+            ", offheap = " + cache.localMetrics().getOffHeapAllocatedSize() +
+            ", swap = " + cache.localMetrics().getSwapSize());
         System.out.println();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java
index 0cc2377..fa21de9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheAtomicLocalTckMetricsSelfTestImpl.java
@@ -45,19 +45,19 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL
             }
         });
 
-        assertEquals(1L, cache.metrics().getCachePuts());
+        assertEquals(1L, cache.localMetrics().getCachePuts());
 
         assertEquals(20, result);
-        assertEquals(1L, cache.metrics().getCacheHits());
-        assertEquals(100.0f, cache.metrics().getCacheHitPercentage());
-        assertEquals(0L, cache.metrics().getCacheMisses());
-        assertEquals(0f, cache.metrics().getCacheMissPercentage());
-        assertEquals(1L, cache.metrics().getCachePuts());
-        assertEquals(1L, cache.metrics().getCacheRemovals());
-        assertEquals(0L, cache.metrics().getCacheEvictions());
-        assert cache.metrics().getAveragePutTime() >= 0;
-        assert cache.metrics().getAverageGetTime() >= 0;
-        assert cache.metrics().getAverageRemoveTime() >= 0;
+        assertEquals(1L, cache.localMetrics().getCacheHits());
+        assertEquals(100.0f, cache.localMetrics().getCacheHitPercentage());
+        assertEquals(0L, cache.localMetrics().getCacheMisses());
+        assertEquals(0f, cache.localMetrics().getCacheMissPercentage());
+        assertEquals(1L, cache.localMetrics().getCachePuts());
+        assertEquals(1L, cache.localMetrics().getCacheRemovals());
+        assertEquals(0L, cache.localMetrics().getCacheEvictions());
+        assert cache.localMetrics().getAveragePutTime() >= 0;
+        assert cache.localMetrics().getAverageGetTime() >= 0;
+        assert cache.localMetrics().getAverageRemoveTime() >= 0;
     }
 
     /**
@@ -68,36 +68,36 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL
 
         cache.put(1, 10);
 
-        assertEquals(0, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.remove(1);
 
-        assertEquals(0, cache.metrics().getCacheHits());
-        assertEquals(1, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheHits());
+        assertEquals(1, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.remove(1);
 
-        assertEquals(0, cache.metrics().getCacheHits());
-        assertEquals(0, cache.metrics().getCacheMisses());
-        assertEquals(1, cache.metrics().getCacheRemovals());
-        assertEquals(1, cache.metrics().getCachePuts());
+        assertEquals(0, cache.localMetrics().getCacheHits());
+        assertEquals(0, cache.localMetrics().getCacheMisses());
+        assertEquals(1, cache.localMetrics().getCacheRemovals());
+        assertEquals(1, cache.localMetrics().getCachePuts());
 
         cache.put(1, 10);
         assertTrue(cache.remove(1, 10));
 
-        assertEquals(1, cache.metrics().getCacheHits());
-        assertEquals(0, cache.metrics().getCacheMisses());
-        assertEquals(2, cache.metrics().getCacheRemovals());
-        assertEquals(2, cache.metrics().getCachePuts());
+        assertEquals(1, cache.localMetrics().getCacheHits());
+        assertEquals(0, cache.localMetrics().getCacheMisses());
+        assertEquals(2, cache.localMetrics().getCacheRemovals());
+        assertEquals(2, cache.localMetrics().getCachePuts());
 
         assertFalse(cache.remove(1, 10));
 
-        assertEquals(1, cache.metrics().getCacheHits());
-        assertEquals(1, cache.metrics().getCacheMisses());
-        assertEquals(2, cache.metrics().getCacheRemovals());
-        assertEquals(2, cache.metrics().getCachePuts());
+        assertEquals(1, cache.localMetrics().getCacheHits());
+        assertEquals(1, cache.localMetrics().getCacheMisses());
+        assertEquals(2, cache.localMetrics().getCacheRemovals());
+        assertEquals(2, cache.localMetrics().getCachePuts());
     }
 
     /**
@@ -115,18 +115,18 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL
         ++missCount;
         assertFalse(result);
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         assertNull(cache.localPeek(1));
 
         cache.put(1, 10);
         ++putCount;
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         assertNotNull(cache.localPeek(1));
 
@@ -136,18 +136,18 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL
         ++hitCount;
         ++putCount;
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         result = cache.replace(1, 40, 50);
 
         assertFalse(result);
         ++hitCount;
 
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
-        assertEquals(missCount, cache.metrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
     }
 
     /**
@@ -165,15 +165,15 @@ public class GridCacheAtomicLocalTckMetricsSelfTestImpl extends GridCacheAtomicL
         ++putCount;
         assertTrue(result);
 
-        assertEquals(missCount, cache.metrics().getCacheMisses());
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
 
         result = cache.putIfAbsent(1, 1);
 
         assertFalse(result);
-        assertEquals(hitCount, cache.metrics().getCacheHits());
-        assertEquals(putCount, cache.metrics().getCachePuts());
-        assertEquals(missCount, cache.metrics().getCacheMisses());
+        assertEquals(hitCount, cache.localMetrics().getCacheHits());
+        assertEquals(putCount, cache.localMetrics().getCachePuts());
+        assertEquals(missCount, cache.localMetrics().getCacheMisses());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f17b2ae0/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
index 7286fb3..205dc83 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/multijvm/IgniteCacheProcessProxy.java
@@ -439,11 +439,19 @@ public class IgniteCacheProcessProxy<K, V> implements IgniteCache<K, V> {
         throw new UnsupportedOperationException("Method should be supported.");
     }
 
+    @Override public CacheMetrics localMetrics() {
+        throw new UnsupportedOperationException("Method should be supported.");
+    }
+
     /** {@inheritDoc} */
     @Override public CacheMetricsMXBean mxBean() {
         throw new UnsupportedOperationException("Method should be supported.");
     }
 
+    @Override public CacheMetricsMXBean localMxBean() {
+        throw new UnsupportedOperationException("Method should be supported.");
+    }
+
     /** {@inheritDoc} */
     @Override public <K1, V1> IgniteCache<K1, V1> withKeepBinary() {
         throw new UnsupportedOperationException("Method should be supported.");


Mime
View raw message