ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/5] incubator-ignite git commit: # ignite-42
Date Thu, 15 Jan 2015 14:42:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreExpiryPolicyTest.java
index 902d1dd..4876a6a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreExpiryPolicyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreExpiryPolicyTest.java
@@ -9,14 +9,14 @@
 
 package org.apache.ignite.internal.processors.cache.expiry;
 
-import org.gridgain.grid.cache.store.*;
+import org.apache.ignite.cache.store.*;
 
 /**
  *
  */
 public class IgniteCacheTxWithStoreExpiryPolicyTest extends IgniteCacheTxExpiryPolicyTest {
     /** {@inheritDoc} */
-    @Override protected GridCacheStore<?, ?> cacheStore() {
+    @Override protected CacheStore<?, ?> cacheStore() {
         return new TestStore();
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
index b736c68..262c419 100644
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheBalancingStoreSelfTest.java
@@ -17,14 +17,15 @@
 
 package org.gridgain.grid.cache.store;
 
-import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -43,8 +44,8 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
         final AtomicInteger cycles = new AtomicInteger();
         final AtomicReference<Exception> err = new AtomicReference<>();
 
-        final GridCacheStoreBalancingWrapper<Integer, Integer> w =
-            new GridCacheStoreBalancingWrapper<>(new VerifyStore(range));
+        final CacheStoreBalancingWrapper<Integer, Integer> w =
+            new CacheStoreBalancingWrapper<>(new VerifyStore(range));
 
         final AtomicBoolean finish = new AtomicBoolean();
 
@@ -54,12 +55,12 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
                     ThreadLocalRandom rnd = ThreadLocalRandom.current();
 
                     while (!finish.get()) {
-                        int cnt = rnd.nextInt(GridCacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD) + 1;
+                        int cnt = rnd.nextInt(CacheStoreBalancingWrapper.DFLT_LOAD_ALL_THRESHOLD) + 1;
 
                         if (cnt == 1) {
                             int key = rnd.nextInt(range);
 
-                            assertEquals((Integer)key, w.load(null, key));
+                            assertEquals((Integer)key, w.load(key));
                         }
                         else {
                             Collection<Integer> keys = new HashSet<>(cnt);
@@ -69,7 +70,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
 
                             final Map<Integer, Integer> loaded = new HashMap<>();
 
-                            w.loadAll(null, keys, new CI2<Integer, Integer>() {
+                            w.loadAll(keys, new CI2<Integer, Integer>() {
                                 @Override public void apply(Integer k, Integer v) {
                                     loaded.put(k, v);
                                 }
@@ -113,7 +114,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
     /**
      *
      */
-    private static class VerifyStore implements GridCacheStore<Integer, Integer> {
+    private static class VerifyStore implements CacheStore<Integer, Integer> {
         /** */
         private Lock[] locks;
 
@@ -128,7 +129,7 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Nullable @Override public Integer load(@Nullable IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Nullable @Override public Integer load(Integer key) {
             boolean res = locks[key].tryLock();
 
             if (res) {
@@ -146,20 +147,20 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo, @Nullable Object... args)
-            throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo, @Nullable Object... args) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void loadAll(@Nullable IgniteTx tx, Collection<? extends Integer> keys,
-            IgniteBiInClosure<Integer, Integer> c) throws IgniteCheckedException {
+        @Override public Map<Integer, Integer> loadAll(Iterable<? extends Integer> keys) {
+            Map<Integer, Integer> loaded = new HashMap<>();
+
             for (Integer key : keys) {
                 boolean res = locks[key].tryLock();
 
                 if (res) {
                     try {
-                        c.apply(key, key);
+                        loaded.put(key, key);
                     }
                     finally {
                         locks[key].unlock();
@@ -168,32 +169,32 @@ public class GridCacheBalancingStoreSelfTest extends GridCommonAbstractTest {
                 else
                     fail("Failed to acquire lock for key: " + key);
             }
+
+            return loaded;
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Integer key, Integer val) throws IgniteCheckedException {
+        @Override public void write(Cache.Entry<? extends Integer, ? extends Integer> entry) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(@Nullable IgniteTx tx, Map<? extends Integer, ? extends Integer> map)
-            throws IgniteCheckedException {
+        @Override public void writeAll(Collection<Cache.Entry<? extends Integer, ? extends Integer>> entries) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Override public void delete(Object key) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void removeAll(@Nullable IgniteTx tx, Collection<? extends Integer> keys)
-            throws IgniteCheckedException {
+        @Override public void deleteAll(Collection<?> keys) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+        @Override public void txEnd(boolean commit) {
             // No-op.
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
index 2414122..ebda034 100644
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridCacheLoadOnlyStoreAdapterSelfTest.java
@@ -18,6 +18,7 @@
 package org.gridgain.grid.cache.store;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.kernal.processors.cache.*;
@@ -67,10 +68,9 @@ public class GridCacheLoadOnlyStoreAdapterSelfTest extends GridCacheAbstractSelf
     /**
      *
      */
-    private static class TestStore extends GridCacheLoadOnlyStoreAdapter<Integer, String, String> {
+    private static class TestStore extends CacheLoadOnlyStoreAdapter<Integer, String, String> {
         /** {@inheritDoc} */
-        @Override protected Iterator<String> inputIterator(@Nullable Object... args)
-            throws IgniteCheckedException {
+        @Override protected Iterator<String> inputIterator(@Nullable Object... args) {
             assertNotNull(args);
             assertTrue(Arrays.equals(EXP_ARGS, args));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/GridGeneratingTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridGeneratingTestStore.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridGeneratingTestStore.java
index 4482f17..80aa5fe 100644
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/GridGeneratingTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/cache/store/GridGeneratingTestStore.java
@@ -17,19 +17,20 @@
 
 package org.gridgain.grid.cache.store;
 
-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.util.typedef.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 
 /**
  * Test store that generates objects on demand.
  */
-public class GridGeneratingTestStore implements GridCacheStore<String, String> {
+public class GridGeneratingTestStore implements CacheStore<String, String> {
     /** Number of entries to be generated. */
     private static final int DFLT_GEN_CNT = 100;
 
@@ -38,14 +39,12 @@ public class GridGeneratingTestStore implements GridCacheStore<String, String> {
     private String cacheName;
 
     /** {@inheritDoc} */
-    @Override public String load(@Nullable IgniteTx tx, String key)
-        throws IgniteCheckedException {
+    @Override public String load(String key) {
         return null;
     }
 
     /** {@inheritDoc} */
-    @Override public void loadCache(IgniteBiInClosure<String, String> clo,
-        @Nullable Object... args) throws IgniteCheckedException {
+    @Override public void loadCache(IgniteBiInClosure<String, String> clo, @Nullable Object... args) {
         if (args.length > 0) {
             try {
                 int cnt = ((Number)args[0]).intValue();
@@ -57,7 +56,7 @@ public class GridGeneratingTestStore implements GridCacheStore<String, String> {
             catch (Exception e) {
                 X.println("Unexpected exception in loadAll: " + e);
 
-                throw new IgniteCheckedException(e);
+                throw new CacheLoaderException(e);
             }
         }
         else {
@@ -67,38 +66,37 @@ public class GridGeneratingTestStore implements GridCacheStore<String, String> {
     }
 
     /** {@inheritDoc} */
-    @Override public void loadAll(@Nullable IgniteTx tx,
-        @Nullable Collection<? extends String> keys, IgniteBiInClosure<String, String> c) throws IgniteCheckedException {
+    @Override public Map<String, String> loadAll(Iterable<? extends String> keys) {
+        Map<String, String> loaded = new HashMap<>();
+
         for (String key : keys)
-            c.apply(key, "val" + key);
+            loaded.put(key, "val" + key);
+
+        return loaded;
     }
 
     /** {@inheritDoc} */
-    @Override public void put(@Nullable IgniteTx tx, String key, @Nullable String val)
-        throws IgniteCheckedException {
+    @Override public void write(Cache.Entry<? extends String, ? extends String> entry) {
         // No-op.
     }
 
     /** {@inheritDoc} */
-    @Override public void putAll(@Nullable IgniteTx tx,
-        @Nullable Map<? extends String, ? extends String> map) throws IgniteCheckedException {
+    @Override public void writeAll(Collection<Cache.Entry<? extends String, ? extends String>> entries) {
         // No-op.
     }
 
     /** {@inheritDoc} */
-    @Override public void remove(@Nullable IgniteTx tx, String key)
-        throws IgniteCheckedException {
+    @Override public void delete(Object key) {
         // No-op.
     }
 
     /** {@inheritDoc} */
-    @Override public void removeAll(@Nullable IgniteTx tx,
-        @Nullable Collection<? extends String> keys) throws IgniteCheckedException {
+    @Override public void deleteAll(Collection<?> keys) {
         // No-op.
     }
 
     /** {@inheritDoc} */
-    @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+    @Override public void txEnd(boolean commit) {
         // No-op.
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
deleted file mode 100644
index b5acd49..0000000
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreMultithreadedSelfTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * 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.grid.cache.store.jdbc;
-
-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.*;
-import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
-import org.gridgain.grid.util.typedef.internal.*;
-import org.gridgain.testframework.junits.common.*;
-import org.jdk8.backport.*;
-
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.concurrent.*;
-
-import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
-import static org.gridgain.grid.cache.GridCacheMode.*;
-import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
-import static org.gridgain.grid.cache.GridCacheWriteSynchronizationMode.*;
-import static org.gridgain.testframework.GridTestUtils.*;
-
-/**
- *
- */
-public class GridCacheJdbcBlobStoreMultithreadedSelfTest extends GridCommonAbstractTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** Number of grids to start. */
-    private static final int GRID_CNT = 5;
-
-    /** Number of transactions. */
-    private static final int TX_CNT = 1000;
-
-    /** Cache store. */
-    private static GridCacheStore<Integer, String> store;
-
-    /** Distribution mode. */
-    private GridCacheDistributionMode mode;
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        store = store();
-
-        mode = NEAR_PARTITIONED;
-
-        startGridsMultiThreaded(GRID_CNT - 2);
-
-        mode = NEAR_ONLY;
-
-        startGrid(GRID_CNT - 2);
-
-        mode = CLIENT_ONLY;
-
-        startGrid(GRID_CNT - 1);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected final IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(gridName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(IP_FINDER);
-
-        c.setDiscoverySpi(disco);
-
-        GridCacheConfiguration cc = defaultCacheConfiguration();
-
-        cc.setCacheMode(PARTITIONED);
-        cc.setWriteSynchronizationMode(FULL_SYNC);
-        cc.setSwapEnabled(false);
-        cc.setAtomicityMode(TRANSACTIONAL);
-        cc.setBackups(1);
-        cc.setDistributionMode(mode);
-
-        cc.setStore(store);
-
-        c.setCacheConfiguration(cc);
-
-        return c;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMultithreadedPut() throws Exception {
-        IgniteFuture<?> fut1 = runMultiThreadedAsync(new Callable<Object>() {
-            private final Random rnd = new Random();
-
-            @Override public Object call() throws Exception {
-                for (int i = 0; i < TX_CNT; i++) {
-                    GridCache<Integer, String> cache = cache(rnd.nextInt(GRID_CNT));
-
-                    cache.put(rnd.nextInt(1000), "value");
-                }
-
-                return null;
-            }
-        }, 4, "put");
-
-        IgniteFuture<?> fut2 = runMultiThreadedAsync(new Callable<Object>() {
-            private final Random rnd = new Random();
-
-            @Override public Object call() throws Exception {
-                for (int i = 0; i < TX_CNT; i++) {
-                    GridCache<Integer, String> cache = cache(rnd.nextInt(GRID_CNT));
-
-                    cache.putIfAbsent(rnd.nextInt(1000), "value");
-                }
-
-                return null;
-            }
-        }, 4, "putIfAbsent");
-
-        fut1.get();
-        fut2.get();
-
-        long opened = ((LongAdder)U.field(store, "opened")).sum();
-        long closed = ((LongAdder)U.field(store, "closed")).sum();
-
-        assert opened > 0;
-        assert closed > 0;
-
-        assertEquals(opened, closed);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMultithreadedPutAll() throws Exception {
-        runMultiThreaded(new Callable<Object>() {
-            private final Random rnd = new Random();
-
-            @Override public Object call() throws Exception {
-                for (int i = 0; i < TX_CNT; i++) {
-                    Map<Integer, String> map = new TreeMap<>();
-
-                    for (int j = 0; j < 10; j++)
-                        map.put(rnd.nextInt(1000), "value");
-
-                    GridCache<Integer, String> cache = cache(rnd.nextInt(GRID_CNT));
-
-                    cache.putAll(map);
-                }
-
-                return null;
-            }
-        }, 8, "putAll");
-
-        long opened = ((LongAdder)U.field(store, "opened")).sum();
-        long closed = ((LongAdder)U.field(store, "closed")).sum();
-
-        assert opened > 0;
-        assert closed > 0;
-
-        assertEquals(opened, closed);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMultithreadedExplicitTx() throws Exception {
-        runMultiThreaded(new Callable<Object>() {
-            private final Random rnd = new Random();
-
-            @Override public Object call() throws Exception {
-                for (int i = 0; i < TX_CNT; i++) {
-                    GridCache<Integer, String> cache = cache(rnd.nextInt(GRID_CNT));
-
-                    try (IgniteTx tx = cache.txStart()) {
-                        cache.put(1, "value");
-                        cache.put(2, "value");
-                        cache.put(3, "value");
-
-                        cache.get(1);
-                        cache.get(4);
-
-                        Map<Integer, String> map = new TreeMap<>();
-
-                        map.put(5, "value");
-                        map.put(6, "value");
-
-                        cache.putAll(map);
-
-                        tx.commit();
-                    }
-                }
-
-                return null;
-            }
-        }, 8, "tx");
-
-        long opened = ((LongAdder)U.field(store, "opened")).sum();
-        long closed = ((LongAdder)U.field(store, "closed")).sum();
-
-        assert opened > 0;
-        assert closed > 0;
-
-        assertEquals(opened, closed);
-    }
-
-    /**
-     * @return New store.
-     * @throws Exception In case of error.
-     */
-    private GridCacheStore<Integer, String> store() throws Exception {
-        GridCacheStore<Integer, String> store = new GridCacheJdbcBlobStore<>();
-
-        Field f = store.getClass().getDeclaredField("testMode");
-
-        f.setAccessible(true);
-
-        f.set(store, true);
-
-        return store;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreSelfTest.java
deleted file mode 100644
index c294bfd..0000000
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/GridCacheJdbcBlobStoreSelfTest.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * 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.grid.cache.store.jdbc;
-
-import org.gridgain.testframework.junits.cache.*;
-
-import java.sql.*;
-
-/**
- * Cache store test.
- */
-public class GridCacheJdbcBlobStoreSelfTest
-    extends GridAbstractCacheStoreSelfTest<GridCacheJdbcBlobStore<Object, Object>> {
-    /**
-     * @throws Exception If failed.
-     */
-    public GridCacheJdbcBlobStoreSelfTest() throws Exception {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        super.afterTest();
-
-        try (Connection c = DriverManager.getConnection(GridCacheJdbcBlobStore.DFLT_CONN_URL, null, null)) {
-            try (Statement s = c.createStatement()) {
-                s.executeUpdate("drop table ENTRIES");
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected GridCacheJdbcBlobStore<Object, Object> store() {
-        return new GridCacheJdbcBlobStore<>();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/package.html b/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/package.html
deleted file mode 100644
index 1f85ff2..0000000
--- a/modules/core/src/test/java/org/gridgain/grid/cache/store/jdbc/package.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--
-  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.
-  -->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<body>
-    <!-- Package description. -->
-    Contains internal tests or test related classes and interfaces.
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
index 40265d8..ae6b538 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFlagsTest.java
@@ -17,9 +17,9 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -56,7 +56,7 @@ public abstract class GridCacheAbstractFlagsTest extends GridCacheAbstractSelfTe
     }
 
     /** {@inheritDoc} */
-    @Override protected GridCacheStore<?, ?> cacheStore() {
+    @Override protected CacheStore<?, ?> cacheStore() {
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
index d4008f7..2a07f73 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractSelfTest.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.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
@@ -27,7 +28,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.*;
 import org.gridgain.grid.util.lang.*;
 import org.gridgain.grid.util.typedef.*;
@@ -274,23 +274,23 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
     /**
      * @return Write through storage emulator.
      */
-    protected GridCacheStore<?, ?> cacheStore() {
-        return new GridCacheStoreAdapter<Object, Object>() {
+    protected CacheStore<?, ?> cacheStore() {
+        return new CacheStoreAdapter<Object, Object>() {
             @Override public void loadCache(IgniteBiInClosure<Object, Object> clo,
                 Object... args) {
                 for (Map.Entry<Object, Object> e : map.entrySet())
                     clo.apply(e.getKey(), e.getValue());
             }
 
-            @Override public Object load(IgniteTx tx, Object key) {
+            @Override public Object load(Object key) {
                 return map.get(key);
             }
 
-            @Override public void put(IgniteTx tx, Object key, @Nullable Object val) {
+            @Override public void put(Object key, @Nullable Object val) {
                 map.put(key, val);
             }
 
-            @Override public void remove(IgniteTx tx, Object key) {
+            @Override public void remove(Object 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/GridCacheBasicStoreAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreAbstractTest.java
index 7a075bf..7f619b9 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreAbstractTest.java
@@ -476,7 +476,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract
         }
 
         for (int i = 1; i <= 10; i++)
-            store.put(null, i, "reloaded-" + i);
+            store.put(i, "reloaded-" + i);
 
         cache.reloadAll(vals.keySet());
 
@@ -543,7 +543,7 @@ public abstract class GridCacheBasicStoreAbstractTest extends GridCommonAbstract
         }
 
         for (int i = 1; i <= 10; i++)
-            store.put(null, i, "reloaded-" + i);
+            store.put(i, "reloaded-" + i);
 
         store.resetLastMethod();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java
index e89cfc8..c6d932a 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheBasicStoreMultithreadedAbstractTest.java
@@ -17,10 +17,10 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 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.*;
@@ -36,7 +36,7 @@ import static org.gridgain.grid.cache.GridCacheWriteSynchronizationMode.*;
  */
 public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridCommonAbstractTest {
     /** Cache store. */
-    private GridCacheStore<Integer, Integer> store;
+    private CacheStore<Integer, Integer> store;
 
     /**
      *
@@ -89,18 +89,18 @@ public abstract class GridCacheBasicStoreMultithreadedAbstractTest extends GridC
     public void testConcurrentGet() throws Exception {
         final AtomicInteger cntr = new AtomicInteger();
 
-        store = new GridCacheStoreAdapter<Integer, Integer>() {
-            @Override public Integer load(@Nullable IgniteTx tx, Integer key) {
+        store = new CacheStoreAdapter<Integer, Integer>() {
+            @Override public Integer load(Integer key) {
                 return cntr.incrementAndGet();
             }
 
             /** {@inheritDoc} */
-            @Override public void put(IgniteTx tx, Integer key, @Nullable Integer val) {
+            @Override public void put(Integer key, @Nullable Integer val) {
                 assert false;
             }
 
             /** {@inheritDoc} */
-            @Override public void remove(IgniteTx tx, Integer key) {
+            @Override public void remove(Integer key) {
                 assert false;
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
index b1ffd17..0281403 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheConfigurationConsistencySelfTest.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.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
@@ -31,7 +32,6 @@ import org.gridgain.grid.cache.eviction.*;
 import org.gridgain.grid.cache.eviction.fifo.*;
 import org.gridgain.grid.cache.eviction.lru.*;
 import org.gridgain.grid.cache.eviction.random.*;
-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.*;
@@ -41,6 +41,8 @@ import org.gridgain.testframework.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.*;
 
@@ -991,51 +993,44 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
     }
 
     /** */
-    private static class TestStore implements GridCacheStore<Object,Object> {
+    private static class TestStore implements CacheStore<Object,Object> {
         /** {@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 loadCache(IgniteBiInClosure<Object, Object> clo,
-            @Nullable Object... args) throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, @Nullable Object... args) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void loadAll(@Nullable IgniteTx tx,
-            @Nullable Collection<?> keys, IgniteBiInClosure<Object, Object> c) throws IgniteCheckedException {
-            // No-op.
+        @Override public Map<Object, Object> loadAll(Iterable<?> keys) throws CacheLoaderException {
+            return Collections.emptyMap();
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key,
-            @Nullable Object val) throws IgniteCheckedException {
+        @Override public void write(Cache.Entry<?, ?> entry) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(@Nullable IgniteTx tx, @Nullable Map<?, ?> map)
-            throws IgniteCheckedException {
+        @Override public void writeAll(Collection<Cache.Entry<?, ?>> entries) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public void delete(Object key) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void removeAll(@Nullable IgniteTx tx,
-            @Nullable Collection<?> keys) throws IgniteCheckedException {
+        @Override public void deleteAll(Collection<?> keys) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+        @Override public void txEnd(boolean commit) {
             // 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/GridCacheGenericTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
index 7eb4987..a7bd958 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGenericTestStore.java
@@ -18,21 +18,26 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 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.store.*;
+import org.gridgain.grid.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
+import static javax.cache.Cache.*;
+
 /**
  * Test store.
  */
 @SuppressWarnings({"TypeParameterExtendsFinalClass"})
-public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
+public class GridCacheGenericTestStore<K, V> implements CacheStore<K, V> {
     /** Store. */
     private final Map<K, V> map = new ConcurrentHashMap<>();
 
@@ -42,16 +47,16 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
     /** */
     private long ts = System.currentTimeMillis();
 
-    /** {@link #put(IgniteTx, Object, Object)} method call counter .*/
+    /** {@link #write(Entry)} method call counter .*/
     private AtomicInteger putCnt = new AtomicInteger();
 
-    /** {@link #putAll(IgniteTx, Map)} method call counter .*/
+    /** {@link #writeAll(Collection)} method call counter .*/
     private AtomicInteger putAllCnt = new AtomicInteger();
 
-    /** {@link #remove(IgniteTx, Object)} method call counter. */
+    /** {@link #delete(Object)} method call counter. */
     private AtomicInteger rmvCnt = new AtomicInteger();
 
-    /** {@link #removeAll(IgniteTx, Collection)} method call counter. */
+    /** {@link #deleteAll(Collection)} method call counter. */
     private AtomicInteger rmvAllCnt = new AtomicInteger();
 
     /** Flag indicating if methods of this store should fail. */
@@ -141,35 +146,35 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
     }
 
     /**
-     * @return Count of {@link #put(IgniteTx, Object, Object)} method calls since last reset.
+     * @return Count of {@link #write(Entry)} method calls since last reset.
      */
     public int getPutCount() {
         return putCnt.get();
     }
 
     /**
-     * @return Count of {@link #putAll(IgniteTx, Map)} method calls since last reset.
+     * @return Count of {@link #writeAll(Collection)} method calls since last reset.
      */
     public int getPutAllCount() {
         return putAllCnt.get();
     }
 
     /**
-     * @return Number of {@link #remove(IgniteTx, Object)} method calls since last reset.
+     * @return Number of {@link #delete(Object)} method calls since last reset.
      */
     public int getRemoveCount() {
         return rmvCnt.get();
     }
 
     /**
-     * @return Number of {@link #removeAll(IgniteTx, Collection)} method calls since last reset.
+     * @return Number of {@link #deleteAll(Collection)} method calls since last reset.
      */
     public int getRemoveAllCount() {
         return rmvAllCnt.get();
     }
 
     /** {@inheritDoc} */
-    @Override public V load(IgniteTx tx, K key) throws IgniteCheckedException {
+    @Override public V load(K key) {
         lastMtd = "load";
 
         checkOperation();
@@ -178,54 +183,55 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public void loadCache(IgniteBiInClosure<K, V> clo, Object[] args)
-        throws IgniteCheckedException {
+    @Override public void loadCache(IgniteBiInClosure<K, V> clo, Object[] args) {
         lastMtd = "loadAllFull";
 
         checkOperation();
     }
 
     /** {@inheritDoc} */
-    @Override public void loadAll(IgniteTx tx, Collection<? extends K> keys,
-        IgniteBiInClosure<K, V> c) throws IgniteCheckedException {
+    @Override public Map<K, V> loadAll(Iterable<? extends K> keys) {
         lastMtd = "loadAll";
 
+        Map<K, V> loaded = new HashMap<>();
+
         for (K key : keys) {
             V val = map.get(key);
 
             if (val != null)
-                c.apply(key, val);
+                loaded.put(key, val);
         }
 
         checkOperation();
+
+        return loaded;
     }
 
     /** {@inheritDoc} */
-    @Override public void put(@Nullable IgniteTx tx, K key, V val)
-        throws IgniteCheckedException {
+    @Override public void write(Cache.Entry<? extends K, ? extends V> e) {
         lastMtd = "put";
 
         checkOperation();
 
-        map.put(key, val);
+        map.put(e.getKey(), e.getValue());
 
         putCnt.incrementAndGet();
     }
 
     /** {@inheritDoc} */
-    @Override public void putAll(IgniteTx tx, Map<? extends K, ? extends V> map)
-        throws IgniteCheckedException {
+    @Override public void writeAll(Collection<Cache.Entry<? extends K, ? extends V>> entries) {
         lastMtd = "putAll";
 
         checkOperation();
 
-        this.map.putAll(map);
+        for (Cache.Entry<? extends K, ? extends V> e : entries)
+            this.map.put(e.getKey(), e.getValue());
 
         putAllCnt.incrementAndGet();
     }
 
     /** {@inheritDoc} */
-    @Override public void remove(IgniteTx tx, K key) throws IgniteCheckedException {
+    @Override public void delete(Object key) {
         lastMtd = "remove";
 
         checkOperation();
@@ -236,34 +242,37 @@ public class GridCacheGenericTestStore<K, V> implements GridCacheStore<K, V> {
     }
 
     /** {@inheritDoc} */
-    @Override public void removeAll(IgniteTx tx, Collection<? extends K> keys)
-        throws IgniteCheckedException {
+    @Override public void deleteAll(Collection<?> keys) {
         lastMtd = "removeAll";
 
         checkOperation();
 
-        for (K key : keys)
+        for (Object key : keys)
             map.remove(key);
 
         rmvAllCnt.incrementAndGet();
     }
 
     /** {@inheritDoc} */
-    @Override public void txEnd(IgniteTx tx, boolean commit) {
+    @Override public void txEnd(boolean commit) {
         // No-op.
     }
 
     /**
      * Checks the flag and throws exception if it is set. Checks operation delay and sleeps
      * for specified amount of time, if needed.
-     *
-     * @throws IgniteCheckedException Always if flag is set.
      */
-    private void checkOperation() throws IgniteCheckedException {
+    private void checkOperation() {
         if (shouldFail)
-            throw new IgniteCheckedException("Store exception");
-
-        if (operationDelay > 0)
-            U.sleep(operationDelay);
+            throw new IgniteException("Store exception");
+
+        if (operationDelay > 0) {
+            try {
+                U.sleep(operationDelay);
+            }
+            catch(GridInterruptedException e) {
+                throw new IgniteException(e);
+            }
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
index c4a7471..51d782f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheGroupLockAbstractSelfTest.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.*;
@@ -25,7 +26,6 @@ import org.apache.ignite.spi.communication.tcp.*;
 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.apache.ignite.spi.discovery.tcp.*;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.*;
@@ -1247,7 +1247,7 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
     }
 
     /** Test store that accumulates values into map. */
-    private static class TestStore extends GridCacheStoreAdapter<Object, Object> {
+    private static class TestStore extends CacheStoreAdapter<Object, Object> {
         /** */
         private ConcurrentMap<Object, Object> storeMap = new ConcurrentHashMap8<>();
 
@@ -1255,30 +1255,26 @@ public abstract class GridCacheGroupLockAbstractSelfTest extends GridCommonAbstr
         private AtomicInteger putCnt = new AtomicInteger();
 
         /** {@inheritDoc} */
-        @Override public Object load(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public Object load(Object key) {
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(IgniteTx tx,
-            Map<?, ?> map) throws IgniteCheckedException {
+        @Override public void putAll(Map<?, ?> map) {
             storeMap.putAll(map);
 
             putCnt.incrementAndGet();
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key,
-            @Nullable Object val) throws IgniteCheckedException {
+        @Override public void put(Object key, @Nullable Object val) {
             storeMap.put(key, val);
 
             putCnt.incrementAndGet();
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key)
-            throws IgniteCheckedException {
+        @Override public void remove(Object key) {
             storeMap.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/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 0d11f58..bed5aa4 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheLifecycleAwareSelfTest.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.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
@@ -28,10 +29,11 @@ import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.affinity.*;
 import org.gridgain.grid.cache.cloner.*;
 import org.gridgain.grid.cache.eviction.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.testframework.junits.common.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 
 import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
@@ -52,7 +54,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
 
     /**
      */
-    private static class TestStore extends TestLifecycleAware implements GridCacheStore {
+    private static class TestStore extends TestLifecycleAware implements CacheStore {
         /**
          */
         TestStore() {
@@ -60,7 +62,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
         }
 
         /** {@inheritDoc} */
-        @Nullable @Override public Object load(@Nullable IgniteTx tx, Object key) {
+        @Nullable @Override public Object load(Object key) {
             return null;
         }
 
@@ -70,35 +72,32 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
         }
 
         /** {@inheritDoc} */
-        @Override public void loadAll(@Nullable IgniteTx tx, @Nullable Collection keys,
-            IgniteBiInClosure c) {
-            // No-op.
+        @Override public Map loadAll(Iterable keys) throws CacheLoaderException {
+            return Collections.emptyMap();
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key,
-            @Nullable Object val) {
+        @Override public void write(Cache.Entry entry) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(@Nullable IgniteTx tx, @Nullable Map map) {
+        @Override public void writeAll(Collection collection) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key) {
+        @Override public void delete(Object key) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void removeAll(@Nullable IgniteTx tx,
-            @Nullable Collection keys) {
+        @Override public void deleteAll(Collection keys) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void txEnd(IgniteTx tx, boolean commit) {
+        @Override public void txEnd(boolean commit) {
             // 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/GridCacheMultinodeUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
index c013558..e6f30c0 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheMultinodeUpdateAbstractSelfTest.java
@@ -18,8 +18,8 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.testframework.*;
 import org.jetbrains.annotations.*;
 
@@ -44,7 +44,7 @@ public abstract class GridCacheMultinodeUpdateAbstractSelfTest extends GridCache
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override protected GridCacheStore<?, ?> cacheStore() {
+    @Nullable @Override protected CacheStore<?, ?> cacheStore() {
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionedWritesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionedWritesTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionedWritesTest.java
index 4cc8672..7925e7c 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionedWritesTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCachePartitionedWritesTest.java
@@ -17,10 +17,10 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.configuration.*;
 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.*;
@@ -39,7 +39,7 @@ import static org.gridgain.grid.cache.GridCacheDistributionMode.*;
 @SuppressWarnings({"unchecked"})
 public class GridCachePartitionedWritesTest extends GridCommonAbstractTest {
     /** Cache store. */
-    private GridCacheStore store;
+    private CacheStore store;
 
     /** {@inheritDoc} */
     @Override protected final IgniteConfiguration getConfiguration(String gridName) throws Exception {
@@ -78,19 +78,18 @@ public class GridCachePartitionedWritesTest extends GridCommonAbstractTest {
         final AtomicInteger putCnt = new AtomicInteger();
         final AtomicInteger rmvCnt = new AtomicInteger();
 
-        store = new GridCacheStoreAdapter() {
-            @Override public Object load(@Nullable IgniteTx tx, Object key) {
+        store = new CacheStoreAdapter() {
+            @Override public Object load(Object key) {
                 info(">>> Get [key=" + key + ']');
 
                 return null;
             }
 
-            @Override public void put(@Nullable IgniteTx tx, Object key,
-                @Nullable Object val) {
+            @Override public void put(Object key, @Nullable Object val) {
                 putCnt.incrementAndGet();
             }
 
-            @Override public void remove(@Nullable IgniteTx tx, Object key) {
+            @Override public void remove(Object key) {
                 rmvCnt.incrementAndGet();
             }
         };

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReloadSelfTest.java
index 437d4ba..49810af 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheReloadSelfTest.java
@@ -18,11 +18,11 @@
 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.transactions.*;
 import org.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.eviction.lru.*;
-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.*;
@@ -79,17 +79,16 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
         cacheCfg.setCacheMode(cacheMode);
         cacheCfg.setEvictionPolicy(new GridCacheLruEvictionPolicy(MAX_CACHE_ENTRIES));
         cacheCfg.setDistributionMode(nearEnabled ? NEAR_PARTITIONED : PARTITIONED_ONLY);
-        cacheCfg.setStore(new GridCacheStoreAdapter<Integer, Integer>() {
-            @Override public Integer load(@Nullable IgniteTx tx, Integer key) {
+        cacheCfg.setStore(new CacheStoreAdapter<Integer, Integer>() {
+            @Override public Integer load(Integer key) {
                 return key;
             }
 
-            @Override public void put(@Nullable IgniteTx tx, Integer key,
-                @Nullable Integer val) {
+            @Override public void put(Integer key, @Nullable Integer val) {
                 //No-op.
             }
 
-            @Override public void remove(@Nullable IgniteTx tx, Integer key) {
+            @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/GridCacheStorePutxSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
index e5edfad..b9c046b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheStorePutxSelfTest.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.*;
@@ -25,10 +26,11 @@ 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.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.atomic.*;
 
@@ -108,52 +110,46 @@ public class GridCacheStorePutxSelfTest extends GridCommonAbstractTest {
     }
 
     /** */
-    private static class TestStore implements GridCacheStore<Integer, Integer> {
+    private static class TestStore implements CacheStore<Integer, Integer> {
         /** {@inheritDoc} */
-        @Nullable @Override public Integer load(@Nullable IgniteTx tx, Integer key) throws IgniteCheckedException {
+        @Nullable @Override public Integer load(Integer key) {
             loads.incrementAndGet();
 
             return null;
         }
 
         /** {@inheritDoc} */
-        @Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo, @Nullable Object... args)
-            throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Integer, Integer> clo, @Nullable Object... args) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void loadAll(@Nullable IgniteTx tx, Collection<? extends Integer> keys,
-            IgniteBiInClosure<Integer, Integer> c) throws IgniteCheckedException {
-            // No-op.
+        @Override public Map<Integer, Integer> loadAll(Iterable<? extends Integer> keys) {
+            return Collections.emptyMap();
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Integer key,
-            @Nullable Integer val) throws IgniteCheckedException {
+        @Override public void write(Cache.Entry<? extends Integer, ? extends Integer> entry) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(@Nullable IgniteTx tx,
-            Map<? extends Integer, ? extends Integer> map) throws IgniteCheckedException {
+        @Override public void writeAll(Collection<Cache.Entry<? extends Integer, ? extends Integer>> entries) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Integer key)
-            throws IgniteCheckedException {
+        @Override public void delete(Object key) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void removeAll(@Nullable IgniteTx tx, Collection<? extends Integer> keys)
-            throws IgniteCheckedException {
+        @Override public void deleteAll(Collection<?> keys) {
             // No-op.
         }
 
         /** {@inheritDoc} */
-        @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+        @Override public void txEnd(boolean commit) {
             // 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/GridCacheSwapReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
index 0ee61d6..2880d60 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheSwapReloadSelfTest.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.*;
@@ -28,7 +29,6 @@ import org.apache.ignite.spi.swapspace.*;
 import org.apache.ignite.spi.swapspace.file.*;
 import org.apache.ignite.transactions.*;
 import org.gridgain.grid.cache.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.grid.kernal.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
@@ -210,7 +210,7 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
     /**
      * 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<>();
 
@@ -220,19 +220,17 @@ public class GridCacheSwapReloadSelfTest extends GridCommonAbstractTest {
         }
 
         /** {@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, 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/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
index 1bcc0af..73f9f54 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestStore.java
@@ -18,14 +18,18 @@
 package org.gridgain.grid.kernal.processors.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.*;
 import org.gridgain.grid.kernal.processors.cache.transactions.*;
 import org.gridgain.grid.util.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
 
+import javax.cache.*;
+import javax.cache.integration.*;
 import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
@@ -33,7 +37,11 @@ import java.util.concurrent.atomic.*;
 /**
  * Test store.
  */
-public final class GridCacheTestStore implements GridCacheStore<Integer, String> {
+public final class GridCacheTestStore implements CacheStore<Integer, String> {
+    /** */
+    @IgniteCacheSessionResource
+    private CacheStoreSession ses;
+
     /** Store. */
     private final Map<Integer, String> map;
 
@@ -46,13 +54,13 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
     /** */
     private long ts = System.currentTimeMillis();
 
-    /** {@link #load(IgniteTx, Object)} method call counter .*/
+    /** {@link #load(Object)} method call counter .*/
     private AtomicInteger loadCnt = new AtomicInteger();
 
-    /** {@link #put(IgniteTx, Object, Object)} method call counter .*/
+    /** {@link #write(Cache.Entry)} method call counter .*/
     private AtomicInteger putCnt = new AtomicInteger();
 
-    /** {@link #putAll(IgniteTx, Map)} method call counter .*/
+    /** {@link #writeAll(Collection)} method call counter .*/
     private AtomicInteger putAllCnt = new AtomicInteger();
 
     /** Flag indicating if methods of this store should fail. */
@@ -164,29 +172,29 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
     }
 
     /**
-     * @return Count of {@link #load(IgniteTx, Object)} method calls since last reset.
+     * @return Count of {@link #load(Object)} method calls since last reset.
      */
     public int getLoadCount() {
         return loadCnt.get();
     }
 
     /**
-     * @return Count of {@link #put(IgniteTx, Object, Object)} method calls since last reset.
+     * @return Count of {@link #write(Cache.Entry)} method calls since last reset.
      */
     public int getPutCount() {
         return putCnt.get();
     }
 
     /**
-     * @return Count of {@link #putAll(IgniteTx, Map)} method calls since last reset.
+     * @return Count of {@link #writeAll(Collection)} method calls since last reset.
      */
     public int getPutAllCount() {
         return putAllCnt.get();
     }
 
     /** {@inheritDoc} */
-    @Override public String load(IgniteTx tx, Integer key) throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public String load(Integer key) {
+        checkTx(session());
 
         lastMtd = "load";
 
@@ -198,8 +206,7 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
     }
 
     /** {@inheritDoc} */
-    @Override public void loadCache(IgniteBiInClosure<Integer, String> clo, Object[] args)
-        throws IgniteCheckedException {
+    @Override public void loadCache(IgniteBiInClosure<Integer, String> clo, Object[] args) {
         lastMtd = "loadAllFull";
 
         checkOperation();
@@ -216,53 +223,57 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
     }
 
     /** {@inheritDoc} */
-    @Override public void loadAll(IgniteTx tx, Collection<? extends Integer> keys,
-        IgniteBiInClosure<Integer, String> c) throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public Map<Integer, String> loadAll(Iterable<? extends Integer> keys) {
+        checkTx(session());
 
         lastMtd = "loadAll";
 
         checkOperation();
 
+        Map<Integer, String> loaded = new HashMap<>();
+
         for (Integer key : keys) {
             String val = map.get(key);
 
             if (val != null)
-                c.apply(key, val);
+                loaded.put(key, val);
         }
+
+        return loaded;
     }
 
     /** {@inheritDoc} */
-    @Override public void put(@Nullable IgniteTx tx, Integer key, String val)
-        throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public void write(Cache.Entry<? extends Integer, ? extends String> e)
+        throws CacheWriterException {
+        checkTx(session());
 
         lastMtd = "put";
 
         checkOperation();
 
-        map.put(key, val);
+        map.put(e.getKey(), e.getValue());
 
         putCnt.incrementAndGet();
     }
 
     /** {@inheritDoc} */
-    @Override public void putAll(IgniteTx tx, Map<? extends Integer, ? extends String> map)
-        throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public void writeAll(Collection<Cache.Entry<? extends Integer, ? extends String>> entries)
+        throws CacheWriterException {
+        checkTx(session());
 
         lastMtd = "putAll";
 
         checkOperation();
 
-        this.map.putAll(map);
+        for (Cache.Entry<? extends Integer, ? extends String> e : entries)
+            this.map.put(e.getKey(), e.getValue());
 
         putAllCnt.incrementAndGet();
     }
 
     /** {@inheritDoc} */
-    @Override public void remove(IgniteTx tx, Integer key) throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public void delete(Object key) throws CacheWriterException {
+        checkTx(session());
 
         lastMtd = "remove";
 
@@ -272,42 +283,47 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
     }
 
     /** {@inheritDoc} */
-    @Override public void removeAll(IgniteTx tx, Collection<? extends Integer> keys)
-        throws IgniteCheckedException {
-        checkTx(tx);
+    @Override public void deleteAll(Collection<?> keys)
+        throws CacheWriterException {
+        checkTx(session());
 
         lastMtd = "removeAll";
 
         checkOperation();
 
-        for (Integer key : keys)
+        for (Object key : keys)
             map.remove(key);
     }
 
     /** {@inheritDoc} */
-    @Override public void txEnd(IgniteTx tx, boolean commit) {
+    @Override public void txEnd(boolean commit) {
         // No-op.
     }
 
     /**
      * Checks the flag and throws exception if it is set. Checks operation delay and sleeps
      * for specified amount of time, if needed.
-     *
-     * @throws IgniteCheckedException Always if flag is set.
      */
-    private void checkOperation() throws IgniteCheckedException {
+    private void checkOperation() {
         if (shouldFail)
-            throw new IgniteCheckedException("Store exception.");
-
-        if (operationDelay > 0)
-            U.sleep(operationDelay);
+            throw new IgniteException("Store exception.");
+
+        if (operationDelay > 0) {
+            try {
+                U.sleep(operationDelay);
+            }
+            catch (GridInterruptedException e) {
+                throw new IgniteException(e);
+            }
+        }
     }
 
     /**
-     * @param tx Checks transaction.
-     * @throws IgniteCheckedException If transaction is incorrect.
+     * @param ses Session.
      */
-    private void checkTx(IgniteTx tx) throws IgniteCheckedException {
+    private void checkTx(@Nullable CacheStoreSession ses) {
+        IgniteTx tx = ses != null ? ses.transaction() : null;
+
         if (tx == null)
             return;
 
@@ -316,9 +332,16 @@ public final class GridCacheTestStore implements GridCacheStore<Integer, String>
         IgniteTxEx tx0 = (IgniteTxEx)tx;
 
         if (!tx0.local())
-            throw new IgniteCheckedException("Tx is not local: " + tx);
+            throw new IgniteException("Tx is not local: " + tx);
 
         if (tx0.dht())
-            throw new IgniteCheckedException("Tx is DHT: " + tx);
+            throw new IgniteException("Tx is DHT: " + tx);
+    }
+
+    /**
+     * @return Current session.
+     */
+    @Nullable private CacheStoreSession session() {
+        return ses;
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
index 9a6d490..c67048f 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreAbstractSelfTest.java
@@ -17,7 +17,6 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
-import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.gridgain.testframework.junits.common.*;
@@ -127,7 +126,7 @@ public abstract class GridCacheWriteBehindStoreAbstractSelfTest extends GridComm
 
                         switch (op) {
                             case 0:
-                                store.put(null, key, "val" + key);
+                                store.put(key, "val" + key);
                                 set.add(key);
 
                                 operations.incrementAndGet();
@@ -135,7 +134,7 @@ public abstract class GridCacheWriteBehindStoreAbstractSelfTest extends GridComm
                                 break;
 
                             case 1:
-                                store.remove(null, key);
+                                store.remove(key);
                                 set.remove(key);
 
                                 operations.incrementAndGet();
@@ -144,13 +143,13 @@ public abstract class GridCacheWriteBehindStoreAbstractSelfTest extends GridComm
 
                             case 2:
                             default:
-                                store.put(null, key, "broken");
+                                store.put(key, "broken");
 
-                                String val = store.load(null, key);
+                                String val = store.load(key);
 
                                 assertEquals("Invalid intermediate value: " + val, "broken", val);
 
-                                store.put(null, key, "val" + key);
+                                store.put(key, "val" + key);
 
                                 set.add(key);
 
@@ -163,7 +162,7 @@ public abstract class GridCacheWriteBehindStoreAbstractSelfTest extends GridComm
                         }
                     }
                 }
-                catch (IgniteCheckedException e) {
+                catch (Exception e) {
                     error("Unexpected exception in put thread", e);
 
                     assert false;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
index 0dbcf6e..b3c8ce7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheWriteBehindStoreSelfTest.java
@@ -17,9 +17,7 @@
 
 package org.gridgain.grid.kernal.processors.cache;
 
-import org.apache.ignite.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.transactions.*;
 import org.gridgain.grid.util.typedef.*;
 import org.gridgain.grid.util.typedef.internal.*;
 import org.jdk8.backport.*;
@@ -47,8 +45,8 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
                     initStore(2);
 
                     try {
-                        store.put(null, 1, "val1");
-                        store.put(null, 2, "val2");
+                        store.put(1, "val1");
+                        store.put(2, "val2");
                     }
                     finally {
                         shutdownStore();
@@ -73,24 +71,18 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
         initStore(2);
 
         try {
-            IgniteTx tx = null;
+            store.put(1, "v1");
+            store.put(2, "v2");
 
-            store.put(tx, 1, "v1");
-            store.put(tx, 2, "v2");
+            assertEquals("v1", store.load(1));
+            assertEquals("v2", store.load(2));
+            assertNull(store.load(3));
 
-            store.txEnd(tx, true);
+            store.remove(1);
 
-            assertEquals("v1", store.load(null, 1));
-            assertEquals("v2", store.load(null, 2));
-            assertNull(store.load(null, 3));
-
-            store.remove(tx, 1);
-
-            store.txEnd(tx, true);
-
-            assertNull(store.load(null, 1));
-            assertEquals("v2", store.load(null, 2));
-            assertNull(store.load(null, 3));
+            assertNull(store.load(1));
+            assertEquals("v2", store.load(2));
+            assertNull(store.load(3));
         }
         finally {
             shutdownStore();
@@ -109,12 +101,12 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
 
         try {
             for (int i = 0; i < CACHE_SIZE * 2; i++)
-                store.put(null, i, "val" + i);
+                store.put(i, "val" + i);
 
             U.sleep(200);
 
             for (int i = 0; i < CACHE_SIZE; i++) {
-                String val = delegate.load(null, i);
+                String val = delegate.load(i);
 
                 assertNotNull("Value for [key= " + i + "] was not written in store", val);
                 assertEquals("Invalid value [key=" + i + "]", "val" + i, val);
@@ -123,7 +115,7 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
             U.sleep(FLUSH_FREQUENCY + 300);
 
             for (int i = CACHE_SIZE; i < CACHE_SIZE * 2; i++) {
-                String val = delegate.load(null, i);
+                String val = delegate.load(i);
 
                 assertNotNull("Value for [key= " + i + "] was not written in store", val);
                 assertEquals("Invalid value [key=" + i + "]", "val" + i, val);
@@ -153,17 +145,17 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
                     try {
                         while (running.get()) {
                             for (int i = 0; i < CACHE_SIZE; i++) {
-                                store.put(null, i, "val-0");
+                                store.put(i, "val-0");
 
                                 actualPutCnt.incrementAndGet();
 
-                                store.put(null, i, "val" + i);
+                                store.put(i, "val" + i);
 
                                 actualPutCnt.incrementAndGet();
                             }
                         }
                     }
-                    catch (IgniteCheckedException e) {
+                    catch (Exception e) {
                         error("Unexpected exception in put thread", e);
 
                         assert false;
@@ -213,13 +205,13 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
                     try {
                         while (running.get()) {
                             for (int i = 0; i < CACHE_SIZE; i++) {
-                                store.put(null, i, "val-0");
+                                store.put(i, "val-0");
 
-                                store.put(null, i, "val" + i);
+                                store.put(i, "val" + i);
                             }
                         }
                     }
-                    catch (IgniteCheckedException e) {
+                    catch (Exception e) {
                         error("Unexpected exception in put thread", e);
 
                         assert false;
@@ -259,7 +251,7 @@ public class GridCacheWriteBehindStoreSelfTest extends GridCacheWriteBehindStore
 
         try {
             for (int i = 0; i < CACHE_SIZE; i++) {
-                store.put(null, i, "val" + i);
+                store.put(i, "val" + i);
 
                 intList.add(i);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
index 5731a86..c1448d7 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/IgniteTxStoreExceptionAbstractSelfTest.java
@@ -18,18 +18,19 @@
 package org.gridgain.grid.kernal.processors.cache;
 
 import org.apache.ignite.*;
+import org.apache.ignite.cache.store.*;
 import org.apache.ignite.cluster.*;
 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.gridgain.grid.kernal.*;
 import org.gridgain.grid.kernal.processors.cache.distributed.near.*;
 import org.gridgain.testframework.*;
 import org.jetbrains.annotations.*;
 
 import javax.cache.*;
+import javax.cache.integration.*;
 import javax.cache.processor.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -591,7 +592,7 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb
     /**
      *
      */
-    private static class TestStore implements GridCacheStore<Object, Object> {
+    private static class TestStore implements CacheStore<Object, Object> {
         /** Fail flag. */
         private volatile boolean fail;
 
@@ -603,50 +604,49 @@ public abstract class IgniteTxStoreExceptionAbstractSelfTest extends GridCacheAb
         }
 
         /** {@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 loadCache(IgniteBiInClosure<Object, Object> clo, @Nullable Object... args)
-            throws IgniteCheckedException {
+        @Override public void loadCache(IgniteBiInClosure<Object, Object> clo, @Nullable Object... args) {
             if (fail)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheLoaderException("Store exception");
         }
 
         /** {@inheritDoc} */
-        @Override public void loadAll(@Nullable IgniteTx tx, Collection<?> keys, IgniteBiInClosure<Object, Object> c)
-            throws IgniteCheckedException {
+        @Override public Map<Object, Object> loadAll(Iterable<?> keys) throws CacheLoaderException {
+            return Collections.emptyMap();
         }
 
         /** {@inheritDoc} */
-        @Override public void put(@Nullable IgniteTx tx, Object key, Object val) throws IgniteCheckedException {
+        @Override public void write(Cache.Entry<?, ?> entry) {
             if (fail)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheWriterException("Store exception");
         }
 
         /** {@inheritDoc} */
-        @Override public void putAll(@Nullable IgniteTx tx, Map<?, ?> map) throws IgniteCheckedException {
+        @Override public void writeAll(Collection<Cache.Entry<?, ?>> entries) {
             if (fail)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheWriterException("Store exception");
         }
 
         /** {@inheritDoc} */
-        @Override public void remove(@Nullable IgniteTx tx, Object key) throws IgniteCheckedException {
+        @Override public void delete(Object key) throws CacheWriterException {
             if (fail)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheWriterException("Store exception");
         }
 
         /** {@inheritDoc} */
-        @Override public void removeAll(@Nullable IgniteTx tx, Collection<?> keys) throws IgniteCheckedException {
+        @Override public void deleteAll(Collection<?> keys) throws CacheWriterException {
             if (fail)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheWriterException("Store exception");
         }
 
         /** {@inheritDoc} */
-        @Override public void txEnd(IgniteTx tx, boolean commit) throws IgniteCheckedException {
+        @Override public void txEnd(boolean commit) {
             if (fail && commit)
-                throw new IgniteCheckedException("Store exception");
+                throw new CacheWriterException("Store exception");
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4b8ec5f2/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
index 76405cd..aa8809b 100644
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/datastructures/GridCacheAtomicReferenceApiSelfAbstractTest.java
@@ -18,13 +18,13 @@
 package org.gridgain.grid.kernal.processors.cache.datastructures;
 
 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.gridgain.grid.cache.*;
 import org.gridgain.grid.cache.datastructures.*;
-import org.gridgain.grid.cache.store.*;
 import org.gridgain.testframework.junits.common.*;
 import org.mockito.*;
 
@@ -74,7 +74,7 @@ public abstract class GridCacheAtomicReferenceApiSelfAbstractTest extends GridCo
         ccfg.setAtomicityMode(TRANSACTIONAL);
         ccfg.setDistributionMode(NEAR_PARTITIONED);
 
-        ccfg.setStore(Mockito.mock(GridCacheStore.class));
+        ccfg.setStore(Mockito.mock(CacheStore.class));
 
         return ccfg;
     }


Mime
View raw message