ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [23/45] incubator-ignite git commit: # IGNITE-56 Get rid Ignite.cache(), use ((IgniteKernal)ignite).cache() instead.
Date Sun, 15 Feb 2015 03:12:14 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
index 0fe2fe8..bba57ed 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractQuerySelfTest.java
@@ -176,7 +176,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testDifferentKeyTypes() throws Exception {
-        GridCache<Object, Object> cache = ignite.cache(null);
+        GridCache<Object, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("key", "value");
 
@@ -191,7 +191,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testDifferentValueTypes() throws Exception {
-        GridCache<Object, Object> cache = ignite.cache(null);
+        GridCache<Object, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("key", "value");
 
@@ -206,7 +206,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testStringType() throws Exception {
-        GridCache<String, String> cache = ignite.cache(null);
+        GridCache<String, String> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("tst", "test");
 
@@ -223,7 +223,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testIntegerType() throws Exception {
-        GridCache<String, Integer> cache = ignite.cache(null);
+        GridCache<String, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         String key = "k";
 
@@ -248,7 +248,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      */
     public void testUserDefinedFunction() throws IgniteCheckedException {
         // Without alias.
-        CacheQuery<List<?>> qry = ignite.cache(null).queries().createSqlFieldsQuery("select square(1), square(2)").
+        CacheQuery<List<?>> qry = ((IgniteKernal)ignite).cache(null).queries().createSqlFieldsQuery("select square(1), square(2)").
             projection(ignite.cluster());
 
         CacheQueryFuture<List<?>> fut = qry.execute();
@@ -263,7 +263,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         assertEquals(4, row.get(1));
 
         // With alias.
-        qry = ignite.cache(null).queries().createSqlFieldsQuery("select _cube_(1), _cube_(2)").projection(ignite.cluster());
+        qry = ((IgniteKernal)ignite).cache(null).queries().createSqlFieldsQuery("select _cube_(1), _cube_(2)").projection(ignite.cluster());
 
         fut = qry.execute();
 
@@ -277,7 +277,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         assertEquals(8, row.get(1));
 
         // Not registered.
-        final CacheQuery<List<?>> qry3 = ignite.cache(null).queries().createSqlFieldsQuery("select no()");
+        final CacheQuery<List<?>> qry3 = ((IgniteKernal)ignite).cache(null).queries().createSqlFieldsQuery("select no()");
 
         GridTestUtils.assertThrows(
             log,
@@ -302,7 +302,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         ignite.jcache(null).
             withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, 1000))).put("key1", 1);
 
-        GridCache<String, Integer> cache = ignite.cache(null);
+        GridCache<String, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         CacheQuery<Map.Entry<String, Integer>> qry = cache.queries().createSqlQuery(Integer.class, "1=1");
 
@@ -321,7 +321,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testIllegalBounds() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.put(1, 1);
         cache.put(2, 2);
@@ -338,7 +338,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testComplexType() throws Exception {
-        GridCache<Key, GridCacheQueryTestValue> cache = ignite.cache(null);
+        GridCache<Key, GridCacheQueryTestValue> cache = ((IgniteKernal)ignite).cache(null);
 
         GridCacheQueryTestValue val1 = new GridCacheQueryTestValue();
 
@@ -408,7 +408,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testSelectQuery() throws Exception {
-        GridCache<String, String> cache = ignite.cache(null);
+        GridCache<String, String> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("key", "value");
 
@@ -427,7 +427,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testObjectQuery() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
 
         ObjectValue val = new ObjectValue("test", 0);
 
@@ -465,7 +465,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testTextQueryOnProjection() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx(1, new ObjectValue("test", 1));
         cache.putx(2, new ObjectValue("test", 2));
@@ -499,7 +499,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testObjectQueryWithSwap() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
 
         boolean partitioned = cache.configuration().getCacheMode() == PARTITIONED;
 
@@ -509,7 +509,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             cache.putx(i, new ObjectValue("test" + i, i));
 
         for (Ignite g : G.allGrids()) {
-            GridCache<Integer, ObjectValue> c = g.cache(null);
+            GridCache<Integer, ObjectValue> c = ((IgniteKernal)g).cache(null);
 
             for (int i = 0; i < cnt; i++) {
                 if (i % 2 == 0) {
@@ -589,7 +589,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testFullTextSearch() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
 
         // Try to execute on empty cache first.
         CacheQuery<Map.Entry<Integer, ObjectValue>> qry = cache.queries().createFullTextQuery(ObjectValue.class,
@@ -636,8 +636,8 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testRemoveIndex() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
-        GridCache<Integer, ObjectValue> cache1 = ignite.cache("c1");
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
+        GridCache<Integer, ObjectValue> cache1 = ((IgniteKernal)ignite).cache("c1");
 
         ObjectValue val = new ObjectValue("test full text", 0);
 
@@ -672,7 +672,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testScanQuery() throws Exception {
-        GridCache<String, String> c1 = ignite.cache(null);
+        GridCache<String, String> c1 = ((IgniteKernal)ignite).cache(null);
 
         c1.putx("key", "value");
 
@@ -700,7 +700,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testTwoObjectsTextSearch() throws Exception {
-        GridCache<Object, Object> c = ignite.cache(null);
+        GridCache<Object, Object> c = ((IgniteKernal)ignite).cache(null);
 
         c.put(1, new ObjectValue("ObjectValue str", 1));
         c.put("key", new ObjectValueOther("ObjectValueOther str"));
@@ -737,7 +737,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception In case of error.
      */
     public void testTransformQuery() throws Exception {
-        GridCache<UUID, Person> c = ignite.cache(null);
+        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
 
         final Person p1 = new Person("Bob", 100);
         final Person p2 = new Person("Tom", 200);
@@ -827,7 +827,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testReduceQuery() throws Exception {
-        GridCache<String, Integer> c = ignite.cache(null);
+        GridCache<String, Integer> c = ((IgniteKernal)ignite).cache(null);
 
         assert c.putx("key1", 1);
         assert c.putx("key2", 2);
@@ -848,7 +848,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testReduceQueryOnProjection() throws Exception {
-        CacheProjection<String, Integer> c = ignite.cache(null);
+        CacheProjection<String, Integer> c = ((IgniteKernal)ignite).cache(null);
 
         assert c.putx("key1", 1);
         assert c.putx("key2", 2);
@@ -876,7 +876,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testEmptyObject() throws Exception {
-        GridCache<EmptyObject, EmptyObject> cache = ignite.cache(null);
+        GridCache<EmptyObject, EmptyObject> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx(new EmptyObject(1), new EmptyObject(2));
 
@@ -892,7 +892,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testPrimitiveType() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         assert cache.putx(1, 1);
         assert cache.putx(2, 2);
@@ -928,7 +928,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     private void testPaginationIterator(@Nullable String cacheName) throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(cacheName);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(cacheName);
 
         for (int i = 0; i < 50; i++)
             assertTrue(cache.putx(i, i));
@@ -965,7 +965,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testPaginationIteratorKeepAll() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 50; i++)
             assertTrue(cache.putx(i, i));
@@ -1028,7 +1028,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     private void testPaginationGet(@Nullable String cacheName) throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(cacheName);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(cacheName);
 
         for (int i = 0; i < 50; i++)
             assertTrue(cache.putx(i, i));
@@ -1058,7 +1058,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testScanFilters() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 50; i++)
             assertTrue(cache.putx(i, i));
@@ -1097,7 +1097,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testEmptyGrid() throws Exception {
-        GridCache<String, Integer> cache = ignite.cache(null);
+        GridCache<String, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         String key = "k";
 
@@ -1119,7 +1119,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws IgniteCheckedException if failed.
      */
     public void testBadHashObjectKey() throws IgniteCheckedException {
-        GridCache<BadHashKeyObject, Integer> cache = ignite.cache(null);
+        GridCache<BadHashKeyObject, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.put(new BadHashKeyObject("test_key1"), 9);
         cache.put(new BadHashKeyObject("test_key0"), 1005001);
@@ -1133,7 +1133,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws IgniteCheckedException if failed.
      */
     public void testTextIndexedKey() throws IgniteCheckedException {
-        GridCache<ObjectValue, Integer> cache = ignite.cache(null);
+        GridCache<ObjectValue, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.put(new ObjectValue("test_key1", 10), 19);
         cache.put(new ObjectValue("test_key0", 11), 11005);
@@ -1148,7 +1148,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testAnonymousClasses() throws Exception {
-        GridCache<Integer, Object> cache = ignite.cache(null);
+        GridCache<Integer, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         Object val = new Object() {
             @CacheQuerySqlField
@@ -1190,7 +1190,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testTwoAnonymousClasses() throws Exception {
-        GridCache<Integer, Object> cache = ignite.cache(null);
+        GridCache<Integer, Object> cache = ((IgniteKernal)ignite).cache(null);
 
         Object val1 = new Object() {
             @Override public String toString() {
@@ -1220,7 +1220,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testOrderByOnly() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 10; i++)
             assertTrue(cache.putx(i, i));
@@ -1251,7 +1251,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testLimitOnly() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 10; i++)
             assertTrue(cache.putx(i, i));
@@ -1282,7 +1282,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
      * @throws Exception If failed.
      */
     public void testArray() throws Exception {
-        GridCache<Integer, ArrayObject> cache = ignite.cache(null);
+        GridCache<Integer, ArrayObject> cache = ((IgniteKernal)ignite).cache(null);
 
         assertTrue(cache.putx(1, new ArrayObject(new Long[] {1L, null, 3L})));
         assertTrue(cache.putx(2, new ArrayObject(new Long[] {4L, 5L, 6L})));
@@ -1375,7 +1375,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }, EVT_CACHE_QUERY_EXECUTED);
         }
 
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 20; i++)
             assertTrue(cache.putx(i, i));
@@ -1469,7 +1469,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }, EVT_CACHE_QUERY_EXECUTED);
         }
 
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 20; i++)
             assertTrue(cache.putx(i, i));
@@ -1567,7 +1567,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }, EVT_CACHE_QUERY_EXECUTED);
         }
 
-        GridCache<Integer, Person> cache = ignite.cache(null);
+        GridCache<Integer, Person> cache = ((IgniteKernal)ignite).cache(null);
 
         assertTrue(cache.putx(1, new Person("Bob White", 1000)));
         assertTrue(cache.putx(2, new Person("Tom White", 1000)));
@@ -1663,7 +1663,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }, EVT_CACHE_QUERY_EXECUTED);
         }
 
-        GridCache<Integer, Person> cache = ignite.cache(null);
+        GridCache<Integer, Person> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 1; i <= 20; i++)
             assertTrue(cache.putx(i, new Person("Person " + i, i)));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
index 3b33321..ce885fb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
@@ -190,7 +191,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
     private void fillCaches() throws IgniteCheckedException, InterruptedException {
         int idGen = 0;
 
-        GridCache<Integer, Object> dimCache = ignite.cache("replicated");
+        GridCache<Integer, Object> dimCache = ((IgniteKernal)ignite).cache("replicated");
 
         for (int i = 0; i < 2; i++) {
             int id = idGen++;
@@ -207,7 +208,7 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
         CacheProjection<Integer, DimStore> stores = dimCache.projection(Integer.class, DimStore.class);
         CacheProjection<Integer, DimProduct> prods = dimCache.projection(Integer.class, DimProduct.class);
 
-        GridCache<Integer, FactPurchase> factCache = ignite.cache("partitioned");
+        GridCache<Integer, FactPurchase> factCache = ((IgniteKernal)ignite).cache("partitioned");
 
         List<DimStore> dimStores = new ArrayList<>(stores.values());
         Collections.sort(dimStores, new Comparator<DimStore>() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
index 60000f9..6ad56b3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapAndSwapSelfTest.java
@@ -175,7 +175,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest {
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        grid(0).cache(null).clear();
+        ((IgniteKernal)grid(0)).cache(null).clear();
     }
 
     /** Resets event counters. */
@@ -193,7 +193,7 @@ public class GridCacheOffHeapAndSwapSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private GridCache<Long, Long> populate() throws Exception {
-        GridCache<Long, Long> cache = grid(0).cache(null);
+        GridCache<Long, Long> cache = ((IgniteKernal)grid(0)).cache(null);
 
         assertEquals(0, cache.size());
         assertEquals(0, cache.offHeapEntriesCount());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
index aefb354..57220e1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQueryMultiThreadedSelfTest.java
@@ -153,7 +153,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
 
         // Clean up all caches.
         for (int i = 0; i < GRID_CNT; i++) {
-            GridCache<Object, Object> c = grid(i).cache(null);
+            GridCache<Object, Object> c = ((IgniteKernal)grid(i)).cache(null);
 
             assertEquals(0, c.size());
         }
@@ -182,7 +182,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
 
         // Clean up all caches.
         for (int i = 0; i < GRID_CNT; i++) {
-            GridCache<Object, Object> c = grid(i).cache(null);
+            GridCache<Object, Object> c = ((IgniteKernal)grid(i)).cache(null);
 
             c.removeAll();
 
@@ -233,7 +233,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         Set<UUID> nodes = new HashSet<>();
 
         for (Map.Entry<Integer, Integer> entry : entries)
-            nodes.add(g.cache(null).affinity().mapKeyToPrimaryAndBackups(entry.getKey()).iterator().next().id());
+            nodes.add(((IgniteKernal)g).cache(null).affinity().mapKeyToPrimaryAndBackups(entry.getKey()).iterator().next().id());
 
         return nodes;
     }
@@ -252,9 +252,9 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        final GridCache<Integer, String> c = g.cache(null);
+        final GridCache<Integer, String> c = ((IgniteKernal)g).cache(null);
 
-        assertEquals(0, g.cache(null).size());
+        assertEquals(0, ((IgniteKernal)g).cache(null).size());
         assertEquals(0, c.queries().createSqlQuery(String.class, "1 = 1").execute().get().size());
         assertEquals(0, c.queries().createSqlQuery(Long.class, "1 = 1").execute().get().size());
 
@@ -332,9 +332,9 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        final GridCache<Integer, Long> c = g.cache(null);
+        final GridCache<Integer, Long> c = ((IgniteKernal)g).cache(null);
 
-        assertEquals(0, g.cache(null).size());
+        assertEquals(0, ((IgniteKernal)g).cache(null).size());
         assertEquals(0, c.queries().createSqlQuery(String.class, "1 = 1").execute().get().size());
         assertEquals(0, c.queries().createSqlQuery(Long.class, "1 = 1").execute().get().size());
 
@@ -414,9 +414,9 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        final GridCache<Integer, Object> c = g.cache(null);
+        final GridCache<Integer, Object> c = ((IgniteKernal)g).cache(null);
 
-        assertEquals(0, g.cache(null).size());
+        assertEquals(0, ((IgniteKernal)g).cache(null).size());
         assertEquals(0, c.offHeapEntriesCount());
 //        assertEquals(0, c.swapKeys());
         assertEquals(0, c.queries().createSqlQuery(String.class, "1 = 1").execute().get().size());
@@ -497,9 +497,9 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        final GridCache<Integer, TestValue> c = g.cache(null);
+        final GridCache<Integer, TestValue> c = ((IgniteKernal)g).cache(null);
 
-        assertEquals(0, g.cache(null).size());
+        assertEquals(0, ((IgniteKernal)g).cache(null).size());
         assertEquals(0, c.queries().createSqlQuery(String.class, "1 = 1").execute().get().size());
         assertEquals(0, c.queries().createSqlQuery(Long.class, "1 = 1").execute().get().size());
 
@@ -578,7 +578,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        GridCache<Integer, Integer> c = g.cache(null);
+        GridCache<Integer, Integer> c = ((IgniteKernal)g).cache(null);
 
         for (int i = 0; i < keyCnt; i++) {
             c.putx(i, i);
@@ -646,7 +646,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        final GridCache<Integer, Integer> c = g.cache(null);
+        final GridCache<Integer, Integer> c = ((IgniteKernal)g).cache(null);
 
         for (int i = 0; i < keyCnt; i++) {
             c.putx(i, i);
@@ -709,7 +709,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        GridCache<Integer, Integer> c = g.cache(null);
+        GridCache<Integer, Integer> c = ((IgniteKernal)g).cache(null);
 
         for (int i = 0; i < keyCnt; i++)
             c.putx(i, i);
@@ -798,7 +798,7 @@ public class GridCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTest
         final Ignite g = grid(0);
 
         // Put test values into cache.
-        GridCache<Integer, Integer> c = g.cache(null);
+        GridCache<Integer, Integer> c = ((IgniteKernal)g).cache(null);
 
         for (int i = 0; i < keyCnt; i++)
             c.putx(i, i);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
index 4681028..3199088 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSqlQueryMultiThreadedSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -84,7 +85,7 @@ public class GridCacheSqlQueryMultiThreadedSelfTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     public void testQuery() throws Exception {
-        final GridCache<Integer, Person> cache = grid(0).cache(null);
+        final GridCache<Integer, Person> cache = ((IgniteKernal)grid(0)).cache(null);
 
         for (int i = 0; i < 2000; i++)
             cache.put(i, new Person(i));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
index 3a3578f..5539d9e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapSelfTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.marshaller.optimized.*;
@@ -263,7 +264,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED, EVT_SWAP_SPACE_DATA_EVICTED);
 
-            GridCache<Integer, CacheValue> cache = grid(0).cache(null);
+            GridCache<Integer, CacheValue> cache = ((IgniteKernal)grid(0)).cache(null);
 
             for (int i = 0; i< 20; i++) {
                 cache.put(i, new CacheValue(i));
@@ -323,7 +324,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
                 }
             }, EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
 
-            GridCache<Integer, CacheValue> cache = grid(0).cache(null);
+            GridCache<Integer, CacheValue> cache = ((IgniteKernal)grid(0)).cache(null);
 
             populate(cache);
             evictAll(cache);
@@ -371,7 +372,7 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
 
             grid(0);
 
-            GridCache<Integer, Integer> cache = grid(0).cache(null);
+            GridCache<Integer, Integer> cache = ((IgniteKernal)grid(0)).cache(null);
 
             for (int i = 0; i < 100; i++) {
                 info("Putting: " + i);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index bfc0566..ee914dd 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -22,6 +22,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.eviction.fifo.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractQuerySelfTest.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -94,7 +95,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
 
     /** @throws Exception If failed. */
     public void testQuery() throws Exception {
-        GridCache<Integer, ObjectValue> cache = ignite.cache(null);
+        GridCache<Integer, ObjectValue> cache = ((IgniteKernal)ignite).cache(null);
 
         int cnt = 10;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
index 270f5f1..0f67a21 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFieldsQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 
 import java.util.*;
@@ -50,7 +51,7 @@ public class GridCacheAtomicFieldsQuerySelfTest extends GridCachePartitionedFiel
      *
      */
     public void testUnsupportedOperations() {
-        CacheQuery<List<?>> qry = grid(0).cache(null).queries().createSqlFieldsQuery(
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).cache(null).queries().createSqlFieldsQuery(
             "update Person set name = ?");
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
index 51a3f55bd..24658ab 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFieldsQuerySelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.jetbrains.annotations.*;
 
@@ -63,7 +64,7 @@ public class GridCachePartitionedFieldsQuerySelfTest extends GridCacheAbstractFi
      * @throws Exception If failed.
      */
     public void testIncludeBackups() throws Exception {
-        CacheQuery<List<?>> qry = grid(0).cache(null).queries().createSqlFieldsQuery(
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0)).cache(null).queries().createSqlFieldsQuery(
             "select _KEY, name, age from Person");
 
         qry.includeBackups(true);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
index 54953aa..29752d0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedHitsAndMissesSelfTest.java
@@ -120,7 +120,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).jcache(null).metrics();
 
                 hits += m.getCacheHits();
                 misses += m.getCacheMisses();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
index d6bf21f..c0666c7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedQuerySelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.processors.cache.distributed.near;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -54,7 +55,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
         Person p3 = new Person("Mike", 1800);
         Person p4 = new Person("Bob", 1900);
 
-        GridCache<UUID, Person> cache0 = grid(0).cache(null);
+        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
 
         cache0.put(p1.id(), p1);
         cache0.put(p2.id(), p2);
@@ -133,7 +134,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
         Person p3 = new Person("Mike", 1800);
         Person p4 = new Person("Bob", 1900);
 
-        GridCache<UUID, Person> cache0 = grid(0).cache(null);
+        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
 
         cache0.put(p1.id(), p1);
         cache0.put(p2.id(), p2);
@@ -194,7 +195,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
         Person p3 = new Person("Mike", 1800);
         Person p4 = new Person("Bob", 1900);
 
-        GridCache<UUID, Person> cache0 = grid(0).cache(null);
+        GridCache<UUID, Person> cache0 = ((IgniteKernal)grid(0)).cache(null);
 
         cache0.put(p1.id(), p1);
         cache0.put(p2.id(), p2);
@@ -234,7 +235,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
      */
     @SuppressWarnings("FloatingPointEquality")
     public void testScanReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ignite.cache(null);
+        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
 
         Person p1 = new Person("Bob White", 1000);
         Person p2 = new Person("Tom White", 2000);
@@ -292,7 +293,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
      */
     @SuppressWarnings("FloatingPointEquality")
     public void testSqlReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ignite.cache(null);
+        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
 
         Person p1 = new Person("Bob White", 1000);
         Person p2 = new Person("Tom White", 2000);
@@ -346,7 +347,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
      */
     @SuppressWarnings("FloatingPointEquality")
     public void testLuceneReduceQuery() throws Exception {
-        GridCache<UUID, Person> c = ignite.cache(null);
+        GridCache<UUID, Person> c = ((IgniteKernal)ignite).cache(null);
 
         Person p1 = new Person("Bob White", 1000);
         Person p2 = new Person("Tom White", 2000);
@@ -405,8 +406,8 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
             int cnt = 0;
 
             while (true) {
-                if (grid(i).cache(null).affinity().mapKeyToNode(key).equals(grid(i).localNode())) {
-                    assertTrue(grid(i).cache(null).putx(key, key));
+                if (((IgniteKernal)grid(i)).cache(null).affinity().mapKeyToNode(key).equals(grid(i).localNode())) {
+                    assertTrue(((IgniteKernal)grid(i)).cache(null).putx(key, key));
 
                     cnt++;
                 }
@@ -419,9 +420,9 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
         }
 
         for (int i = 0; i < gridCount(); i++)
-            assertEquals(i == 1 ? 2 : 3, grid(i).cache(null).primarySize());
+            assertEquals(i == 1 ? 2 : 3, ((IgniteKernal)grid(i)).cache(null).primarySize());
 
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         CacheQuery<Map.Entry<Integer, Integer>> q = cache.queries().createSqlQuery(Integer.class, "_key >= 0");
 
@@ -438,7 +439,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
      * @throws Exception If failed.
      */
     public void testReduceWithPagination() throws Exception {
-        GridCache<Integer, Integer> c = grid(0).cache(null);
+        GridCache<Integer, Integer> c = ((IgniteKernal)grid(0)).cache(null);
 
         for (int i = 0; i < 50; i++)
             assertTrue(c.putx(i, 10));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
index 89565b1..b1feb78 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheQueryNodeRestartSelfTest.java
@@ -103,7 +103,7 @@ public class GridCacheQueryNodeRestartSelfTest extends GridCacheAbstractSelfTest
         final long nodeLifeTime = 2 * 1000;
         final int logFreq = 20;
 
-        final GridCache<Integer, Integer> cache = grid(0).cache(null);
+        final GridCache<Integer, Integer> cache = ((IgniteKernal)grid(0)).cache(null);
 
         assert cache != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
index 64ad237..f1f968d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedFieldsQuerySelfTest.java
@@ -66,7 +66,7 @@ public class GridCacheReplicatedFieldsQuerySelfTest extends GridCacheAbstractFie
 
             Ignite g = startGrid();
 
-            GridCache<Integer, Integer> cache = g.cache(null);
+            GridCache<Integer, Integer> cache = ((IgniteKernal)g).cache(null);
 
             CacheQuery<List<?>> q = cache.queries().createSqlFieldsQuery("select _key from Integer where _key >= " +
                 "0 order by _key");
@@ -121,7 +121,7 @@ public class GridCacheReplicatedFieldsQuerySelfTest extends GridCacheAbstractFie
      * @throws Exception If failed.
      */
     public void testLostIterator() throws Exception {
-        GridCache<Integer, Integer> cache = grid(0).cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)grid(0)).cache(null);
 
         CacheQueryFuture<List<?>> fut = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
index cd10674..e7f76c7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedQuerySelfTest.java
@@ -112,7 +112,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
         try {
             Ignite g = startGrid("client");
 
-            GridCache<Integer, Integer> c = g.cache(null);
+            GridCache<Integer, Integer> c = ((IgniteKernal)g).cache(null);
 
             for (int i = 0; i < 10; i++)
                 c.putx(i, i);
@@ -379,7 +379,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
      * @throws Exception If failed.
      */
     public void testLostIterator() throws Exception {
-        GridCache<Integer, Integer> cache = ignite.cache(null);
+        GridCache<Integer, Integer> cache = ((IgniteKernal)ignite).cache(null);
 
         for (int i = 0; i < 1000; i++)
             assertTrue(cache.putx(i, i));
@@ -424,7 +424,7 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
         try {
             Ignite g = startGrid();
 
-            GridCache<Integer, Integer> cache = g.cache(null);
+            GridCache<Integer, Integer> cache = ((IgniteKernal)g).cache(null);
 
             for (int i = 0; i < 1000; i++)
                 assertTrue(cache.putx(i, i));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
index 91dd34b..065f9c3 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalQuerySelfTest.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.local;
 
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
 
@@ -41,10 +42,10 @@ public class GridCacheLocalQuerySelfTest extends GridCacheAbstractQuerySelfTest
     }
 
     /**
-     * @throws IgniteCheckedException If test failed.
+     * @throws Exception If test failed.
      */
     public void testQueryLocal() throws Exception {
-        GridCache<Integer, String> cache = ignite.cache(null);
+        GridCache<Integer, String> cache = ((IgniteKernal)ignite).cache(null);
 
         cache.put(1, "value1");
         cache.put(2, "value2");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
index baf7ae7..93e971a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/GridH2IndexRebuildTest.java
@@ -148,8 +148,8 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
 
         cache().queries().rebuildAllIndexes().get();
 
-        GridCache<Integer, TestValue1> cache1 = grid(0).cache(null);
-        GridCache<Integer, TestValue2> cache2 = grid(0).cache(null);
+        GridCache<Integer, TestValue1> cache1 = ((IgniteKernal)grid(0)).cache(null);
+        GridCache<Integer, TestValue2> cache2 = ((IgniteKernal)grid(0)).cache(null);
 
         for (int i = 0; i < ENTRY_CNT; i++) {
             cache1.put(i, new TestValue1(i, "val2-" + i, i, i));
@@ -194,25 +194,25 @@ public class GridH2IndexRebuildTest extends GridCacheAbstractSelfTest {
     public void testRebuildInterrupted() throws Exception {
         spi.sleepInRebuild = true;
 
-        GridCache<Integer, TestValue1> cache1 = grid(0).cache(null);
-        GridCache<Integer, TestValue2> cache2 = grid(0).cache(null);
+        GridCache<Integer, TestValue1> cache1 = ((IgniteKernal)grid(0)).cache(null);
+        GridCache<Integer, TestValue2> cache2 = ((IgniteKernal)grid(0)).cache(null);
 
         cache1.put(0, new TestValue1(0, "val0", 0 ,0));
         cache2.put(1, new TestValue2(0, "val0"));
 
-        checkCancel(grid(0).cache(null).queries().rebuildIndexes("TestValue1"));
+        checkCancel(((IgniteKernal)grid(0)).cache(null).queries().rebuildIndexes("TestValue1"));
 
-        checkCancel(grid(0).cache(null).queries().rebuildAllIndexes());
+        checkCancel(((IgniteKernal)grid(0)).cache(null).queries().rebuildAllIndexes());
 
         spi.sleepInRebuild = false;
 
-        final IgniteInternalFuture<?> fut1 = grid(0).cache(null).queries().rebuildIndexes(TestValue1.class);
+        final IgniteInternalFuture<?> fut1 = ((IgniteKernal)grid(0)).cache(null).queries().rebuildIndexes(TestValue1.class);
 
         assertFalse(fut1.isCancelled());
 
         fut1.get();
 
-        final IgniteInternalFuture<?> fut2 = grid(0).cache(null).queries().rebuildAllIndexes();
+        final IgniteInternalFuture<?> fut2 = ((IgniteKernal)grid(0)).cache(null).queries().rebuildAllIndexes();
 
         assertFalse(fut2.isCancelled());
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
index 8fc63ed..5093ecb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/h2/sql/GridQueryParsingTest.java
@@ -97,7 +97,7 @@ public class GridQueryParsingTest extends GridCommonAbstractTest {
 
         ignite = startGrid();
 
-        GridCache cache = ignite.cache(null);
+        GridCache cache = ((IgniteKernal)ignite).cache(null);
 
         cache.putx("testAddr", new Address());
         cache.putx("testPerson", new Person());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
index e9bc33e..e1e5358 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/spi/communication/tcp/GridOrderedMessageCancelSelfTest.java
@@ -97,7 +97,7 @@ public class GridOrderedMessageCancelSelfTest extends GridCommonAbstractTest {
      */
     public void testQuery() throws Exception {
         CacheQueryFuture<Map.Entry<Object, Object>> fut =
-            grid(0).cache(null).queries().createSqlQuery(String.class, "_key is not null").execute();
+            ((IgniteKernal)grid(0)).cache(null).queries().createSqlQuery(String.class, "_key is not null").execute();
 
         testMessageSet(fut);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
index 3cd537d..85a5de5 100644
--- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
+++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
@@ -21,6 +21,7 @@ import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.plugin.*;
 import org.apache.ignite.internal.util.typedef.*;
@@ -244,7 +245,7 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     @Override public <K, V> GridCache<K, V> cache(String name) {
         assert g != null;
 
-        return g.cache(name);
+        return ((IgniteKernal)g).cache(name);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
index 5e2d054..629469d 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringCacheManager.java
@@ -20,6 +20,7 @@ package org.apache.ignite.cache.spring;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.springframework.beans.factory.*;
@@ -221,7 +222,7 @@ public class SpringCacheManager implements CacheManager, InitializingBean {
         assert grid != null;
 
         try {
-            return new SpringCache(name, grid, grid.cache(name), null);
+            return new SpringCache(name, grid, ((IgniteKernal)grid).cache(name), null);
         }
         catch (IllegalArgumentException ignored) {
             return null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e06e9734/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
----------------------------------------------------------------------
diff --git a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
index f9b05ee..635e794 100644
--- a/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
+++ b/modules/spring/src/main/java/org/apache/ignite/cache/spring/SpringDynamicCacheManager.java
@@ -104,7 +104,7 @@ public class SpringDynamicCacheManager extends SpringCacheManager {
         super.afterPropertiesSet();
 
         metaCache = ((IgniteEx)grid).utilityCache(MetaKey.class, org.springframework.cache.Cache.class);
-        dataCache = grid.cache(dataCacheName);
+        dataCache = ((IgniteKernal)grid).cache(dataCacheName);
     }
 
     /** {@inheritDoc} */


Mime
View raw message