ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/5] incubator-ignite git commit: # ignite-42
Date Thu, 15 Jan 2015 14:42:58 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-42 806ce6a36 -> 4b8ec5f23


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
index 9e3559a..cb641c4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
@@ -18,12 +18,12 @@
 package org.gridgain.grid.kernal.processors.cache.distributed;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -139,8 +139,8 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
      *
      * @return Write through storage emulator.
      */
-    protected GridCacheStore<?, ?> cacheStore() {
-        return new GridCacheStoreAdapter<Integer, String>() {
+    protected CacheStore<?, ?> cacheStore() {
+        return new CacheStoreAdapter<Integer, String>() {
             @IgniteInstanceResource
             private Ignite g;
 
@@ -152,17 +152,17 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
                     c.apply(e.getKey(), e.getValue());
             }
 
-            @Override public String load(IgniteTx tx, Integer key) {
+            @Override public String load(Integer key) {
                 X.println("Loading on: " + caches.indexOf(g.<Integer, String>cache(null)) + " key=" + key);
 
                 return map.get(key);
             }
 
-            @Override public void put(IgniteTx tx, Integer key, @Nullable String val) {
+            @Override public void put(Integer key, @Nullable String val) {
                 fail("Should not be called within the test.");
             }
 
-            @Override public void remove(IgniteTx tx, Integer key) {
+            @Override public void remove(Integer key) {
                 fail("Should not be called within the test.");
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
index 6f81490..7ce762c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
@@ -18,12 +18,12 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.consistenthash.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -761,7 +761,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     private void checkStore(Ignite ignite, Map<Integer, String> map) throws Exception {
-        GridCacheStore store = ignite.configuration().getCacheConfiguration()[0].getStore();
+        CacheStore store = ignite.configuration().getCacheConfiguration()[0].getStore();
 
         assertEquals(map, ((GridCacheTestStore)store).getMap());
     }
@@ -773,7 +773,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
      */
     private void clearStores(int cnt) {
         for (int i = 0; i < cnt; i++) {
-            GridCacheStore store = grid(i).configuration().getCacheConfiguration()[0].getStore();
+            CacheStore store = grid(i).configuration().getCacheConfiguration()[0].getStore();
 
             ((GridCacheTestStore)store).reset();
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java
index 6027986..6a781cf 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/dht/GridCacheGlobalLoadTest.java
@@ -10,12 +10,11 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.jdk8.backport.*;
 import org.jetbrains.annotations.*;
 import org.junit.*;
@@ -114,21 +113,21 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected GridCacheStore<?, ?> cacheStore() {
+    @Override protected CacheStore<?, ?> cacheStore() {
         return new TestStore();
     }
 
     /**
      * Test store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, Integer> {
+    private static class TestStore extends CacheStoreAdapter<Integer, Integer> {
         /** */
         @IgniteInstanceResource
         private Ignite ignite;
 
         /** {@inheritDoc} */
         @Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo,
-            @Nullable Object... args) throws IgniteCheckedException {
+            @Nullable Object... args) {
             assertNotNull(ignite);
             assertNotNull(clo);
             assertNotNull(map);
@@ -144,19 +143,19 @@ public class GridCacheGlobalLoadTest extends IgniteCacheAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public Integer load(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public Integer load(Integer key) {
             assertEquals((Integer)5, key);
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, Integer val) throws IgniteCheckedException {
+        @Override public void put(Integer key, Integer val) {
             fail();
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             fail();
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
index f351d97..3865b44 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheGetStoreErrorSelfTest.java
@@ -18,13 +18,12 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
@@ -65,18 +64,16 @@ public class GridCacheGetStoreErrorSelfTest extends GridCommonAbstractTest {
         cc.setDistributionMode(nearEnabled ? NEAR_PARTITIONED : PARTITIONED_ONLY);
         cc.setAtomicityMode(TRANSACTIONAL);
 
-        cc.setStore(new GridCacheStoreAdapter<Object, Object>() {
-            @Override public Object load(@Nullable IgniteTx tx, Object key)
-                throws IgniteCheckedException {
-                throw new IgniteCheckedException("Failed to get key from store: " + key);
+        cc.setStore(new CacheStoreAdapter<Object, Object>() {
+            @Override public Object load(Object key) {
+                throw new IgniteException("Failed to get key from store: " + key);
             }
 
-            @Override public void put(@Nullable IgniteTx tx, Object key,
-                @Nullable Object val) {
+            @Override public void put(Object key,@Nullable Object val) {
                 // No-op.
             }
 
-            @Override public void remove(@Nullable IgniteTx tx, Object key) {
+            @Override public void remove(Object key) {
                 // No-op.
             }
         });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
index 2145a30..7d97169 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
@@ -18,12 +18,12 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;
@@ -891,7 +891,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
     /**
      *
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, String> {
+    private static class TestStore extends CacheStoreAdapter<Integer, String> {
         /** Map. */
         private ConcurrentMap<Integer, String> map = new ConcurrentHashMap<>();
 
@@ -939,7 +939,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public String load(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public String load(Integer key) {
             if (!create)
                 return map.get(key);
 
@@ -949,13 +949,12 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, @Nullable String val)
-            throws IgniteCheckedException {
+        @Override public void put(Integer key, @Nullable String val) {
             map.put(key, val);
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             map.remove(key);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
index be64e75..c97ae6b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearOneNodeSelfTest.java
@@ -18,12 +18,12 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
@@ -311,7 +311,7 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
     /**
      *
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, String> {
+    private static class TestStore extends CacheStoreAdapter<Integer, String> {
         /** Map. */
         private ConcurrentMap<Integer, String> map = new ConcurrentHashMap<>();
 
@@ -359,7 +359,7 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public String load(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public String load(Integer key) {
             if (!create)
                 return map.get(key);
 
@@ -369,13 +369,12 @@ public class GridCacheNearOneNodeSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, @Nullable String val)
-            throws IgniteCheckedException {
+        @Override public void put(Integer key, @Nullable String val) {
             map.put(key, val);
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             map.remove(key);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
index d86cc95..98e741a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCacheNearPartitionedClearSelfTest.java
@@ -18,13 +18,13 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.junits.common.*;
@@ -50,7 +50,7 @@ public class GridCacheNearPartitionedClearSelfTest extends GridCommonAbstractTes
     private static final String CACHE_NAME = "cache";
 
     /** */
-    private static GridCacheStore<Object, Object> store = new GridCacheGenericTestStore<>();
+    private static CacheStore<Object, Object> store = new GridCacheGenericTestStore<>();
 
     /** Shared IP finder. */
     private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
index 3197890..4ffc87a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -26,7 +27,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
@@ -115,10 +115,9 @@ public class GridCachePartitionedLoadCacheSelfTest extends GridCommonAbstractTes
     /**
      * Test store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, String> {
+    private static class TestStore extends CacheStoreAdapter<Integer, String> {
         /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Integer, String> clo,
-            @Nullable Object... args) throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Integer, String> clo, @Nullable Object... args) {
             assert clo != null;
             assert args != null;
 
@@ -131,19 +130,19 @@ public class GridCachePartitionedLoadCacheSelfTest extends GridCommonAbstractTes
         }
 
         /** {@inheritDoc} */
-        @Override public String load(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public String load(Integer key) {
             // No-op.
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, String val) throws IgniteCheckedException {
+        @Override public void put(Integer key, String val) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             // No-op.
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java
index 3fdd09c..eaddb3d 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedStorePutSelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -25,7 +26,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.junits.common.*;
@@ -124,23 +124,21 @@ public class GridCachePartitionedStorePutSelfTest extends GridCommonAbstractTest
     /**
      * Test store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Object, Object> {
+    private static class TestStore extends CacheStoreAdapter<Object, Object> {
         /** {@inheritDoc} */
-        @Override public Object load(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public Object load(Object key) {
             assert false;
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Object key, @Nullable Object val)
-            throws IgniteCheckedException {
+        @Override public void put(Object key, @Nullable Object val) {
             // No-op
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Object key) throws IgniteCheckedException {
+        @Override public void remove(Object key) {
             // No-op
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
index a32c529..00ee06f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridPartitionedBackupLoadSelfTest.java
@@ -17,15 +17,13 @@
 
 package org.gridgain.grid.kernal.processors.cache.distributed.near;
 
-import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.spi.discovery.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
@@ -130,26 +128,24 @@ public class GridPartitionedBackupLoadSelfTest extends GridCommonAbstractTest {
     /**
      * Test store.
      */
-    private class TestStore extends GridCacheStoreAdapter<Integer, Integer> {
+    private class TestStore extends CacheStoreAdapter<Integer, Integer> {
         /** */
         private Map<Integer, Integer> map = new ConcurrentHashMap<>();
 
         /** {@inheritDoc} */
-        @Override public Integer load(@Nullable IgniteTx tx, Integer key)
-            throws IgniteCheckedException {
+        @Override public Integer load(Integer key) {
             cnt.incrementAndGet();
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, @Nullable Integer val)
-            throws IgniteCheckedException {
+        @Override public void put(Integer key, @Nullable Integer val) {
             map.put(key, val);
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             // No-op
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
index 4cc67a5..a318440 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
@@ -18,11 +18,11 @@
 package org.gridgain.grid.kernal.processors.cache.eviction;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.eviction.fifo.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.jetbrains.annotations.*;
 
@@ -64,8 +64,8 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
         GridCacheConfiguration cacheCfg = super.cacheConfiguration(gridName);
 
         cacheCfg.setCacheMode(GridCacheMode.PARTITIONED);
-        cacheCfg.setStore(new GridCacheStoreAdapter<Long, String>() {
-            @Nullable @Override public String load(@Nullable IgniteTx tx, Long key) {
+        cacheCfg.setStore(new CacheStoreAdapter<Long, String>() {
+            @Nullable @Override public String load(Long key) {
                 return null;
             }
 
@@ -75,11 +75,12 @@ public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest
                     c.apply((long)i, String.valueOf(i));
             }
 
-            @Override public void put(@Nullable IgniteTx tx, Long key,
-                @Nullable String val) {
+            @Override public void put(Long key, @Nullable String val) {
+                // No-op.
             }
 
-            @Override public void remove(@Nullable IgniteTx tx, Long key) {
+            @Override public void remove(Long key) {
+                // No-op.
             }
         });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index ab7c5be..6680b00 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -18,14 +18,14 @@
 package org.gridgain.grid.kernal.processors.cache.eviction;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.eviction.GridCacheEvictionPolicy;
 import org.gridgain.grid.cache.eviction.fifo.GridCacheFifoEvictionPolicy;
-import org.gridgain.grid.cache.store.GridCacheStore;
-import org.gridgain.grid.cache.store.GridCacheStoreAdapter;
+import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
@@ -50,7 +50,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
     private GridCacheEvictionPolicy<?, ?> nearPlc;
 
     /** Test store. */
-    private GridCacheStore<String, String> testStore;
+    private CacheStore<String, String> testStore;
 
     /** Tx concurrency to use. */
     private IgniteTxConcurrency txConcurrency;
@@ -131,17 +131,16 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
 
         checkPolicy0();
 
-        testStore = new GridCacheStoreAdapter<String, String>() {
-            @Override public String load(@Nullable IgniteTx tx, String key) {
+        testStore = new CacheStoreAdapter<String, String>() {
+            @Override public String load(String key) {
                 return null;
             }
 
-            @Override public void put(@Nullable IgniteTx tx, String key,
-                @Nullable String val) {
+            @Override public void put(String key, @Nullable String val) {
                 // No-op.
             }
 
-            @Override public void remove(@Nullable IgniteTx tx, String key) {
+            @Override public void remove(String key) {
                 // No-op.
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
index 3188326..a1b3aad 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
@@ -69,14 +69,17 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         cc.setEvictionPolicy(plc);
 
         cc.setStore(new GridCacheGenericTestStore<Object, Object>() {
-            @Override public Object load(IgniteTx tx, Object key) {
+            @Override public Object load(Object key) {
                 return key;
             }
 
-            @Override public void loadAll(IgniteTx tx, Collection<?> keys,
-                IgniteBiInClosure<Object, Object> c) {
+            @Override public Map<Object, Object> loadAll(Iterable<?> keys) {
+                Map<Object, Object> loaded = new HashMap<>();
+
                 for (Object key : keys)
-                    c.apply(key, key);
+                    loaded.put(key, key);
+
+                return loaded;
             }
         });
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheAtomicLocalMetricsNoStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheAtomicLocalMetricsNoStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheAtomicLocalMetricsNoStoreSelfTest.java
index 28ce0f7..d9bd74b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheAtomicLocalMetricsNoStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheAtomicLocalMetricsNoStoreSelfTest.java
@@ -17,13 +17,13 @@
 
 package org.gridgain.grid.kernal.processors.cache.local;
 
-import org.gridgain.grid.cache.store.*;
+import org.apache.ignite.cache.store.*;
 
 /**
  * Local atomic cache metrics test.
  */
 public class GridCacheAtomicLocalMetricsNoStoreSelfTest extends GridCacheAtomicLocalMetricsSelfTest {
-    @Override protected GridCacheStore<?, ?> cacheStore() {
+    @Override protected CacheStore<?, ?> cacheStore() {
         return null; // Test cache without store.
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
index 4a122ee..90af785 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/local/GridCacheLocalLoadAllSelfTest.java
@@ -18,11 +18,10 @@
 package org.gridgain.grid.kernal.processors.cache.local;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.gridgain.testframework.junits.common.*;
@@ -78,11 +77,11 @@ public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest {
     /**
      *
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, Integer> {
+    private static class TestStore extends CacheStoreAdapter<Integer, Integer> {
         /** {@inheritDoc} */
         @SuppressWarnings({"TypeParameterExtendsFinalClass"})
-        @Override public void loadAll(IgniteTx tx, Collection<? extends Integer> keys,
-            IgniteBiInClosure<Integer, Integer> c) throws IgniteCheckedException {
+        @Override public void loadAll(Collection<? extends Integer> keys,
+            IgniteBiInClosure<Integer, Integer> c) {
             assert keys != null;
 
             c.apply(1, 1);
@@ -91,19 +90,19 @@ public class GridCacheLocalLoadAllSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public Integer load(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public Integer load(Integer key) {
             // No-op.
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Integer key, Integer val) throws IgniteCheckedException {
+        @Override public void put(Integer key, Integer val) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             // No-op.
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 0c08a3d..0f78df1 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache.query.continuous;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
@@ -27,7 +28,6 @@ import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
 import org.gridgain.grid.cache.query.GridCacheContinuousQueryEntry;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.continuous.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -1506,29 +1506,26 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
     /**
      * Store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Object, Object> {
+    private static class TestStore extends CacheStoreAdapter<Object, Object> {
         /** {@inheritDoc} */
         @Override public void loadCache(IgniteBiInClosure<Object, Object> clo,
-            Object... args) throws IgniteCheckedException {
+            Object... args) {
             for (int i = 0; i < 10; i++)
                 clo.apply(i, i);
         }
 
         /** {@inheritDoc} */
-        @Nullable @Override public Object load(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Nullable @Override public Object load(Object key) {
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key,
-            @Nullable Object val) throws IgniteCheckedException {
+        @Override public void put(Object key, @Nullable Object val) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public void remove(Object key) {
             // No-op.
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
index 813d3da..6fb07ab 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/cache/GridCacheWriteBehindStoreLoadTest.java
@@ -18,13 +18,13 @@
 package org.gridgain.loadtests.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
@@ -54,20 +54,19 @@ public class GridCacheWriteBehindStoreLoadTest extends GridCommonAbstractTest {
     private int threadCnt;
 
     /** No-op cache store. */
-    private static final GridCacheStore store = new GridCacheStoreAdapter() {
+    private static final CacheStore store = new CacheStoreAdapter() {
         /** {@inheritDoc} */
-        @Override public Object load(@Nullable IgniteTx tx, Object key) {
+        @Override public Object load(Object key) {
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key,
-            @Nullable Object val) {
+        @Override public void put(Object key, @Nullable Object val) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key) {
+        @Override public void remove(Object key) {
             // No-op.
         }
     };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestCacheStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestCacheStore.java b/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestCacheStore.java
index 53a8127..2ad9704 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestCacheStore.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/colocation/GridTestCacheStore.java
@@ -18,22 +18,25 @@
 package org.gridgain.loadtests.colocation;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.jdk8.backport.*;
 
+import javax.cache.integration.*;
 import java.util.concurrent.*;
 
 /**
  * Accenture cache store.
  */
-public class GridTestCacheStore extends GridCacheStoreAdapter<GridTestKey, Long> {
+public class GridTestCacheStore extends CacheStoreAdapter<GridTestKey, Long> {
+    /** */
     @IgniteInstanceResource
     private Ignite ignite;
 
+    /** */
     @IgniteLoggerResource
     private IgniteLogger log;
 
@@ -42,10 +45,8 @@ public class GridTestCacheStore extends GridCacheStoreAdapter<GridTestKey, Long>
      *
      * @param clo Callback for every key.
      * @param args Optional arguments.
-     * @throws IgniteCheckedException If failed.
      */
-    @Override public void loadCache(final IgniteBiInClosure<GridTestKey, Long> clo,
-        Object... args) throws IgniteCheckedException {
+    @Override public void loadCache(final IgniteBiInClosure<GridTestKey, Long> clo, Object... args) {
         // Number of threads is passed in as argument by caller.
         final int numThreads = (Integer)args[0];
         int entryCnt = (Integer)args[1];
@@ -104,7 +105,7 @@ public class GridTestCacheStore extends GridCacheStoreAdapter<GridTestKey, Long>
                     completeSvc.take().get();
                 }
                 catch (InterruptedException | ExecutionException e) {
-                    throw new IgniteCheckedException(e);
+                    throw new CacheLoaderException(e);
                 }
             }
 
@@ -116,15 +117,18 @@ public class GridTestCacheStore extends GridCacheStoreAdapter<GridTestKey, Long>
         }
     }
 
-    @Override public Long load(IgniteTx tx, GridTestKey key) throws IgniteCheckedException {
+    /** {@inheritDoc} */
+    @Override public Long load(GridTestKey key) {
         return null; // No-op.
     }
 
-    @Override public void put(IgniteTx tx, GridTestKey key, Long val) throws IgniteCheckedException {
+    /** {@inheritDoc} */
+    @Override public void put(GridTestKey key, Long val) {
         // No-op.
     }
 
-    @Override public void remove(IgniteTx tx, GridTestKey key) throws IgniteCheckedException {
+    /** {@inheritDoc} */
+    @Override public void remove(GridTestKey key) {
         // No-op.
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java b/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java
index 2613587..a06df0a 100644
--- a/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java
+++ b/modules/core/src/test/java/org/gridgain/loadtests/swap/GridSwapEvictAllBenchmark.java
@@ -18,12 +18,12 @@
 package org.gridgain.loadtests.swap;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.eviction.fifo.*;
-import org.gridgain.grid.cache.store.*;
 import org.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
@@ -62,8 +62,8 @@ public class GridSwapEvictAllBenchmark {
         try {
             String outputFileName = args.length > 0 ? args[0] : null;
 
-            Ignite g = start(new GridCacheStoreAdapter<Long, String>() {
-                @Nullable @Override public String load(@Nullable IgniteTx tx, Long key) {
+            Ignite g = start(new CacheStoreAdapter<Long, String>() {
+                @Nullable @Override public String load(Long key) {
                     return null;
                 }
 
@@ -73,12 +73,11 @@ public class GridSwapEvictAllBenchmark {
                         c.apply((long)i, String.valueOf(i));
                 }
 
-                @Override public void put(@Nullable IgniteTx tx, Long key,
-                    @Nullable String val) {
+                @Override public void put(Long key, @Nullable String val) {
                     assert false;
                 }
 
-                @Override public void remove(@Nullable IgniteTx tx, Long key) {
+                @Override public void remove(Long key) {
                     assert false;
                 }
             });
@@ -248,7 +247,7 @@ public class GridSwapEvictAllBenchmark {
      * @return Started grid.
      * @throws IgniteCheckedException If failed.
      */
-    private static Ignite start(GridCacheStore<Long, String> store) throws IgniteCheckedException {
+    private static Ignite start(CacheStore<Long, String> store) throws IgniteCheckedException {
         IgniteConfiguration cfg = new IgniteConfiguration();
 
         cfg.setLocalHost("127.0.0.1");

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
index 9956056..41c3f6a 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/GridTestResources.java
@@ -123,6 +123,13 @@ public class GridTestResources {
     }
 
     /**
+     * @return Resource processor.
+     */
+    public GridResourceProcessor resources() {
+        return rsrcProc;
+    }
+
+    /**
      * @return Local host.
      */
     @Nullable private String localHost() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
index de36bb4..657dfae 100644
--- a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/GridAbstractCacheStoreSelfTest.java
@@ -18,9 +18,10 @@
 package org.gridgain.testframework.junits.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
+import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -34,11 +35,14 @@ import java.util.concurrent.atomic.*;
 /**
  * Abstract cache store test.
  */
-public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Object, Object>>
+public abstract class GridAbstractCacheStoreSelfTest<T extends CacheStore<Object, Object>>
     extends GridCommonAbstractTest {
     /** */
     protected final T store;
 
+    /** */
+    protected TestThreadLocalCacheSession ses = new TestThreadLocalCacheSession();
+
     /**
      * @throws Exception If failed.
      */
@@ -58,22 +62,30 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
         // Create dummy transaction
         IgniteTx tx = new DummyTx();
 
-        store.put(tx, "k1", "v1");
-        store.put(tx, "k2", "v2");
+        ses.newSession(tx);
+
+        store.put("k1", "v1");
+        store.put("k2", "v2");
+
+        store.txEnd(true);
+
+        ses.newSession(null);
+
+        assertEquals("v1", store.load("k1"));
+        assertEquals("v2", store.load("k2"));
+        assertNull(store.load("k3"));
 
-        store.txEnd(tx, true);
+        ses.newSession(tx);
 
-        assertEquals("v1", store.load(null, "k1"));
-        assertEquals("v2", store.load(null, "k2"));
-        assertNull(store.load( null, "k3"));
+        store.remove("k1");
 
-        store.remove(tx, "k1");
+        store.txEnd(true);
 
-        store.txEnd(tx, true);
+        ses.newSession(null);
 
-        assertNull(store.load(null, "k1"));
-        assertEquals("v2", store.load(null, "k2"));
-        assertNull(store.load(null, "k3"));
+        assertNull(store.load("k1"));
+        assertEquals("v2", store.load("k2"));
+        assertNull(store.load("k3"));
     }
 
     /**
@@ -82,61 +94,75 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
     public void testRollback() throws IgniteCheckedException {
         IgniteTx tx = new DummyTx();
 
+        ses.newSession(tx);
+
         // Put.
-        store.put(tx, "k1", "v1");
+        store.put("k1", "v1");
 
-        store.txEnd(tx, false); // Rollback.
+        store.txEnd(false); // Rollback.
 
         tx = new DummyTx();
 
-        assertNull(store.load(tx, "k1"));
+        ses.newSession(tx);
+
+        assertNull(store.load("k1"));
 
         // Put all.
-        assertNull(store.load(tx, "k2"));
+        assertNull(store.load("k2"));
 
-        store.putAll(tx, Collections.singletonMap("k2", "v2"));
+        store.putAll(Collections.singletonMap("k2", "v2"));
 
-        store.txEnd(tx, false); // Rollback.
+        store.txEnd(false); // Rollback.
 
         tx = new DummyTx();
 
-        assertNull(store.load(tx, "k2"));
+        ses.newSession(tx);
+
+        assertNull(store.load("k2"));
 
-        store.putAll(tx, Collections.singletonMap("k3", "v3"));
+        store.putAll(Collections.singletonMap("k3", "v3"));
 
-        store.txEnd(tx, true); // Commit.
+        store.txEnd(true); // Commit.
 
         tx = new DummyTx();
 
-        assertEquals("v3", store.load(tx, "k3"));
+        ses.newSession(tx);
 
-        store.put(tx, "k4", "v4");
+        assertEquals("v3", store.load("k3"));
 
-        store.txEnd(tx, false); // Rollback.
+        store.put("k4", "v4");
+
+        store.txEnd(false); // Rollback.
 
         tx = new DummyTx();
 
-        assertNull(store.load(tx, "k4"));
+        ses.newSession(tx);
+
+        assertNull(store.load("k4"));
 
-        assertEquals("v3", store.load(tx, "k3"));
+        assertEquals("v3", store.load("k3"));
 
         // Remove.
-        store.remove(tx, "k3");
+        store.remove("k3");
 
-        store.txEnd(tx, false); // Rollback.
+        store.txEnd(false); // Rollback.
 
         tx = new DummyTx();
 
-        assertEquals("v3", store.load(tx, "k3"));
+        ses.newSession(tx);
+
+        assertEquals("v3", store.load("k3"));
 
         // Remove all.
-        store.removeAll(tx, Arrays.asList("k3"));
+        store.removeAll(Arrays.asList("k3"));
 
-        store.txEnd(tx, false); // Rollback.
+        store.txEnd(false); // Rollback.
 
         tx = new DummyTx();
 
-        assertEquals("v3", store.load(tx, "k3"));
+        ses.newSession(tx);
+
+        assertEquals("v3", store.load("k3"));
     }
 
     /**
@@ -167,26 +193,30 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
      */
     private void doTestAllOps(@Nullable IgniteTx tx, boolean commit) throws IgniteCheckedException {
         try {
-            store.put(tx, "key1", "val1");
+            ses.newSession(tx);
+
+            store.put("key1", "val1");
 
             if (tx != null && commit) {
-                store.txEnd(tx, true);
+                store.txEnd(true);
 
                 tx = new DummyTx();
+
+                ses.newSession(tx);
             }
 
             if (tx == null || commit)
-                assertEquals("val1", store.load(tx, "key1"));
+                assertEquals("val1", store.load("key1"));
 
             Map<String, String> m = new HashMap<>();
 
             m.put("key2", "val2");
             m.put("key3", "val3");
 
-            store.putAll(tx, m);
+            store.putAll(m);
 
             if (tx != null && commit) {
-                store.txEnd(tx, true);
+                store.txEnd(true);
 
                 tx = new DummyTx();
             }
@@ -194,7 +224,7 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
             final AtomicInteger cntr = new AtomicInteger();
 
             if (tx == null || commit) {
-                store.loadAll(tx, Arrays.asList("key1", "key2", "key3", "no_such_key"), new CI2<Object, Object>() {
+                store.loadAll(Arrays.asList("key1", "key2", "key3", "no_such_key"), new CI2<Object, Object>() {
                     @Override public void apply(Object o, Object o1) {
                         if ("key1".equals(o))
                             assertEquals("val1", o1);
@@ -215,35 +245,41 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                 assertEquals(3, cntr.get());
             }
 
-            store.removeAll(tx, Arrays.asList("key2", "key3"));
+            store.removeAll(Arrays.asList("key2", "key3"));
 
             if (tx != null && commit) {
-                store.txEnd(tx, true);
+                store.txEnd(true);
 
                 tx = new DummyTx();
+
+                ses.newSession(tx);
             }
 
             if (tx == null || commit) {
-                assertNull(store.load(tx, "key2"));
-                assertNull(store.load(tx, "key3"));
-                assertEquals("val1", store.load(tx, "key1"));
+                assertNull(store.load("key2"));
+                assertNull(store.load("key3"));
+                assertEquals("val1", store.load("key1"));
             }
 
-            store.remove(tx, "key1");
+            store.remove("key1");
 
             if (tx != null && commit) {
-                store.txEnd(tx, true);
+                store.txEnd(true);
 
                 tx = new DummyTx();
+
+                ses.newSession(tx);
             }
 
             if (tx == null || commit)
-                assertNull(store.load(tx, "key1"));
-
+                assertNull(store.load("key1"));
         }
         finally {
-            if (tx != null)
-                store.txEnd(tx, false);
+            if (tx != null) {
+                store.txEnd(false);
+
+                ses.newSession(null);
+            }
         }
     }
 
@@ -256,11 +292,12 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
         final LinkedBlockingQueue<UUID> queue = new LinkedBlockingQueue<>();
 
         multithreaded(new Callable<Object>() {
-            @Override
-            public Object call() throws Exception {
+            @Override public Object call() throws Exception {
                 for (int i = 0; i < 1000; i++) {
                     IgniteTx tx = rnd.nextBoolean() ? new DummyTx() : null;
 
+                    ses.newSession(tx);
+
                     int op = rnd.nextInt(10);
 
                     boolean queueEmpty = false;
@@ -272,13 +309,12 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                             queueEmpty = true;
                         else {
                             if (rnd.nextBoolean())
-                                assertNotNull(store.load(tx, key));
+                                assertNotNull(store.load(key));
                             else {
                                 final AtomicInteger cntr = new AtomicInteger();
 
-                                store.loadAll(tx, Collections.singleton(key), new CI2<Object, Object>() {
-                                    @Override
-                                    public void apply(Object o, Object o1) {
+                                store.loadAll(Collections.singleton(key), new CI2<Object, Object>() {
+                                    @Override public void apply(Object o, Object o1) {
                                         cntr.incrementAndGet();
 
                                         assertNotNull(o);
@@ -297,7 +333,7 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                             }
 
                             if (tx != null)
-                                store.txEnd(tx, true);
+                                store.txEnd(true);
 
                             queue.add(key);
                         }
@@ -309,12 +345,12 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                             queueEmpty = true;
                         else {
                             if (rnd.nextBoolean())
-                                store.remove(tx, key);
+                                store.remove(key);
                             else
-                                store.removeAll(tx, Collections.singleton(key));
+                                store.removeAll(Collections.singleton(key));
 
                             if (tx != null)
-                                store.txEnd(tx, true);
+                                store.txEnd(true);
                         }
                     }
                     else { // Update.
@@ -326,12 +362,12 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                             UUID val = new UUID(key.getLeastSignificantBits(), key.getMostSignificantBits());
 
                             if (rnd.nextBoolean())
-                                store.put(tx, key, val);
+                                store.put(key, val);
                             else
-                                store.putAll(tx, Collections.singletonMap(key, val));
+                                store.putAll(Collections.singletonMap(key, val));
 
                             if (tx != null)
-                                store.txEnd(tx, true);
+                                store.txEnd(true);
 
                             queue.add(key);
                         }
@@ -341,12 +377,12 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
                         UUID key = UUID.randomUUID();
 
                         if (rnd.nextBoolean())
-                            store.put(tx, key, key);
+                            store.put(key, key);
                         else
-                            store.putAll(tx, Collections.singletonMap(key, key));
+                            store.putAll(Collections.singletonMap(key, key));
 
                         if (tx != null)
-                            store.txEnd(tx, true);
+                            store.txEnd(true);
 
                         queue.add(key);
                     }
@@ -363,6 +399,8 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
      */
     protected void inject(T store) throws Exception {
         getTestResources().inject(store);
+
+        getTestResources().resources().injectBasicResource(store, IgniteCacheSessionResource.class, ses);
     }
 
     /** {@inheritDoc} */
@@ -385,7 +423,9 @@ public abstract class GridAbstractCacheStoreSelfTest<T extends GridCacheStore<Ob
         if (keys.isEmpty())
             return;
 
-        store.removeAll(null, keys);
+        ses.newSession(null);
+
+        store.removeAll(keys);
 
         keys.clear();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestCacheSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestCacheSession.java b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestCacheSession.java
new file mode 100644
index 0000000..9093ddb
--- /dev/null
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestCacheSession.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gridgain.testframework.junits.cache;
+
+import org.apache.ignite.cache.store.*;
+import org.apache.ignite.transactions.*;
+import org.gridgain.grid.util.typedef.internal.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ *
+ */
+public class TestCacheSession implements CacheStoreSession {
+    /** */
+    private IgniteTx tx;
+
+    /** */
+    private Map<Object, Object> props;
+
+    /**
+     *
+     * @param tx Transaction.
+     */
+    public void newSession(@Nullable IgniteTx tx) {
+        this.tx = tx;
+
+        props = null;
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public IgniteTx transaction() {
+        return tx;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Map<Object, Object> properties() {
+        if (props == null)
+            props = U.newHashMap(1);
+
+        return props;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestThreadLocalCacheSession.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestThreadLocalCacheSession.java b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestThreadLocalCacheSession.java
new file mode 100644
index 0000000..efe0b24
--- /dev/null
+++ b/modules/core/src/test/java/org/gridgain/testframework/junits/cache/TestThreadLocalCacheSession.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gridgain.testframework.junits.cache;
+
+import org.apache.ignite.cache.store.*;
+import org.apache.ignite.transactions.*;
+import org.jetbrains.annotations.*;
+
+import java.util.*;
+
+/**
+ *
+ */
+public class TestThreadLocalCacheSession implements CacheStoreSession {
+    /** */
+    private final ThreadLocal<TestCacheSession> sesHolder = new ThreadLocal<>();
+
+    /**
+     * @param tx Transaction.
+     */
+    public void newSession(@Nullable IgniteTx tx) {
+        TestCacheSession ses = new TestCacheSession();
+
+        ses.newSession(tx);
+
+        sesHolder.set(ses);
+    }
+
+    /** {@inheritDoc} */
+    @Nullable @Override public IgniteTx transaction() {
+        TestCacheSession ses = sesHolder.get();
+
+        return ses != null ? ses.transaction() : null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public Map<Object, Object> properties() {
+        TestCacheSession ses = sesHolder.get();
+
+        return ses != null ? ses.properties() : null;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
index 3b2ed6c..ddfa0b1 100644
--- a/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
+++ b/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
@@ -23,7 +23,7 @@ import org.apache.ignite.internal.processors.cache.expiry.*;
 import org.gridgain.grid.*;
 import org.gridgain.grid.cache.affinity.fair.*;
 import org.gridgain.grid.cache.store.*;
-import org.gridgain.grid.cache.store.jdbc.*;
+import org.apache.ignite.cache.store.jdbc.*;
 import org.gridgain.grid.kernal.processors.cache.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.dht.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java b/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
index ce3b17c..a22cd42 100644
--- a/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
+++ b/modules/hibernate/src/main/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStore.java
@@ -18,10 +18,11 @@
 package org.gridgain.grid.cache.store.hibernate;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.marshaller.*;
 import org.apache.ignite.resources.*;
 import org.apache.ignite.transactions.*;
-import org.gridgain.grid.cache.store.*;
+import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.grid.util.tostring.*;
@@ -29,6 +30,7 @@ import org.hibernate.*;
 import org.hibernate.cfg.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.integration.*;
 import java.io.*;
 import java.net.*;
 import java.util.*;
@@ -36,7 +38,7 @@ import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
 /**
- * {@link GridCacheStore} implementation backed by Hibernate. This implementation
+ * {@link org.apache.ignite.cache.store.CacheStore} implementation backed by Hibernate. This implementation
  * stores objects in underlying database in {@code BLOB} format.
  * <h2 class="header">Configuration</h2>
  * Either {@link #setSessionFactory(SessionFactory)} or
@@ -143,7 +145,7 @@ import java.util.concurrent.atomic.*;
  * <br>
  * For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a>
  */
-public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K, V> {
+public class GridCacheHibernateBlobStore<K, V> extends CacheStoreAdapter<K, V> {
     /**
      * Default connection URL
      * (value is <tt>jdbc:h2:mem:hibernateCacheStore;DB_CLOSE_DELAY=-1;DEFAULT_LOCK_TIMEOUT=5000</tt>).
@@ -192,9 +194,11 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
 
     /** {@inheritDoc} */
     @SuppressWarnings({"unchecked", "RedundantTypeArguments"})
-    @Override public V load(@Nullable IgniteTx tx, K key) throws IgniteCheckedException {
+    @Override public V load(K key) {
         init();
 
+        IgniteTx tx = transaction();
+
         if (log.isDebugEnabled())
             log.debug("Store load [key=" + key + ", tx=" + tx + ']');
 
@@ -209,10 +213,10 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
 
             return fromBytes(entry.getValue());
         }
-        catch (HibernateException e) {
+        catch (IgniteCheckedException | HibernateException e) {
             rollback(ses, tx);
 
-            throw new IgniteCheckedException("Failed to load value from cache store with key: " + key, e);
+            throw new CacheLoaderException("Failed to load value from cache store with key: " + key, e);
         }
         finally {
             end(ses, tx);
@@ -220,15 +224,16 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public void put(@Nullable IgniteTx tx, K key, @Nullable V val)
-        throws IgniteCheckedException {
+    @Override public void put(K key, @Nullable V val) {
         init();
 
+        IgniteTx tx = transaction();
+
         if (log.isDebugEnabled())
             log.debug("Store put [key=" + key + ", val=" + val + ", tx=" + tx + ']');
 
         if (val == null) {
-            remove(tx, key);
+            remove(key);
 
             return;
         }
@@ -240,10 +245,10 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
 
             ses.saveOrUpdate(entry);
         }
-        catch (HibernateException e) {
+        catch (IgniteCheckedException | HibernateException e) {
             rollback(ses, tx);
 
-            throw new IgniteCheckedException("Failed to put value to cache store [key=" + key + ", val" + val + "]", e);
+            throw new CacheWriterException("Failed to put value to cache store [key=" + key + ", val" + val + "]", e);
         }
         finally {
             end(ses, tx);
@@ -252,9 +257,11 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
 
     /** {@inheritDoc} */
     @SuppressWarnings({"JpaQueryApiInspection", "JpaQlInspection"})
-    @Override public void remove(@Nullable IgniteTx tx, K key) throws IgniteCheckedException {
+    @Override public void remove(K key) {
         init();
 
+        IgniteTx tx = transaction();
+
         if (log.isDebugEnabled())
             log.debug("Store remove [key=" + key + ", tx=" + tx + ']');
 
@@ -266,10 +273,10 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
             if (obj != null)
                 ses.delete(obj);
         }
-        catch (HibernateException e) {
+        catch (IgniteCheckedException | HibernateException e) {
             rollback(ses, tx);
 
-            throw new IgniteCheckedException("Failed to remove value from cache store with key: " + key, e);
+            throw new CacheWriterException("Failed to remove value from cache store with key: " + key, e);
         }
         finally {
             end(ses, tx);
@@ -313,10 +320,12 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
     }
 
     /** {@inheritDoc} */
-    @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+    @Override public void txEnd(boolean commit) {
         init();
 
-        Session ses = tx.removeMeta(ATTR_SES);
+        IgniteTx tx = transaction();
+
+        Session ses = (Session)session().properties().remove(ATTR_SES);
 
         if (ses != null) {
             Transaction hTx = ses.getTransaction();
@@ -335,7 +344,7 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
                         log.debug("Transaction ended [xid=" + tx.xid() + ", commit=" + commit + ']');
                 }
                 catch (HibernateException e) {
-                    throw new IgniteCheckedException("Failed to end transaction [xid=" + tx.xid() +
+                    throw new CacheWriterException("Failed to end transaction [xid=" + tx.xid() +
                         ", commit=" + commit + ']', e);
                 }
                 finally {
@@ -355,7 +364,9 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
         Session ses;
 
         if (tx != null) {
-            ses = tx.meta(ATTR_SES);
+            Map<Object, Object> props = session().properties();
+
+            ses = (Session)props.get(ATTR_SES);
 
             if (ses == null) {
                 ses = sesFactory.openSession();
@@ -364,7 +375,7 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
 
                 // Store session in transaction metadata, so it can be accessed
                 // for other operations on the same transaction.
-                tx.addMeta(ATTR_SES, ses);
+                props.put(ATTR_SES, ses);
 
                 if (log.isDebugEnabled())
                     log.debug("Hibernate session open [ses=" + ses + ", tx=" + tx.xid() + "]");
@@ -412,9 +423,9 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
     /**
      * Initializes store.
      *
-     * @throws IgniteCheckedException If failed to initialize.
+     * @throws IgniteException If failed to initialize.
      */
-    private void init() throws IgniteCheckedException {
+    private void init() throws IgniteException {
         if (initGuard.compareAndSet(false, true)) {
             if (log.isDebugEnabled())
                 log.debug("Initializing cache store.");
@@ -486,17 +497,23 @@ public class GridCacheHibernateBlobStore<K, V> extends GridCacheStoreAdapter<K,
                 }
             }
             catch (HibernateException e) {
-                throw new IgniteCheckedException("Failed to initialize store.", e);
+                throw new IgniteException("Failed to initialize store.", e);
             }
             finally {
                 initLatch.countDown();
             }
         }
-        else if (initLatch.getCount() > 0)
-            U.await(initLatch);
+        else if (initLatch.getCount() > 0) {
+            try {
+                U.await(initLatch);
+            }
+            catch (GridInterruptedException e) {
+                throw new IgniteException(e);
+            }
+        }
 
         if (sesFactory == null)
-            throw new IgniteCheckedException("Cache store was not properly initialized.");
+            throw new IgniteException("Cache store was not properly initialized.");
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/hibernate/src/test/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hibernate/src/test/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStoreSelfTest.java b/modules/hibernate/src/test/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStoreSelfTest.java
index 5bf4009..85da9d2 100644
--- a/modules/hibernate/src/test/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStoreSelfTest.java
+++ b/modules/hibernate/src/test/java/org/gridgain/grid/cache/store/hibernate/GridCacheHibernateBlobStoreSelfTest.java
@@ -76,7 +76,7 @@ public class GridCacheHibernateBlobStoreSelfTest extends
         store.setHibernateConfigurationPath(url.toString());
 
         // Store will be implicitly initialized.
-        store.load(null, "key");
+        store.load("key");
     }
 
     /**
@@ -93,7 +93,7 @@ public class GridCacheHibernateBlobStoreSelfTest extends
         store.setHibernateConfigurationPath(file.getAbsolutePath());
 
         // Store will be implicitly initialized.
-        store.load(null, "key");
+        store.load("key");
     }
 
     /**
@@ -103,6 +103,6 @@ public class GridCacheHibernateBlobStoreSelfTest extends
         store.setHibernateConfigurationPath("/org/gridgain/grid/cache/store/hibernate/hibernate.cfg.xml");
 
         // Store will be implicitly initialized.
-        store.load(null, "key");
+        store.load("key");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java
index d2e7ac8..536e3ad 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.events.*;
 import org.apache.ignite.lang.*;
@@ -29,7 +30,6 @@ import org.apache.ignite.spi.swapspace.file.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.query.*;
 import org.gridgain.grid.util.tostring.*;
@@ -1994,7 +1994,7 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
     /**
      * Test store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Object, Object> {
+    private static class TestStore extends CacheStoreAdapter<Object, Object> {
         /** */
         private Map<Object, Object> map = new ConcurrentHashMap<>();
 
@@ -2004,19 +2004,17 @@ public abstract class GridCacheAbstractQuerySelfTest extends GridCommonAbstractT
         }
 
         /** {@inheritDoc} */
-        @Override public Object load(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public Object load(Object key) {
             return map.get(key);
         }
 
         /** {@inheritDoc} */
-        @Override public void put(IgniteTx tx, Object key, @Nullable Object val)
-            throws IgniteCheckedException {
+        @Override public void put(Object key, @Nullable Object val) {
             map.put(key, val);
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(IgniteTx tx, Object key) throws IgniteCheckedException {
+        @Override public void remove(Object key) {
             map.remove(key);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryLoadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryLoadSelfTest.java b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryLoadSelfTest.java
index 86947cd..b41c11d 100644
--- a/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryLoadSelfTest.java
+++ b/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheQueryLoadSelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
 import org.apache.ignite.spi.discovery.tcp.*;
@@ -26,7 +27,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.query.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.query.*;
 import org.gridgain.grid.util.typedef.*;
@@ -390,10 +390,9 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest {
     /**
      * Test store.
      */
-    private static class TestStore extends GridCacheStoreAdapter<Integer, ValueObject> {
+    private static class TestStore extends CacheStoreAdapter<Integer, ValueObject> {
         /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Integer, ValueObject> clo,
-            @Nullable Object... args) throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Integer, ValueObject> clo, @Nullable Object... args) {
             assert clo != null;
 
             for (int i = 0; i < PUT_CNT; i++)
@@ -401,16 +400,14 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public ValueObject load(@Nullable IgniteTx tx,
-            Integer key) throws IgniteCheckedException {
+        @Override public ValueObject load(Integer key) {
             assert key != null;
 
             return STORE_MAP.get(key);
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx,
-            Integer key, ValueObject val) throws IgniteCheckedException {
+        @Override public void put(Integer key, ValueObject val) {
             assert key != null;
             assert val != null;
 
@@ -418,8 +415,7 @@ public class GridCacheQueryLoadSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx,
-            Integer key) throws IgniteCheckedException {
+        @Override public void remove(Integer key) {
             assert key != null;
 
             STORE_MAP.remove(key);


Mime
View raw message