ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [01/17] incubator-ignite git commit: cleaning public API
Date Mon, 16 Feb 2015 13:25:22 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/sprint-1 ff69a8f78 -> a2b5123ef


cleaning public API


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

Branch: refs/heads/sprint-1
Commit: aa837c6fd76f74d43f534407895d3180cb33372e
Parents: 9671e21
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sun Feb 15 19:16:08 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sun Feb 15 19:16:08 2015 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/ignite/Ignite.java | 27 --------------------
 .../apache/ignite/internal/IgniteKernal.java    | 13 +++++++---
 .../ignite/startup/BasicWarmupClosure.java      |  6 ++---
 .../GridCacheFieldsQueryNoDataSelfTest.java     |  4 ++-
 .../cache/GridCacheOffHeapSelfTest.java         |  4 +--
 .../cache/GridCacheSwapPreloadSelfTest.java     |  3 ++-
 .../IgniteClientAffinityAssignmentSelfTest.java |  5 ++--
 .../cache/IgnitePutAllLargeBatchSelfTest.java   |  8 +++---
 ...tAllUpdateNonPreloadedPartitionSelfTest.java |  4 +--
 .../cache/IgniteTxMultiNodeAbstractTest.java    |  3 ++-
 ...dCacheMultithreadedFailoverAbstractTest.java |  3 ++-
 .../GridCacheNodeFailureAbstractTest.java       |  4 +--
 ...chePartitionedReloadAllAbstractSelfTest.java |  8 +++---
 ...ridCacheContinuousQueryAbstractSelfTest.java |  4 +--
 ...dCacheAbstractReduceFieldsQuerySelfTest.java |  4 +--
 .../GridDataLoaderProcessorSelfTest.java        |  2 +-
 .../processors/igfs/IgfsCacheSelfTest.java      |  5 ++--
 .../ignite/testframework/junits/IgniteMock.java | 10 --------
 ...idHibernateL2CacheConfigurationSelfTest.java |  3 ++-
 .../hibernate/GridHibernateL2CacheSelfTest.java |  3 ++-
 .../GridCacheAbstractFieldsQuerySelfTest.java   |  3 ++-
 .../cache/GridCacheAbstractQuerySelfTest.java   |  5 ++--
 .../cache/GridCacheCrossCacheQuerySelfTest.java | 12 ++++++---
 .../GridCacheCrossCacheQuerySelfTestNewApi.java |  7 ++---
 .../processors/cache/GridCacheSwapSelfTest.java |  4 +--
 .../near/GridCachePartitionedQuerySelfTest.java |  2 +-
 .../GridCacheReplicatedQuerySelfTest.java       |  6 ++---
 .../scala/org/apache/ignite/scalar/scalar.scala | 25 +++++++++---------
 .../tests/ScalarAffinityRoutingSpec.scala       | 12 ++++-----
 .../scalar/tests/ScalarCacheQueriesSpec.scala   |  2 +-
 .../ignite/scalar/tests/ScalarCacheSpec.scala   | 16 +++++++-----
 .../org/apache/ignite/IgniteSpringBean.java     | 20 ++-------------
 .../ignite/cache/spring/SpringCacheManager.java |  2 +-
 33 files changed, 105 insertions(+), 134 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 6e8575e..a120701 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -187,33 +187,6 @@ public interface Ignite extends AutoCloseable {
     public IgniteScheduler scheduler();
 
     /**
-     * Gets the cache instance for the given name, if one does not
-     * exist {@link IllegalArgumentException} will be thrown.
-     * Note that in case named cache instance is used as IGFS data or meta cache, {@link IllegalStateException}
-     * will be thrown.
-     *
-     * @param <K> Key type.
-     * @param <V> Value type.
-     * @param name Cache name.
-     * @return Cache instance for given name.
-     * @see org.apache.ignite.configuration.IgfsConfiguration
-     * @see org.apache.ignite.configuration.IgfsConfiguration#getDataCacheName()
-     * @see org.apache.ignite.configuration.IgfsConfiguration#getMetaCacheName()
-     */
-    public <K, V> GridCache<K, V> cache(@Nullable String name);
-
-    /**
-     * Gets all configured caches.
-     * Caches that are used as IGFS meta and data caches will not be returned in resulting collection.
-     *
-     * @see org.apache.ignite.configuration.IgfsConfiguration
-     * @see org.apache.ignite.configuration.IgfsConfiguration#getDataCacheName()
-     * @see org.apache.ignite.configuration.IgfsConfiguration#getMetaCacheName()
-     * @return All configured caches.
-     */
-    public Collection<GridCache<?, ?>> caches();
-
-    /**
      * Gets an instance of {@link IgniteCache} API. {@code IgniteCache} is a fully-compatible
      * implementation of {@code JCache (JSR 107)} specification.
      *

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index c253182..662b19e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -2771,8 +2771,11 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit
         }
     }
 
-    /** {@inheritDoc} */
-    @Override public <K, V> GridCache<K, V> cache(@Nullable String name) {
+    /**
+     * @param name Cache name.
+     * @return Cache.
+     */
+    public <K, V> GridCache<K, V> cache(@Nullable String name) {
         guard();
 
         try {
@@ -2795,8 +2798,10 @@ public class IgniteKernal extends ClusterGroupAdapter implements IgniteEx, Ignit
         }
     }
 
-    /** {@inheritDoc} */
-    @Override public Collection<GridCache<?, ?>> caches() {
+    /**
+     * @return Public caches.
+     */
+    public Collection<GridCache<?, ?>> caches() {
         guard();
 
         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java b/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
index fb23f07..bce5379 100644
--- a/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
+++ b/modules/core/src/main/java/org/apache/ignite/startup/BasicWarmupClosure.java
@@ -244,8 +244,8 @@ public class BasicWarmupClosure implements IgniteInClosure<IgniteConfiguration>
         ExecutorService svc = Executors.newFixedThreadPool(threadCnt);
 
         try {
-            for (GridCache<?, ?> cache : first.caches()) {
-                GridCache<Object, Object> cache0 = ((IgniteKernal)first).cache(cache.name());
+            for (CacheConfiguration cc : first.configuration().getCacheConfiguration()) {
+                GridCache<Object, Object> cache0 = ((IgniteKernal)first).cache(cc.getName());
 
                 for (String warmupMethod : warmupMethods) {
                     Collection<Future> futs = new ArrayList<>(threadCnt);
@@ -303,7 +303,7 @@ public class BasicWarmupClosure implements IgniteInClosure<IgniteConfiguration>
                         futs.add(svc.submit(call));
                     }
 
-                    out("Running warmup [cacheName=" + cache.name() + ", method=" + warmupMethod + ']');
+                    out("Running warmup [cacheName=" + cc.getName() + ", method=" + warmupMethod + ']');
 
                     for (Future fut : futs)
                         fut.get();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
index 3cf5acb..4342348 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheFieldsQueryNoDataSelfTest.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.query.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -71,7 +72,8 @@ public class GridCacheFieldsQueryNoDataSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testQuery() throws Exception {
-        CacheQuery<List<?>> qry = grid().cache(null).queries().createSqlFieldsQuery("select _VAL from Integer");
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid()).cache(null).queries()
+            .createSqlFieldsQuery("select _VAL from Integer");
 
         Collection<List<?>> res = qry.execute().get();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 549a06b..4846183 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -110,8 +110,8 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
             Ignite ignite1 = startGrid(1);
             Ignite ignite2 = startGrid(2);
 
-            GridCache<Integer, Object> cache1 = ignite1.cache(null);
-            GridCache<Integer, Object> cache2 = ignite2.cache(null);
+            GridCache<Integer, Object> cache1 = ((IgniteKernal)ignite1).cache(null);
+            GridCache<Integer, Object> cache2 = ((IgniteKernal)ignite2).cache(null);
 
             Object v1 = new CacheValue(1);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index cb5b616..85a7838 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -201,7 +201,8 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
             info("New node cache size: " + size);
 
             if (size != ENTRY_CNT) {
-                Iterable<Integer> keySet = new TreeSet<>(grid(1).<Integer, Integer>cache(null).keySet());
+                Iterable<Integer> keySet = new TreeSet<>(((IgniteKernal)grid(1))
+                    .<Integer, Integer>cache(null).keySet());
 
                 int next = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
index abcb8dd..719a8aa 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
@@ -24,6 +24,7 @@ import org.apache.ignite.cache.affinity.consistenthash.*;
 import org.apache.ignite.cache.affinity.fair.*;
 import org.apache.ignite.cache.affinity.rendezvous.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.testframework.junits.common.*;
 
 import static org.apache.ignite.cache.CacheDistributionMode.*;
@@ -144,14 +145,14 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     private void checkAffinity() throws Exception {
-        CacheAffinity<Object> aff = grid(0).cache(null).affinity();
+        CacheAffinity<Object> aff = ((IgniteKernal)grid(0)).cache(null).affinity();
 
         for (Ignite grid : Ignition.allGrids()) {
             try {
                 if (grid.cluster().localNode().id().equals(grid(0).localNode().id()))
                     continue;
 
-                CacheAffinity<Object> checkAff = grid.cache(null).affinity();
+                CacheAffinity<Object> checkAff = ((IgniteKernal)grid).cache(null).affinity();
 
                 for (int p = 0; p < PARTS; p++)
                     assertEquals(aff.mapPartitionToPrimaryAndBackups(p), checkAff.mapPartitionToPrimaryAndBackups(p));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java
index e73504f..91ad5f4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllLargeBatchSelfTest.java
@@ -153,7 +153,7 @@ public class IgnitePutAllLargeBatchSelfTest extends GridCommonAbstractTest {
         awaitPartitionMapExchange();
 
         try {
-            GridCache<Object, Object> cache = grid(0).cache(null);
+            GridCache<Object, Object> cache = ((IgniteKernal)grid(0)).cache(null);
 
             int keyCnt = 200;
 
@@ -163,7 +163,7 @@ public class IgnitePutAllLargeBatchSelfTest extends GridCommonAbstractTest {
             // Create readers if near cache is enabled.
             for (int g = 1; g < 2; g++) {
                 for (int i = 30; i < 70; i++)
-                    grid(g).cache(null).get(i);
+                    ((IgniteKernal)grid(g)).cache(null).get(i);
             }
 
             info(">>> Starting test tx.");
@@ -212,7 +212,7 @@ public class IgnitePutAllLargeBatchSelfTest extends GridCommonAbstractTest {
             }
 
             for (int g = 0; g < GRID_CNT; g++) {
-                GridCache<Object, Object> checkCache = grid(g).cache(null);
+                GridCache<Object, Object> checkCache = ((IgniteKernal)grid(g)).cache(null);
 
                 ClusterNode checkNode = grid(g).localNode();
 
@@ -278,7 +278,7 @@ public class IgnitePutAllLargeBatchSelfTest extends GridCommonAbstractTest {
         try {
             Map<Integer, Integer> checkMap = new HashMap<>();
 
-            GridCache<Integer, Integer> cache = grid(0).cache(null);
+            GridCache<Integer, Integer> cache = ((IgniteKernal)grid(0)).cache(null);
 
             for (int r = 0; r < 3; r++) {
                 for (int i = 0; i < 10; i++) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java
index 02b2d67..2882842 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgnitePutAllUpdateNonPreloadedPartitionSelfTest.java
@@ -74,11 +74,11 @@ public class IgnitePutAllUpdateNonPreloadedPartitionSelfTest extends GridCommonA
 
         try {
             for (int i = 0; i < GRID_CNT - 1; i++)
-                grid(i).cache(null).forceRepartition().get();
+                ((IgniteKernal)grid(i)).cache(null).forceRepartition().get();
 
             startGrid(GRID_CNT - 1);
 
-            GridCache<Object, Object> cache = grid(0).cache(null);
+            GridCache<Object, Object> cache = ((IgniteKernal)grid(0)).cache(null);
 
             final int keyCnt = 100;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
index 1ba1bd9..d8b863e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
@@ -295,7 +295,8 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
 
             while (true) {
                 CacheQuery<Map.Entry<String, Integer>> qry =
-                    ignite.<String, Integer>cache(null).queries().createSqlQuery(Integer.class, "_key != 'RMVD_CNTR_KEY' and _val >= 0");
+                    ((IgniteKernal)ignite).<String, Integer>cache(null).queries()
+                        .createSqlQuery(Integer.class, "_key != 'RMVD_CNTR_KEY' and _val >= 0");
 
                 if (DEBUG)
                     ignite.log().info("Before executing query [retry=" + retry + ", locId=" + locId +

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
index 3e74af2..dbbdf28 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheMultithreadedFailoverAbstractTest.java
@@ -512,7 +512,8 @@ public class GridCacheMultithreadedFailoverAbstractTest extends GridCommonAbstra
             caches.add(cache);
 
             GridCacheAdapter<Integer, Integer> cache0 =
-                (GridCacheAdapter<Integer, Integer>)cache.unwrap(Ignite.class).<Integer, Integer>cache(CACHE_NAME);
+                (GridCacheAdapter<Integer, Integer>)((IgniteKernal)cache.unwrap(Ignite.class))
+                    .<Integer, Integer>cache(CACHE_NAME);
 
             if (cache0.isNear()) {
                 if (dhtCaches == null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
index 275dd5f..d9b5592 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheNodeFailureAbstractTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.transactions.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
@@ -31,7 +32,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
 import org.apache.ignite.transactions.*;
 
-import javax.cache.*;
 import java.util.*;
 import java.util.concurrent.locks.*;
 
@@ -124,7 +124,7 @@ public abstract class GridCacheNodeFailureAbstractTest extends GridCommonAbstrac
      * @return Cache.
      */
     @Override protected <K, V> GridCache<K, V> cache(int i) {
-        return IGNITEs.get(i).cache(null);
+        return ((IgniteKernal)IGNITEs.get(i)).cache(null);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
index 27d5589..37b5e3a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
@@ -129,7 +130,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
         caches = new ArrayList<>(GRID_CNT);
 
         for (int i = 0; i < GRID_CNT; i++)
-            caches.add(startGrid(i).<Integer, String>cache(null));
+            caches.add(((IgniteKernal)startGrid(i)).<Integer, String>cache(null));
 
         awaitPartitionMapExchange();
     }
@@ -155,14 +156,15 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
 
             @Override public void loadCache(IgniteBiInClosure<Integer, String> c,
                 Object... args) {
-                X.println("Loading all on: " + caches.indexOf(g.<Integer, String>cache(null)));
+                X.println("Loading all on: " + caches.indexOf(((IgniteKernal)g).<Integer, String>cache(null)));
 
                 for (Map.Entry<Integer, String> e : map.entrySet())
                     c.apply(e.getKey(), e.getValue());
             }
 
             @Override public String load(Integer key) {
-                X.println("Loading on: " + caches.indexOf(g.<Integer, String>cache(null)) + " key=" + key);
+                X.println("Loading on: " + caches.indexOf(((IgniteKernal)g)
+                    .<Integer, String>cache(null)) + " key=" + key);
 
                 return map.get(key);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 81061fa..71c4c41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -381,7 +381,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
     public void testLocalNodeOnly() throws Exception {
         IgniteCache<Integer, Integer> cache = grid(0).jcache(null);
 
-        if (grid(0).cache(null).configuration().getCacheMode() != PARTITIONED)
+        if (((IgniteKernal)grid(0)).cache(null).configuration().getCacheMode() != PARTITIONED)
             return;
 
         ContinuousQuery<Integer, Integer> qry = Query.continuous();
@@ -450,7 +450,7 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
      * @throws Exception If failed.
      */
     public void testBuffering() throws Exception {
-        if (grid(0).cache(null).configuration().getCacheMode() != PARTITIONED)
+        if (((IgniteKernal)grid(0)).cache(null).configuration().getCacheMode() != PARTITIONED)
             return;
 
         IgniteCache<Integer, Integer> cache = grid(0).jcache(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
index 0119b4f..35546ae 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/reducefields/GridCacheAbstractReduceFieldsQuerySelfTest.java
@@ -157,7 +157,7 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
      * @throws Exception If failed.
      */
     public void testNoDataInCache() throws Exception {
-        CacheQuery<List<?>> qry = grid(0)
+        CacheQuery<List<?>> qry = ((IgniteKernal)grid(0))
             .cache(null).queries().createSqlFieldsQuery("select age from Person where orgId = 999");
 
         Collection<IgniteBiTuple<Integer, Integer>> res = qry.execute(new AverageRemoteReducer()).get();
@@ -228,7 +228,7 @@ public abstract class GridCacheAbstractReduceFieldsQuerySelfTest extends GridCom
         };
 
         CacheProjection<CacheAffinityKey<String>, Person> cachePrj =
-            grid(0).<CacheAffinityKey<String>, Person>cache(null).projection(p);
+            ((IgniteKernal)grid(0)).<CacheAffinityKey<String>, Person>cache(null).projection(p);
 
         CacheQuery<List<?>> qry = cachePrj.queries().createSqlFieldsQuery("select age from Person");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
index 5d3cb7d..a666423 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/dataload/GridDataLoaderProcessorSelfTest.java
@@ -291,7 +291,7 @@ public class GridDataLoaderProcessorSelfTest extends GridCommonAbstractTest {
 
             awaitPartitionMapExchange();
 
-            GridCache<Integer, Integer> cache = grid(0).cache(null);
+            GridCache<Integer, Integer> cache = ((IgniteKernal)grid(0)).cache(null);
 
             for (int i = 0; i < 100; i++)
                 cache.put(i, -1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java
index 76b7a92..bde395b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCacheSelfTest.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.igfs.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.*;
@@ -108,9 +109,9 @@ public class IgfsCacheSelfTest extends IgfsCommonAbstractTest {
     public void testCache() throws Exception {
         final Ignite g = grid();
 
-        assert g.caches().size() == 1;
+        assert ((IgniteKernal)g).caches().size() == 1;
 
-        assert CACHE_NAME.equals(g.caches().iterator().next().name());
+        assert CACHE_NAME.equals(((IgniteKernal)g).caches().iterator().next().name());
 
         GridTestUtils.assertThrows(log(), new Callable<Object>() {
             @Override public Object call() throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
index 245ca4f..ff497da 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteMock.java
@@ -162,16 +162,6 @@ public class IgniteMock implements Ignite {
     }
 
     /** {@inheritDoc} */
-    @Override public <K, V> GridCache<K, V> cache(@Nullable String name) {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override public Collection<GridCache<?, ?>> caches() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
     @Override public <K, V> IgniteCache<K, V> jcache(@Nullable String name) {
         return null;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
index f9ef6db..b012f4e 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheConfigurationSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.cache.hibernate;
 import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.configuration.*;
+import org.apache.ignite.internal.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.testframework.junits.common.*;
@@ -78,7 +79,7 @@ public class GridHibernateL2CacheConfigurationSelfTest extends GridCommonAbstrac
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
-        for (GridCache<?, ?> cache : grid(0).caches())
+        for (GridCache<?, ?> cache : ((IgniteKernal)grid(0)).caches())
             cache.clear();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
index 9fc25bc..ba18529 100644
--- a/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
+++ b/modules/hibernate/src/test/java/org/apache/ignite/cache/hibernate/GridHibernateL2CacheSelfTest.java
@@ -20,6 +20,7 @@ package org.apache.ignite.cache.hibernate;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.consistenthash.*;
 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.*;
@@ -1916,7 +1917,7 @@ public class GridHibernateL2CacheSelfTest extends GridCommonAbstractTest {
 
         sesFactory2 = null;
 
-        for (GridCache<?, ?> cache : grid(0).caches())
+        for (GridCache<?, ?> cache : ((IgniteKernal)grid(0)).caches())
             cache.clear();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
index 7020487..512e914 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFieldsQuerySelfTest.java
@@ -1044,7 +1044,8 @@ public abstract class GridCacheAbstractFieldsQuerySelfTest extends GridCommonAbs
             }
         };
 
-        CacheProjection<Integer, Integer> cachePrj = grid(0).<Integer, Integer>cache(null).projection(p);
+        CacheProjection<Integer, Integer> cachePrj = ((IgniteKernal)grid(0))
+            .<Integer, Integer>cache(null).projection(p);
 
         CacheQuery<List<?>> q = cachePrj.queries()
             .createSqlFieldsQuery("select _key, _val from Integer where _key >= 20 and _val < 40");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 957102d..a3173bf 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
@@ -476,7 +476,8 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }
         };
 
-        CacheProjection<Integer, ObjectValue> cachePrj = grid(0).<Integer, ObjectValue>cache(null).projection(p);
+        CacheProjection<Integer, ObjectValue> cachePrj = ((IgniteKernal)grid(0))
+            .<Integer, ObjectValue>cache(null).projection(p);
 
         CacheQuery<Map.Entry<Integer, ObjectValue>> qry =
             cachePrj.queries().createFullTextQuery(ObjectValue.class, "test");
@@ -863,7 +864,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
             }
         };
 
-        CacheProjection<String, Integer> cachePrj = ignite.<String, Integer>cache(null).projection(p);
+        CacheProjection<String, Integer> cachePrj = ((IgniteKernal)ignite).<String, Integer>cache(null).projection(p);
 
         CacheQuery<Map.Entry<String, Integer>> q = cachePrj.queries().createSqlQuery(Integer.class, "_val > 2");
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 7c7e680..ff22703 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
@@ -109,7 +109,8 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
         String cache = "partitioned";
 
         GridCacheQueriesEx<Integer, FactPurchase> qx =
-            (GridCacheQueriesEx<Integer, FactPurchase>)ignite.<Integer, FactPurchase>cache(cache).queries();
+            (GridCacheQueriesEx<Integer, FactPurchase>)((IgniteKernal)ignite)
+                .<Integer, FactPurchase>cache(cache).queries();
 
 //        for (Map.Entry<Integer, FactPurchase> e : qx.createSqlQuery(FactPurchase.class, "1 = 1").execute().get())
 //            X.println("___ "  + e);
@@ -130,7 +131,8 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
         fillCaches();
 
         GridCacheQueriesEx<Integer, FactPurchase> qx =
-            (GridCacheQueriesEx<Integer, FactPurchase>)ignite.<Integer, FactPurchase>cache("partitioned").queries();
+            (GridCacheQueriesEx<Integer, FactPurchase>)((IgniteKernal)ignite)
+                .<Integer, FactPurchase>cache("partitioned").queries();
 
         Set<Integer> set1 = new HashSet<>();
 
@@ -173,7 +175,8 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
     public void testOnProjection() throws Exception {
         fillCaches();
 
-        CacheProjection<Integer, FactPurchase> prj = ignite.<Integer, FactPurchase>cache("partitioned").projection(
+        CacheProjection<Integer, FactPurchase> prj = ((IgniteKernal)ignite)
+            .<Integer, FactPurchase>cache("partitioned").projection(
             new IgnitePredicate<Cache.Entry<Integer, FactPurchase>>() {
                 @Override public boolean apply(Cache.Entry<Integer, FactPurchase> e) {
                     return e.getKey() > 12;
@@ -245,7 +248,8 @@ public class GridCacheCrossCacheQuerySelfTest extends GridCommonAbstractTest {
     private List<Map.Entry<Integer, FactPurchase>> body(CacheProjection<Integer, FactPurchase> prj)
         throws Exception {
         CacheQuery<Map.Entry<Integer, FactPurchase>> qry = (prj == null ?
-            ignite.<Integer, FactPurchase>cache("partitioned") : prj).queries().createSqlQuery(FactPurchase.class,
+            ((IgniteKernal)ignite)
+                .<Integer, FactPurchase>cache("partitioned") : prj).queries().createSqlQuery(FactPurchase.class,
             "from \"replicated\".DimStore, \"partitioned\".FactPurchase where DimStore.id = FactPurchase.storeId");
 
         List<Map.Entry<Integer, FactPurchase>> res = new ArrayList<>(qry.execute().get());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTestNewApi.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTestNewApi.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTestNewApi.java
index 6dcf5dd..1e07bde 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTestNewApi.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheCrossCacheQuerySelfTestNewApi.java
@@ -21,6 +21,7 @@ import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.annotations.*;
 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.*;
@@ -164,7 +165,7 @@ public class GridCacheCrossCacheQuerySelfTestNewApi extends GridCommonAbstractTe
     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++;
@@ -181,7 +182,7 @@ public class GridCacheCrossCacheQuerySelfTestNewApi extends GridCommonAbstractTe
         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>() {
@@ -218,7 +219,7 @@ public class GridCacheCrossCacheQuerySelfTestNewApi extends GridCommonAbstractTe
     private List<Map.Entry<Integer, FactPurchase>> body(CacheProjection<Integer, FactPurchase> prj)
         throws Exception {
         CacheQuery<Map.Entry<Integer, FactPurchase>> qry = (prj == null ?
-            ignite.<Integer, FactPurchase>cache("partitioned") : prj).queries().createSqlQuery(FactPurchase.class,
+            ((IgniteKernal)ignite).<Integer, FactPurchase>cache("partitioned") : prj).queries().createSqlQuery(FactPurchase.class,
             "from \"replicated\".DimStore, \"partitioned\".FactPurchase where DimStore.id = FactPurchase.storeId");
 
         List<Map.Entry<Integer, FactPurchase>> res = new ArrayList<>(qry.execute().get());

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 fbcc7f9..d78c3a1 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
@@ -149,8 +149,8 @@ public class GridCacheSwapSelfTest extends GridCommonAbstractTest {
             Ignite ignite1 = startGrid(1);
             Ignite ignite2 = startGrid(2);
 
-            GridCache<Integer, Object> cache1 = ignite1.cache(null);
-            GridCache<Integer, Object> cache2 = ignite2.cache(null);
+            GridCache<Integer, Object> cache1 = ((IgniteKernal)ignite1).cache(null);
+            GridCache<Integer, Object> cache2 = ((IgniteKernal)ignite2).cache(null);
 
             Object v1 = new CacheValue(1);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 996be84..83f297e 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
@@ -95,7 +95,7 @@ public class GridCachePartitionedQuerySelfTest extends GridCacheAbstractQuerySel
 
         Ignite ignite0 = grid(0);
 
-        GridCache<UUID, Person> cache0 = ignite0.cache(null);
+        GridCache<UUID, Person> cache0 = ((IgniteKernal)ignite0).cache(null);
 
         cache0.put(p1.id(), p1);
         cache0.put(p2.id(), p2);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 ae331d3..27a1551 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
@@ -100,9 +100,9 @@ public class GridCacheReplicatedQuerySelfTest extends GridCacheAbstractQuerySelf
         ignite2 = grid(1);
         ignite3 = grid(2);
 
-        cache1 = ignite1.cache(null);
-        cache2 = ignite2.cache(null);
-        cache3 = ignite3.cache(null);
+        cache1 = ((IgniteKernal)ignite1).cache(null);
+        cache2 = ((IgniteKernal)ignite2).cache(null);
+        cache3 = ((IgniteKernal)ignite3).cache(null);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
index 4d51837..78eda65 100644
--- a/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
+++ b/modules/scalar/src/main/scala/org/apache/ignite/scalar/scalar.scala
@@ -17,18 +17,17 @@
 
 package org.apache.ignite.scalar
 
-import org.apache.ignite.cache.GridCache
-import org.apache.ignite.cache.query.annotations.{QueryTextField, QuerySqlField}
+import java.net.URL
+import java.util.UUID
+
+import org.apache.ignite._
+import org.apache.ignite.cache.query.annotations.{QuerySqlField, QueryTextField}
 import org.apache.ignite.cluster.ClusterNode
 import org.apache.ignite.configuration.IgniteConfiguration
 import org.apache.ignite.internal.IgniteVersionUtils
-import IgniteVersionUtils._
-import org.apache.ignite.{Ignite, IgniteDataLoader, IgniteState, Ignition}
+import org.apache.ignite.internal.IgniteVersionUtils._
 import org.jetbrains.annotations.Nullable
 
-import java.net.URL
-import java.util.UUID
-
 import scala.annotation.meta.field
 
 /**
@@ -265,16 +264,16 @@ object scalar extends ScalarConversions {
      * this function - otherwise Scala will create `Cache[Nothing, Nothing]`
      * typed instance that cannot be used.
      */
-    @inline def cache$[K, V]: Option[GridCache[K, V]] =
-        Option(Ignition.ignite.cache[K, V](null))
+    @inline def cache$[K, V]: Option[IgniteCache[K, V]] =
+        Option(Ignition.ignite.jcache[K, V](null))
 
     /**
      * Gets named cache from default grid.
      *
      * @param cacheName Name of the cache to get.
      */
-    @inline def cache$[K, V](@Nullable cacheName: String): Option[GridCache[K, V]] =
-        Option(Ignition.ignite.cache(cacheName))
+    @inline def cache$[K, V](@Nullable cacheName: String): Option[IgniteCache[K, V]] =
+        Option(Ignition.ignite.jcache(cacheName))
 
     /**
      * Gets named cache from specified grid.
@@ -282,9 +281,9 @@ object scalar extends ScalarConversions {
      * @param gridName Name of the grid.
      * @param cacheName Name of the cache to get.
      */
-    @inline def cache$[K, V](@Nullable gridName: String, @Nullable cacheName: String): Option[GridCache[K, V]] =
+    @inline def cache$[K, V](@Nullable gridName: String, @Nullable cacheName: String): Option[IgniteCache[K, V]] =
         ignite$(gridName) match {
-            case Some(g) => Option(g.cache(cacheName))
+            case Some(g) => Option(g.jcache(cacheName))
             case None => None
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarAffinityRoutingSpec.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarAffinityRoutingSpec.scala b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarAffinityRoutingSpec.scala
index 1fbcb26..13b09eb 100644
--- a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarAffinityRoutingSpec.scala
+++ b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarAffinityRoutingSpec.scala
@@ -35,9 +35,9 @@ class ScalarAffinityRoutingSpec extends FlatSpec with ShouldMatchers with Before
     "affinityRun$ method" should "run correctly" in scalar("examples/config/example-cache.xml") {
         val c = cache$[Int, Int](CACHE_NAME).get
 
-        c += (0 -> 0)
-        c += (1 -> 1)
-        c += (2 -> 2)
+//        c += (0 -> 0)
+//        c += (1 -> 1)
+//        c += (2 -> 2)
 
         val cnt = Ignition.ignite.atomicLong("affinityRun", 0, true)
 
@@ -51,9 +51,9 @@ class ScalarAffinityRoutingSpec extends FlatSpec with ShouldMatchers with Before
     "affinityRunAsync$ method" should "run correctly" in scalar("examples/config/example-cache.xml") {
         val c = cache$[Int, Int](CACHE_NAME).get
 
-        c += (0 -> 0)
-        c += (1 -> 1)
-        c += (2 -> 2)
+//        c += (0 -> 0)
+//        c += (1 -> 1)
+//        c += (2 -> 2)
 
         val cnt = Ignition.ignite.atomicLong("affinityRunAsync", 0, true)
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheQueriesSpec.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheQueriesSpec.scala b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheQueriesSpec.scala
index c3bd8f9..7c2431b 100644
--- a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheQueriesSpec.scala
+++ b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheQueriesSpec.scala
@@ -48,7 +48,7 @@ class ScalarCacheQueriesSpec extends FlatSpec with ShouldMatchers with BeforeAnd
     override def beforeAll() {
         n = start("modules/scalar/src/test/resources/spring-cache.xml").cluster().localNode
 
-        c = cache$[Int, ObjectValue].get
+        // c = cache$[Int, ObjectValue].get TODO
 
         (1 to ENTRY_CNT).foreach(i => c.putx(i, ObjectValue(i, "str " + WORDS(i))))
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheSpec.scala
----------------------------------------------------------------------
diff --git a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheSpec.scala b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheSpec.scala
index 2c85b99..8ac523d 100644
--- a/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheSpec.scala
+++ b/modules/scalar/src/test/scala/org/apache/ignite/scalar/tests/ScalarCacheSpec.scala
@@ -38,14 +38,16 @@ class ScalarCacheSpec extends FlatSpec with ShouldMatchers {
         scalar("examples/config/example-cache.xml") {
             registerListener()
 
-            val c = cache$("partitioned").get.viewByType(classOf[Int], classOf[Int])
+            throw new RuntimeException("Test is disabled.")
 
-            c.putx(1, 1)
-            c.putx(2, 2)
-
-            c.values foreach println
-
-            println("Size is: " + c.size)
+//            val c = cache$("partitioned").get.viewByType(classOf[Int], classOf[Int])
+//
+//            c.putx(1, 1)
+//            c.putx(2, 2)
+//
+//            c.values foreach println
+//
+//            println("Size is: " + c.size)
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 85a5de5..31aa9e5 100644
--- a/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
+++ b/modules/spring/src/main/java/org/apache/ignite/IgniteSpringBean.java
@@ -17,15 +17,13 @@
 
 package org.apache.ignite;
 
-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.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
+import org.apache.ignite.lang.*;
+import org.apache.ignite.plugin.*;
 import org.jetbrains.annotations.*;
 import org.springframework.beans.*;
 import org.springframework.beans.factory.*;
@@ -137,13 +135,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     }
 
     /** {@inheritDoc} */
-    @Override public Collection<GridCache<?, ?>> caches() {
-        assert g != null;
-
-        return g.caches();
-    }
-
-    /** {@inheritDoc} */
     @Override public Collection<IgniteStreamer> streamers() {
         assert g != null;
 
@@ -242,13 +233,6 @@ public class IgniteSpringBean implements Ignite, DisposableBean, InitializingBea
     }
 
     /** {@inheritDoc} */
-    @Override public <K, V> GridCache<K, V> cache(String name) {
-        assert g != null;
-
-        return ((IgniteKernal)g).cache(name);
-    }
-
-    /** {@inheritDoc} */
     @Override public <K, V> IgniteCache<K, V> jcache(@Nullable String name) {
         assert g != null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/aa837c6f/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 629469d..3e8aae1 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
@@ -233,7 +233,7 @@ public class SpringCacheManager implements CacheManager, InitializingBean {
     @Override public Collection<String> getCacheNames() {
         assert grid != null;
 
-        return F.viewReadOnly(grid.caches(), new IgniteClosure<GridCache<?,?>, String>() {
+        return F.viewReadOnly(((IgniteKernal)grid).caches(), new IgniteClosure<GridCache<?,?>, String>() {
             @Override public String apply(GridCache<?, ?> c) {
                 return c.name();
             }


Mime
View raw message