You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2017/04/12 07:33:32 UTC

[01/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Repository: ignite
Updated Branches:
  refs/heads/ignite-3477-debug a0b6940c7 -> 0ff3e9a8d


http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-base-load-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-load-config.xml b/modules/yardstick/config/ignite-base-load-config.xml
index dfa3304..cd9eb06 100644
--- a/modules/yardstick/config/ignite-base-load-config.xml
+++ b/modules/yardstick/config/ignite-base-load-config.xml
@@ -48,27 +48,6 @@
         <property name="atomicityMode" value="ATOMIC"/>
     </bean>
 
-    <bean name="atomic-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
-        <property name="name" value="atomic-offheap"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="ATOMIC"/>
-
-        <property name="memoryMode" value="OFFHEAP_TIERED"/>
-    </bean>
-
-    <bean name="atomic-offheap-values" class="org.apache.ignite.configuration.CacheConfiguration">
-        <property name="name" value="atomic-offheap-values"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="ATOMIC"/>
-
-        <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
-    </bean>
-
     <bean name="tx" class="org.apache.ignite.configuration.CacheConfiguration">
         <property name="name" value="tx-fat-values"/>
 
@@ -78,28 +57,6 @@
 
     </bean>
 
-    <bean name="tx-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
-        <property name="name" value="tx-offheap"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="TRANSACTIONAL"/>
-
-        <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
-    </bean>
-
-    <bean name="tx-offheap-values" class="org.apache.ignite.configuration.CacheConfiguration">
-        <property name="name" value="tx-offheap-values"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="TRANSACTIONAL"/>
-
-        <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
-    </bean>
-
     <bean name="atomic-index" class="org.apache.ignite.configuration.CacheConfiguration">
         <property name="name" value="atomic-index"/>
 
@@ -197,26 +154,6 @@
         </property>
     </bean>
 
-    <bean name="query-offheap" class="org.apache.ignite.configuration.CacheConfiguration">
-        <property name="name" value="query-offheap"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="ATOMIC"/>
-
-        <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
-        <property name="indexedTypes">
-            <list>
-                <value>java.lang.Integer</value>
-                <value>org.apache.ignite.yardstick.cache.model.Organization</value>
-
-                <value>java.lang.Integer</value>
-                <value>org.apache.ignite.yardstick.cache.model.Person</value>
-            </list>
-        </property>
-    </bean>
-
     <bean name="compute" class="org.apache.ignite.configuration.CacheConfiguration">
         <property name="name" value="compute"/>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-cache-load-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-cache-load-config.xml b/modules/yardstick/config/ignite-cache-load-config.xml
index 6c6ac89..f58237f 100644
--- a/modules/yardstick/config/ignite-cache-load-config.xml
+++ b/modules/yardstick/config/ignite-cache-load-config.xml
@@ -32,15 +32,10 @@
         <property name="cacheConfiguration">
             <list>
                 <ref bean="atomic" />
-                <ref bean="atomic-offheap" />
-                <ref bean="atomic-offheap-values" />
                 <ref bean="tx" />
-                <ref bean="tx-offheap" />
-                <ref bean="tx-offheap-values" />
                 <ref bean="atomic-index" />
                 <ref bean="query" />
                 <ref bean="orgCache" />
-                <!--<ref bean="query-offheap" />-->
                 <ref bean="compute" />
             </list>
         </property>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-failover-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-failover-base-config.xml b/modules/yardstick/config/ignite-failover-base-config.xml
index 0a3bd88..8de4142 100644
--- a/modules/yardstick/config/ignite-failover-base-config.xml
+++ b/modules/yardstick/config/ignite-failover-base-config.xml
@@ -37,41 +37,21 @@
                     <property name="name" value="atomic-reties"/>
                 </bean>
 
-                <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic-offheap">
-                    <property name="name" value="atomic-offheap-reties"/>
-                </bean>
-
                 <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic">
                     <property name="name" value="atomic-invoke-retry"/>
                 </bean>
 
-                <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="atomic-offheap">
-                    <property name="name" value="atomic-offheap-invoke-retry"/>
-                </bean>
-
                 <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
                     <property name="name" value="tx-invoke-retry"/>
                 </bean>
 
-                <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
-                    <property name="name" value="tx-offheap-invoke-retry"/>
-                </bean>
-
                 <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
                     <property name="name" value="tx-write-read"/>
                 </bean>
 
-                <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
-                    <property name="name" value="tx-offheap-write-read"/>
-                </bean>
-
                 <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx">
                     <property name="name" value="tx-write-invoke"/>
                 </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration" parent="tx-offheap">
-                    <property name="name" value="tx-offheap-write-invoke"/>
-                </bean>
             </list>
         </property>
 
@@ -92,16 +72,6 @@
         <property name="atomicityMode" value="ATOMIC"/>
     </bean>
 
-    <bean id="atomic-offheap" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
-        <property name="name" value="atomic-offheap"/>
-
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="ATOMIC"/>
-
-        <property name="memoryMode" value="OFFHEAP_TIERED"/>
-    </bean>
-
     <bean id="tx" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
         <property name="cacheMode" value="PARTITIONED"/>
 
@@ -110,11 +80,4 @@
         <property name="swapEnabled" value="false"/>
     </bean>
 
-    <bean id="tx-offheap" class="org.apache.ignite.configuration.CacheConfiguration" abstract="true">
-        <property name="cacheMode" value="PARTITIONED"/>
-
-        <property name="atomicityMode" value="TRANSACTIONAL"/>
-
-        <property name="memoryMode" value="OFFHEAP_TIERED"/>
-    </bean>
 </beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-int-max-values-offheap-config.xml b/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
deleted file mode 100644
index 353744e..0000000
--- a/modules/yardstick/config/ignite-int-max-values-offheap-config.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!--
-    Ignite Spring configuration file.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <property name="peerClassLoadingEnabled" value="true"/>
-
-        <property name="marshaller">
-            <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
-                <property name="requireSerializable" value="false"/>
-            </bean>
-        </property>
-
-<!--
-        <property name="marshaller">
-            <bean class="org.apache.ignite.internal.binary.BinaryMarshaller"/>
-        </property>
--->
-
-        <property name="networkTimeout" value="600000"/>
-
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="networkTimeout" value="600000"/>
-
-                <property name="socketTimeout" value="600000"/>
-
-                <property name="ackTimeout" value="60000"/>
-
-                <property name="ipFinder">
-                    <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> -->
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-                        <!--
-                                                <property name="addresses">
-                                                    <list>
-                                                        &lt;!&ndash; In distributed environment, replace with actual host IP address. &ndash;&gt;
-                                                        <value>127.0.0.1:47500..47509</value>
-                                                    </list>
-                                                </property>
-                        -->
-                    </bean>
-                </property>
-            </bean>
-        </property>
-
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="int-max-value-cache"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="backups" value="0"/>
-                    <property name="atomicityMode" value="ATOMIC"/>
-                    <property name="memoryMode" value="ONHEAP_TIERED"/>
-                    <property name="offHeapMaxMemory" value="#{32 * 1024 * 1024 * 1024L}"/>
-                    <property name="evictionPolicy">
-                        <bean class="org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy">
-                            <property name="maxSize" value="4000000"/>
-                            <property name="batchSize" value="500000"/>
-                        </bean>
-                    </property>
-                </bean>
-            </list>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-int-max-values-swap-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-int-max-values-swap-config.xml b/modules/yardstick/config/ignite-int-max-values-swap-config.xml
deleted file mode 100644
index edb15d3..0000000
--- a/modules/yardstick/config/ignite-int-max-values-swap-config.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  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.
--->
-
-<!--
-    Ignite Spring configuration file.
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <property name="peerClassLoadingEnabled" value="true"/>
-
-        <property name="marshaller">
-            <bean class="org.apache.ignite.marshaller.optimized.OptimizedMarshaller">
-                <property name="requireSerializable" value="false"/>
-            </bean>
-        </property>
-
-<!--
-        <property name="marshaller">
-            <bean class="org.apache.ignite.internal.binary.BinaryMarshaller"/>
-        </property>
--->
-
-        <property name="networkTimeout" value="600000"/>
-
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="networkTimeout" value="600000"/>
-
-                <property name="socketTimeout" value="600000"/>
-
-                <property name="ackTimeout" value="60000"/>
-
-                <property name="ipFinder">
-                    <!-- <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder"> -->
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-                        <!--
-                                                <property name="addresses">
-                                                    <list>
-                                                        &lt;!&ndash; In distributed environment, replace with actual host IP address. &ndash;&gt;
-                                                        <value>127.0.0.1:47500..47509</value>
-                                                    </list>
-                                                </property>
-                        -->
-                    </bean>
-                </property>
-            </bean>
-        </property>
-
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="int-max-value-cache"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="backups" value="0"/>
-                    <property name="atomicityMode" value="ATOMIC"/>
-                    <property name="memoryMode" value="ONHEAP_TIERED"/>
-                    <property name="offHeapMaxMemory" value="#{32 * 1024 * 1024 * 1024L}"/>
-                    <property name="swapEnabled" value="true"/>
-                    <property name="evictionPolicy">
-                        <bean class="org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy">
-                            <property name="maxSize" value="4000000"/>
-                            <property name="batchSize" value="500000"/>
-                        </bean>
-                    </property>
-                </bean>
-            </list>
-        </property>
-
-        <property name="swapSpaceSpi">
-            <bean class="org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi"/>
-        </property>
-    </bean>
-</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/test-max-int-values-offheap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-offheap.properties b/modules/yardstick/config/test-max-int-values-offheap.properties
deleted file mode 100644
index 4a42538..0000000
--- a/modules/yardstick/config/test-max-int-values-offheap.properties
+++ /dev/null
@@ -1,65 +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.
-
-#
-# Contains benchmarks for SQL queries.
-#
-
-# JVM options.
-# JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
-
-# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
-JVM_OPTS=${JVM_OPTS}" \
--Xms8g \
--Xmx8g \
--Xloggc:./gc${now0}.log \
--XX:+PrintGCDetails \
--verbose:gc \
--XX:+UseParNewGC \
--XX:+UseConcMarkSweepGC \
-"
-
-#Ignite version
-ver="RELEASE-"
-
-# List of default probes.
-# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-# BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
-
-# Packages where the specified benchmark is searched by reflection mechanism.
-BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
-
-# Probe point writer class name.
-# BENCHMARK_WRITER=
-
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
-SERVER_HOSTS=fosters-215,fosters-216,fosters-217,fosters-226,fosters-219,fosters-221,fosters-222,fosters-223
-
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
-DRIVER_HOSTS=fosters-218
-
-# Remote username.
-# REMOTE_USER=
-
-# Number of nodes, used to wait for the specified number of nodes to start.
-nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
-
-# Run configuration.
-# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
-CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-offheap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-offheap\
-"
-
-

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/test-max-int-values-swap.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/test-max-int-values-swap.properties b/modules/yardstick/config/test-max-int-values-swap.properties
deleted file mode 100644
index be0aed4..0000000
--- a/modules/yardstick/config/test-max-int-values-swap.properties
+++ /dev/null
@@ -1,64 +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.
-
-#
-# Contains benchmarks for SQL queries.
-#
-
-# JVM options.
-# JVM_OPTS=${JVM_OPTS}" -DIGNITE_QUIET=false"
-
-# Uncomment to enable concurrent garbage collection (GC) if you encounter long GC pauses.
-JVM_OPTS=${JVM_OPTS}" \
--Xms8g \
--Xmx8g \
--Xloggc:./gc${now0}.log \
--XX:+PrintGCDetails \
--verbose:gc \
--XX:+UseParNewGC \
--XX:+UseConcMarkSweepGC \
-"
-
-#Ignite version
-ver="RELEASE-"
-
-# List of default probes.
-# Add DStatProbe or VmStatProbe if your OS supports it (e.g. if running on Linux).
-# BENCHMARK_DEFAULT_PROBES=ThroughputLatencyProbe,PercentileProbe
-
-# Packages where the specified benchmark is searched by reflection mechanism.
-BENCHMARK_PACKAGES=org.yardstickframework,org.apache.ignite.yardstick
-
-# Probe point writer class name.
-# BENCHMARK_WRITER=
-
-# Comma-separated list of the hosts to run BenchmarkServers on. 2 nodes on local host are enabled by default.
-SERVER_HOSTS=fosters-215,fosters-216,fosters-217,fosters-226,fosters-219,fosters-221,fosters-222,fosters-223
-
-# Comma-separated list of the hosts to run BenchmarkDrivers on. 1 node on local host is enabled by default.
-DRIVER_HOSTS=fosters-218
-
-# Remote username.
-# REMOTE_USER=
-
-# Number of nodes, used to wait for the specified number of nodes to start.
-nodesNum=$((`echo ${SERVER_HOSTS} | tr ',' '\n' | wc -l` + `echo ${DRIVER_HOSTS} | tr ',' '\n' | wc -l`))
-
-# Run configuration.
-# Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
-CONFIGS="\
--cfg ${SCRIPT_DIR}/../config/ignite-int-max-values-swap-config.xml -nn ${nodesNum} -b 0 -w 0 -d 9999999 -t 1 -sm PRIMARY_SYNC -dn IntMaxValueEntriesTest -sn IgniteNode -ds ${ver}int-max-values-swap\
-"
-

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
index cef783e..e096caf 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteBenchmarkArguments.java
@@ -78,14 +78,6 @@ public class IgniteBenchmarkArguments {
     private TransactionIsolation txIsolation = TransactionIsolation.REPEATABLE_READ;
 
     /** */
-    @Parameter(names = {"-ot", "--offheapTiered"}, description = "Tiered offheap")
-    private boolean offheapTiered;
-
-    /** */
-    @Parameter(names = {"-ov", "--offheapValuesOnly"}, description = "Offheap values only")
-    private boolean offheapVals;
-
-    /** */
     @Parameter(names = {"-rtp", "--restPort"}, description = "REST TCP port")
     private int restTcpPort;
 
@@ -295,27 +287,6 @@ public class IgniteBenchmarkArguments {
     }
 
     /**
-     * @return Offheap tiered.
-     */
-    public boolean isOffheapTiered() {
-        return offheapTiered;
-    }
-
-    /**
-     * @return Offheap values.
-     */
-    public boolean isOffheapValues() {
-        return offheapVals;
-    }
-
-    /**
-     * @return {@code True} if any offheap is enabled.
-     */
-    public boolean isOffHeap() {
-        return offheapTiered || offheapVals;
-    }
-
-    /**
      * @return Nodes.
      */
     public int nodes() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
index b8f3a59..59b31f9 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/IgniteNode.java
@@ -43,7 +43,6 @@ import org.yardstickframework.BenchmarkConfiguration;
 import org.yardstickframework.BenchmarkServer;
 import org.yardstickframework.BenchmarkUtils;
 
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
 import static org.apache.ignite.internal.IgniteNodeAttributes.ATTR_MARSHALLER;
 
 /**
@@ -126,15 +125,6 @@ public class IgniteNode implements BenchmarkServer {
                     c.setConnectorConfiguration(ccc);
                 }
 
-                if (args.isOffHeap()) {
-                    cc.setOffHeapMaxMemory(0);
-
-                    if (args.isOffheapValues())
-                        cc.setMemoryMode(OFFHEAP_VALUES);
-                    else
-                        cc.setEvictionPolicy(new LruEvictionPolicy(50000));
-                }
-
                 cc.setReadThrough(args.isStoreEnabled());
 
                 cc.setWriteThrough(args.isStoreEnabled());

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
deleted file mode 100644
index 4e1d9d9..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs get operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgniteGetOffHeapBenchmark extends IgniteGetBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
deleted file mode 100644
index 4042abe..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteGetOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs get operations with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES}
- * memory mode.
- */
-public class IgniteGetOffHeapValuesBenchmark extends IgniteGetBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap-values");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
deleted file mode 100644
index 1074a49..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and get operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIRED}
- * memory mode.
- */
-public class IgnitePutGetOffHeapBenchmark extends IgnitePutGetBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
deleted file mode 100644
index 2ec457c..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutGetOffHeapValuesBenchmark extends IgnitePutGetBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap-values");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
deleted file mode 100644
index 3359a14..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgnitePutGetTxOffHeapBenchmark extends IgnitePutGetTxBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("tx-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
deleted file mode 100644
index b911051..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetTxOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put and get operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutGetTxOffHeapValuesBenchmark extends IgnitePutGetTxBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("tx-offheap-values");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
deleted file mode 100644
index 5271671..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgnitePutOffHeapBenchmark extends IgnitePutBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
deleted file mode 100644
index 8db4429..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put operations with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES}
- * memory mode.
- */
-public class IgnitePutOffHeapValuesBenchmark extends IgnitePutBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap-values");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
index be85b9f..180b50e 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutRandomValueSizeBenchmark.java
@@ -36,6 +36,6 @@ public class IgnitePutRandomValueSizeBenchmark extends IgniteCacheAbstractBenchm
 
     /** {@inheritDoc} */
     @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("atomic-offheap");
+        return ignite().cache("atomic");
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
deleted file mode 100644
index 03e6e42..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIRED} memory mode.
- */
-public class IgnitePutTxOffHeapBenchmark extends IgnitePutTxImplicitBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("tx-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
deleted file mode 100644
index 1cf04d7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutTxOffHeapValuesBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs transactional put operations
- * with {@link CacheMemoryMode#OFFHEAP_VALUES OFFHEAP VALUES} memory mode.
- */
-public class IgnitePutTxOffHeapValuesBenchmark extends IgnitePutTxImplicitBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("tx-offheap-values");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
deleted file mode 100644
index 3ea3d38..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryJoinOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs query operations with joins
- * and {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgniteSqlQueryJoinOffHeapBenchmark extends IgniteSqlQueryJoinBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("query-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
deleted file mode 100644
index 8ad10e7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs query operations with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED}
- * memory mode.
- */
-public class IgniteSqlQueryOffHeapBenchmark extends IgniteSqlQueryBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("query-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
deleted file mode 100644
index c820db7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteSqlQueryPutOffHeapBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Ignite benchmark that performs put and query operations
- * with {@link CacheMemoryMode#OFFHEAP_TIERED OFFHEAP TIERED} memory mode.
- */
-public class IgniteSqlQueryPutOffHeapBenchmark extends IgniteSqlQueryPutBenchmark {
-    /** {@inheritDoc} */
-    @Override protected IgniteCache<Integer, Object> cache() {
-        return ignite().cache("query-offheap");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
deleted file mode 100644
index c8b0b1d..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapInvokeRetryBenchmark.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.yardstick.cache.failover;
-
-/**
- * Invoke retry failover benchmark. <p> Each client maintains a local map that it updates together with cache. Client
- * invokes an increment closure for all generated keys and atomically increments value for corresponding keys in the
- * local map. To validate cache contents, all writes from the client are stopped, values in the local map are compared
- * to the values in the cache.
- */
-public class IgniteAtomicOffHeapInvokeRetryBenchmark extends IgniteAtomicInvokeRetryBenchmark {
-    /** {@inheritDoc} */
-    @Override protected String cacheName() {
-        return "atomic-offheap-invoke-retry";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
deleted file mode 100644
index ebb9eac..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteAtomicOffHeapRetriesBenchmark.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.yardstick.cache.failover;
-
-/**
- * Atomic retries failover benchmark.
- * <p>
- * Client generates continuous load to the cluster (random get, put, invoke, remove
- * operations).
- */
-public class IgniteAtomicOffHeapRetriesBenchmark extends IgniteAtomicRetriesBenchmark {
-    /** {@inheritDoc} */
-    @Override protected String cacheName() {
-        return "atomic-offheap-reties";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
deleted file mode 100644
index 4cbcf67..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapInvokeRetryBenchmark.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.yardstick.cache.failover;
-
-/**
- * Invoke retry failover benchmark.
- * <p>
- * Each client maintains a local map that it updates together with cache.
- * Client invokes an increment closure for all generated keys and atomically increments value for corresponding
- * keys in the local map. To validate cache contents, all writes from the client are stopped, values in
- * the local map are compared to the values in the cache.
- */
-public class IgniteTransactionalOffHeapInvokeRetryBenchmark extends IgniteTransactionalInvokeRetryBenchmark {
-    /** {@inheritDoc} */
-    @Override protected String cacheName() {
-        return "tx-offheap-invoke-retry";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
deleted file mode 100644
index 7fa2d1a..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteInvokeBenchmark.java
+++ /dev/null
@@ -1,37 +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.apache.ignite.yardstick.cache.failover;
-
-/**
- * Transactional write invoke failover benchmark.
- * <p>
- * Each client generates a random integer K in a limited range and creates keys in the form 'key-' + K + 'master',
- * 'key-' + K + '-1', 'key-' + K + '-2', ... Then client starts a pessimistic repeatable read transaction
- * and randomly chooses between read and write scenarios:
- * <ul>
- * <li>Reads value associated with the master key and child keys. Values must be equal.</li>
- * <li>Reads value associated with the master key, increments it by 1 and puts the value, then invokes increment
- * closure on child keys. No validation is performed.</li>
- * </ul>
- */
-public class IgniteTransactionalOffHeapWriteInvokeBenchmark extends IgniteTransactionalWriteInvokeBenchmark {
-    /** {@inheritDoc} */
-    @Override protected String cacheName() {
-        return "tx-offheap-write-invoke";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
deleted file mode 100644
index bdecca7..0000000
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/failover/IgniteTransactionalOffHeapWriteReadBenchmark.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.yardstick.cache.failover;
-
-/**
- * Transactional write read failover benchmark.
- * <p>
- * Each client generates a random integer K in a limited range and creates keys in the form 'key-' + K + '-1',
- * 'key-' + K + '-2', ... Then client starts a pessimistic repeatable read transaction, reads value associated with
- * each key. Values must be equal. Client increments value by 1, commits the transaction.
- */
-public class IgniteTransactionalOffHeapWriteReadBenchmark extends IgniteTransactionalWriteReadBenchmark {
-    /** {@inheritDoc} */
-    @Override protected String cacheName() {
-        return "tx-offheap-write-read";
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
index 437d309..4010f5e 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/load/IgniteCacheRandomOperationBenchmark.java
@@ -47,7 +47,6 @@ import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -253,12 +252,6 @@ public class IgniteCacheRandomOperationBenchmark extends IgniteAbstractBenchmark
             CacheConfiguration configuration = cache.getConfiguration(CacheConfiguration.class);
 
             if (isClassDefinedInConfig(configuration)) {
-                if (configuration.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED &&
-                    configuration.getQueryEntities().size() > 2) {
-                    throw new IgniteException("Off-heap mode is unsupported by the load test due to bugs IGNITE-2982" +
-                        " and IGNITE-2997");
-                }
-
                 ArrayList<Class> keys = new ArrayList<>();
                 ArrayList<Class> values = new ArrayList<>();
 


[45/57] [abbrv] ignite git commit: ignite-3477 : Fixed endless partsToEvict queue.

Posted by ag...@apache.org.
ignite-3477 : Fixed endless partsToEvict queue.


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

Branch: refs/heads/ignite-3477-debug
Commit: 5e5ffe690292a22d7cdffc272e858d7e0d9acc2e
Parents: 7eb1234
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Tue Apr 11 15:32:31 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Tue Apr 11 15:32:31 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLocalPartition.java  | 14 ++++++++------
 .../distributed/dht/preloader/GridDhtPreloader.java   |  4 ++--
 2 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5e5ffe69/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index dbd1948..44fd905 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -217,6 +217,13 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
     }
 
     /**
+     * @return {@code True} if partition is marked for transfer to renting state.
+     */
+    public boolean shouldBeRenting() {
+        return shouldBeRenting;
+    }
+
+    /**
      * @return Reservations.
      */
     public int reservations() {
@@ -458,12 +465,7 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
                 if (reservations == 0 && shouldBeRenting)
                     rent(true);
 
-                try {
-                    tryEvict();
-                }
-                catch (NodeStoppingException ignore) {
-                    // Node is stopping.
-                }
+                tryEvictAsync(false);
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/5e5ffe69/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index 9af2388..c033b93 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -72,7 +72,7 @@ import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
 import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
 import static org.apache.ignite.internal.managers.communication.GridIoPolicy.AFFINITY_POOL;
 import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING;
-import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.EVICTED;
+import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.RENTING;
 import static org.apache.ignite.internal.util.GridConcurrentFactory.newMap;
 
 /**
@@ -790,7 +790,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
                                 try {
                                     part.tryEvict();
 
-                                    if (part.state() != EVICTED)
+                                    if (part.state() == RENTING || part.shouldBeRenting())
                                         partsToEvict.push(part);
                                 }
                                 catch (Throwable ex) {


[05/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
index 172ca56..6d8b4e4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryRandomOperationsTest.java
@@ -49,7 +49,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.query.CacheQueryEntryEvent;
@@ -80,9 +79,6 @@ import static javax.cache.event.EventType.REMOVED;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -152,7 +148,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         final CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         grid(0).createCache(ccfg);
@@ -197,7 +192,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -210,7 +204,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -223,7 +216,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, ALL);
@@ -236,7 +228,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -249,7 +240,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, ALL);
@@ -262,85 +252,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, CLIENT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, SERVER);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesAllNodes() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, ALL);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesClient() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, CLIENT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, SERVER);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTieredAllNodes() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, ALL);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTieredClient() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -353,7 +264,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -366,7 +276,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, ALL);
@@ -379,7 +288,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -392,7 +300,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -405,7 +312,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, ALL);
@@ -418,7 +324,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -431,7 +336,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -444,7 +348,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -457,7 +360,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -470,33 +372,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
-            true);
-
-        doTestNotModifyOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testDoubleRemoveAtomicOffheap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            0,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestNotModifyOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testDoubleRemoveAtomicOffheapWithStore() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            0,
-            ATOMIC,
-            OFFHEAP_TIERED,
             true);
 
         doTestNotModifyOperation(ccfg);
@@ -509,7 +384,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -522,7 +396,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -535,7 +408,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -548,7 +420,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -561,7 +432,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestNotModifyOperation(ccfg);
@@ -574,7 +444,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             true);
 
         doTestNotModifyOperation(ccfg);
@@ -856,7 +725,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -869,7 +737,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -882,7 +749,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -895,111 +761,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, CLIENT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, SERVER);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValuesAllNodes() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, ALL);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValuesExplicit() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, SERVER);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValuesClient() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestContinuousQuery(ccfg, CLIENT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, SERVER);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTieredAllNodes() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, ALL);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTieredClient() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestContinuousQuery(ccfg, CLIENT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTieredClientExplicit() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -1012,7 +773,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -1025,7 +785,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, ALL);
@@ -1038,7 +797,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, SERVER);
@@ -1051,7 +809,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestContinuousQuery(ccfg, CLIENT);
@@ -1633,7 +1390,6 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param store If {@code true} configures dummy cache store.
      * @return Cache configuration.
      */
@@ -1641,14 +1397,12 @@ public class CacheContinuousQueryRandomOperationsTest extends GridCommonAbstract
         CacheMode cacheMode,
         int backups,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         boolean store) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setName("cache-" + UUID.randomUUID()); // TODO GG-11220 (remove setName when fixed).
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
index 02d72b8..9eb56dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationNearEnabledTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.query.continuous;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
@@ -31,10 +30,9 @@ public class CacheKeepBinaryIterationNearEnabledTest extends CacheKeepBinaryIter
     @Override protected CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg =
-            super.cacheConfiguration(cacheMode, backups, atomicityMode, memoryMode);
+            super.cacheConfiguration(cacheMode, backups, atomicityMode);
 
         ccfg.setNearConfiguration(new NearCacheConfiguration<>());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
index f345611..f98229d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationStoreEnabledTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.query.continuous;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -37,10 +36,9 @@ public class CacheKeepBinaryIterationStoreEnabledTest extends CacheKeepBinaryIte
     @Override protected CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg =
-            super.cacheConfiguration(cacheMode, backups, atomicityMode, memoryMode);
+            super.cacheConfiguration(cacheMode, backups, atomicityMode);
 
         ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
index 72667f6..46df90d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheKeepBinaryIterationTest.java
@@ -22,7 +22,6 @@ import javax.cache.Cache;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.query.QueryCursor;
@@ -42,8 +41,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -92,27 +89,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAtomicOnHeap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            ONHEAP_TIERED
-        );
-
-        doTestScanQuery(ccfg, true, true);
-        doTestScanQuery(ccfg, true, false);
-        doTestScanQuery(ccfg, false, true);
-        doTestScanQuery(ccfg, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffHeap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED
-        );
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
 
         doTestScanQuery(ccfg, true, true);
         doTestScanQuery(ccfg, true, false);
@@ -124,27 +101,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxOnHeap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
-        );
-
-        doTestScanQuery(ccfg, true, true);
-        doTestScanQuery(ccfg, true, false);
-        doTestScanQuery(ccfg, false, true);
-        doTestScanQuery(ccfg, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffHeap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED
-        );
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,1, TRANSACTIONAL);
 
         doTestScanQuery(ccfg, true, true);
         doTestScanQuery(ccfg, true, false);
@@ -156,27 +113,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAtomicOnHeapLocalEntries() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            ONHEAP_TIERED
-        );
-
-        doTestLocalEntries(ccfg, true, true);
-        doTestLocalEntries(ccfg, true, false);
-        doTestLocalEntries(ccfg, false, true);
-        doTestLocalEntries(ccfg, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffHeapLocalEntries() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED
-        );
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
 
         doTestLocalEntries(ccfg, true, true);
         doTestLocalEntries(ccfg, true, false);
@@ -188,27 +125,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxOnHeapLocalEntries() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
-        );
-
-        doTestLocalEntries(ccfg, true, true);
-        doTestLocalEntries(ccfg, true, false);
-        doTestLocalEntries(ccfg, false, true);
-        doTestLocalEntries(ccfg, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffHeapLocalEntries() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED
-        );
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL);
 
         doTestLocalEntries(ccfg, true, true);
         doTestLocalEntries(ccfg, true, false);
@@ -304,9 +221,6 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
                     cache0 = cache0.withKeepBinary();
 
                 for (CachePeekMode mode : CachePeekMode.values()) {
-                    if (mode == CachePeekMode.SWAP)
-                        continue;
-
                     int size = 0;
 
                     for (Cache.Entry<Object, Object> e : cache0.localEntries(mode)) {
@@ -332,11 +246,7 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
                     if (mode == CachePeekMode.ALL ||
                         mode == CachePeekMode.PRIMARY ||
                         mode == CachePeekMode.BACKUP ||
-                        (mode == CachePeekMode.NEAR && i == 0 &&
-                            ccfg.getMemoryMode() == CacheMemoryMode.ONHEAP_TIERED &&
-                            ccfg.getNearConfiguration() != null) ||
-                        (mode == CachePeekMode.ONHEAP && ccfg.getMemoryMode() == CacheMemoryMode.ONHEAP_TIERED) ||
-                        (mode == CachePeekMode.OFFHEAP && ccfg.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED))
+                        (mode == CachePeekMode.NEAR && i == 0 && ccfg.getNearConfiguration() != null))
                         assertTrue("Zero result at mode: " + mode, size > 0);
                 }
             }
@@ -363,19 +273,16 @@ public class CacheKeepBinaryIterationTest extends GridCommonAbstractTest {
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     protected CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
index 3130b0c..abd7036 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAbstractSelfTest.java
@@ -43,7 +43,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
@@ -79,7 +78,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -121,7 +119,6 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
             cacheCfg.setReadThrough(true);
             cacheCfg.setWriteThrough(true);
             cacheCfg.setLoadPreviousValue(true);
-            cacheCfg.setMemoryMode(memoryMode());
 
             cfg.setCacheConfiguration(cacheCfg);
         }
@@ -140,13 +137,6 @@ public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommo
     }
 
     /**
-     * @return Cache memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /**
      * @return Peer class loading enabled flag.
      */
     protected boolean peerClassLoadingEnabled() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
deleted file mode 100644
index d6948e2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCacheContinuousQueryAtomicOffheapTieredTest extends GridCacheContinuousQueryAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
deleted file mode 100644
index 4002435..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryAtomicOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class GridCacheContinuousQueryAtomicOffheapValuesTest extends GridCacheContinuousQueryAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
deleted file mode 100644
index bcba7b6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCacheContinuousQueryTxOffheapTieredTest extends GridCacheContinuousQueryTxSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
deleted file mode 100644
index 2994af6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/GridCacheContinuousQueryTxOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class GridCacheContinuousQueryTxOffheapValuesTest extends GridCacheContinuousQueryTxSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
deleted file mode 100644
index 229cec4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryPartitionedAtomicOffHeapSelfTest extends CacheVersionedEntryPartitionedAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
deleted file mode 100644
index d729780..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest extends
-    CacheVersionedEntryPartitionedTransactionalSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
deleted file mode 100644
index aa46101..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryReplicatedAtomicOffHeapSelfTest extends CacheVersionedEntryReplicatedAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
deleted file mode 100644
index c0cc89f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/version/CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.version;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest extends
-    CacheVersionedEntryReplicatedTransactionalSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
index 080902c..ec2aa61 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/datastreamer/DataStreamProcessorSelfTest.java
@@ -132,8 +132,6 @@ public class DataStreamProcessorSelfTest extends GridCommonAbstractTest {
 
             cc.setWriteSynchronizationMode(FULL_SYNC);
 
-            cc.setEvictSynchronized(false);
-
             if (store != null) {
                 cc.setCacheStoreFactory(new IgniteReflectionFactory<CacheStore>(TestStore.class));
                 cc.setReadThrough(true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
index 38d6c7b..55e1905 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteFileSystem;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.FileSystemConfiguration;
@@ -61,7 +60,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.igfs.IgfsMode.DUAL_ASYNC;
@@ -166,9 +164,6 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
     /** Dual mode flag. */
     protected final boolean dual;
 
-    /** Memory mode. */
-    protected final CacheMemoryMode memoryMode;
-
     /** IP finder for primary topology. */
     protected final TcpDiscoveryVmIpFinder primaryIpFinder = new TcpDiscoveryVmIpFinder(true);
 
@@ -196,18 +191,7 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
      * @param mode IGFS mode.
      */
     protected IgfsAbstractBaseSelfTest(IgfsMode mode) {
-        this(mode, ONHEAP_TIERED);
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param mode IGFS mode.
-     * @param memoryMode Memory mode.
-     */
-    protected IgfsAbstractBaseSelfTest(IgfsMode mode, CacheMemoryMode memoryMode) {
         this.mode = mode;
-        this.memoryMode = memoryMode;
 
         dual = (mode == DUAL_SYNC || mode == DUAL_ASYNC);
     }
@@ -396,8 +380,6 @@ public abstract class IgfsAbstractBaseSelfTest extends IgfsCommonAbstractTest {
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
         dataCacheCfg.setBackups(0);
         dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
-        dataCacheCfg.setMemoryMode(memoryMode);
-        dataCacheCfg.setOffHeapMaxMemory(0);
 
         CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
index 0e776b1..f3d6db6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.igfs;
 
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.igfs.IgfsDirectoryNotEmptyException;
 import org.apache.ignite.igfs.IgfsException;
@@ -79,16 +78,6 @@ public abstract class IgfsAbstractSelfTest extends IgfsAbstractBaseSelfTest {
     }
 
     /**
-     * Constructor.
-     *
-     * @param mode IGFS mode.
-     * @param memoryMode Memory mode.
-     */
-    protected IgfsAbstractSelfTest(IgfsMode mode, CacheMemoryMode memoryMode) {
-        super(mode, memoryMode);
-    }
-
-    /**
      * Test existence check when the path exists both locally and remotely.
      *
      * @throws Exception If failed.

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
deleted file mode 100644
index 09b4f9e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,39 +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.apache.ignite.internal.processors.igfs;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Tests for PRIMARY mode.
- */
-public class IgfsAtomicPrimaryOffheapTieredSelfTest extends IgfsPrimaryOffheapTieredSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean fragmentizerEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void prepareCacheConfigurations(CacheConfiguration dataCacheCfg,
-        CacheConfiguration metaCacheCfg) {
-        super.prepareCacheConfigurations(dataCacheCfg, metaCacheCfg);
-
-        dataCacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
deleted file mode 100644
index 8e9965d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAtomicPrimaryOffheapValuesSelfTest.java
+++ /dev/null
@@ -1,39 +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.apache.ignite.internal.processors.igfs;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Tests for PRIMARY mode.
- */
-public class IgfsAtomicPrimaryOffheapValuesSelfTest extends IgfsPrimaryOffheapValuesSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean fragmentizerEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void prepareCacheConfigurations(CacheConfiguration dataCacheCfg,
-        CacheConfiguration metaCacheCfg) {
-        super.prepareCacheConfigurations(dataCacheCfg, metaCacheCfg);
-
-        dataCacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
index 32e7e17..9e24ba8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
@@ -121,6 +121,7 @@ public class IgfsCachePerBlockLruEvictionPolicySelfTest extends IgfsCommonAbstra
         evictPlc = new IgfsPerBlockLruEvictionPolicy();
 
         dataCacheCfg.setEvictionPolicy(evictPlc);
+        dataCacheCfg.setOnheapCacheEnabled(true);
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(128));
         dataCacheCfg.setBackups(0);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
index bfba10a..2e0be3f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsMaxSizeSelfTest.java
@@ -55,7 +55,6 @@ public class IgfsMaxSizeSelfTest extends IgfsCommonAbstractTest {
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
         dataCacheCfg.setBackups(0);
         dataCacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
-        dataCacheCfg.setOffHeapMaxMemory(0);
 
         CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
deleted file mode 100644
index 21c5017..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.igfs;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.igfs.IgfsMode.PRIMARY;
-
-/**
- * Tests for PRIMARY mode and OFFHEAP_TIERED memory.
- */
-public class IgfsPrimaryOffheapTieredSelfTest extends IgfsAbstractSelfTest {
-    /**
-     * Constructor.
-     */
-    public IgfsPrimaryOffheapTieredSelfTest() {
-        super(PRIMARY, OFFHEAP_TIERED);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
deleted file mode 100644
index b079186..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsPrimaryOffheapValuesSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.igfs;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.igfs.IgfsMode.PRIMARY;
-
-/**
- * Tests for PRIMARY mode and OFFHEAP_VALUES memory.
- */
-public class IgfsPrimaryOffheapValuesSelfTest extends IgfsAbstractSelfTest {
-    /**
-     * Constructor.
-     */
-    public IgfsPrimaryOffheapValuesSelfTest() {
-        super(PRIMARY, OFFHEAP_VALUES);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
index e40ce76..ac98f9c 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/GridCacheMultiNodeLoadTest.java
@@ -69,6 +69,7 @@ public class GridCacheMultiNodeLoadTest extends GridCommonAbstractTest {
         plc.setMaxSize(100000);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setBackups(1);
 
         cacheCfg.setRebalanceMode(SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
index 25b1059..c5cea67 100644
--- a/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/loadtests/datastructures/GridCachePartitionedAtomicLongLoadTest.java
@@ -79,9 +79,9 @@ public class GridCachePartitionedAtomicLongLoadTest extends GridCommonAbstractTe
         plc.setMaxSize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setBackups(1);
         cc.setAffinity(new RendezvousAffinityFunction(true));
-        cc.setEvictSynchronized(true);
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
index 6402e63..50e5093 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/IgniteClientReconnectMassiveShutdownTest.java
@@ -45,7 +45,6 @@ import org.apache.ignite.transactions.Transaction;
 
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -139,8 +138,6 @@ public class IgniteClientReconnectMassiveShutdownTest extends GridCommonAbstract
         cfg.setCacheMode(PARTITIONED);
         cfg.setAtomicityMode(TRANSACTIONAL);
         cfg.setBackups(2);
-        cfg.setOffHeapMaxMemory(0);
-        cfg.setMemoryMode(OFFHEAP_TIERED);
 
         IgniteCache<String, Integer> cache = client.getOrCreateCache(cfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
index bbed834..eb3bbe0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java
@@ -66,11 +66,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.IgniteInterruptedCheckedException;
@@ -1862,96 +1858,6 @@ public final class GridTestUtils {
     }
 
     /**
-     * Sets cache configuration parameters according to test memory mode.
-     *
-     * @param cfg Ignite configuration.
-     * @param ccfg Cache configuration.
-     * @param testMode Test memory mode.
-     * @param maxHeapCnt Maximum number of entries in heap (used if test mode involves eviction from heap).
-     * @param maxOffheapSize Maximum offheap memory size (used if test mode involves eviction from offheap to swap).
-     */
-    public static void setMemoryMode(IgniteConfiguration cfg, CacheConfiguration ccfg,
-        TestMemoryMode testMode,
-        int maxHeapCnt,
-        long maxOffheapSize) {
-        assert testMode != null;
-        assert ccfg != null;
-
-        CacheMemoryMode memMode;
-        boolean swap = false;
-        boolean evictionPlc = false;
-        long offheapMaxMem = -1L;
-
-        switch (testMode) {
-            case HEAP: {
-                memMode = CacheMemoryMode.ONHEAP_TIERED;
-                swap = false;
-
-                break;
-            }
-
-            case SWAP: {
-                memMode = CacheMemoryMode.ONHEAP_TIERED;
-                evictionPlc = true;
-                swap = true;
-
-                break;
-            }
-
-            case OFFHEAP_TIERED: {
-                memMode = CacheMemoryMode.OFFHEAP_TIERED;
-                offheapMaxMem = 0;
-
-                break;
-            }
-
-            case OFFHEAP_TIERED_SWAP: {
-                assert maxOffheapSize > 0 : maxOffheapSize;
-
-                memMode = CacheMemoryMode.OFFHEAP_TIERED;
-                offheapMaxMem = maxOffheapSize;
-                swap = true;
-
-                break;
-            }
-
-            case OFFHEAP_EVICT: {
-                memMode = CacheMemoryMode.ONHEAP_TIERED;
-                evictionPlc = true;
-                offheapMaxMem = 0;
-
-                break;
-            }
-
-            case OFFHEAP_EVICT_SWAP: {
-                assert maxOffheapSize > 0 : maxOffheapSize;
-
-                memMode = CacheMemoryMode.ONHEAP_TIERED;
-                swap = true;
-                evictionPlc = true;
-                offheapMaxMem = maxOffheapSize;
-
-                break;
-            }
-
-            default:
-                throw new IllegalArgumentException("Invalid mode: " + testMode);
-        }
-
-        ccfg.setMemoryMode(memMode);
-
-        if (evictionPlc) {
-            LruEvictionPolicy plc = new LruEvictionPolicy();
-
-            plc.setMaxSize(maxHeapCnt);
-
-            ccfg.setEvictionPolicy(plc);
-        }
-
-        ccfg.setOffHeapMaxMemory(offheapMaxMem);
-    }
-
-    /**
      * Generate random alphabetical string.
      *
      * @param rnd Random object.
@@ -1968,23 +1874,4 @@ public final class GridTestUtils {
 
         return b.toString();
     }
-
-
-    /**
-     *
-     */
-    public enum TestMemoryMode {
-        /** Heap only. */
-        HEAP,
-        /** Evict from heap to swap with eviction policy. */
-        SWAP,
-        /** Always evict to offheap, no swap. */
-        OFFHEAP_TIERED,
-        /** Always evict to offheap + evict from offheap to swap when max offheap memory limit is reached. */
-        OFFHEAP_TIERED_SWAP,
-        /** Evict to offheap with eviction policy, no swap. */
-        OFFHEAP_EVICT,
-        /** Evict to offheap with eviction policy + evict from offheap to swap when max offheap memory limit is reached. */
-        OFFHEAP_EVICT_SWAP,
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
index 1b1fabc..14cdc2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
@@ -29,7 +29,6 @@ import javax.cache.event.CacheEntryListenerException;
 import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheInterceptorAdapter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -46,7 +45,6 @@ import org.apache.ignite.configuration.TopologyValidator;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.MapCacheStoreStrategy;
 import org.apache.ignite.marshaller.optimized.OptimizedMarshaller;
-import org.apache.ignite.testframework.junits.IgniteCacheConfigVariationsAbstractTest;
 
 import static org.apache.ignite.internal.util.lang.GridFunc.asArray;
 
@@ -86,22 +84,6 @@ public class ConfigVariations {
     );
 
     /** */
-    private static final ConfigParameter<Object> ONHEAP_TIERED_MEMORY_PARAM =
-        Parameters.parameter("setMemoryMode", CacheMemoryMode.ONHEAP_TIERED);
-
-    /** */
-    private static final ConfigParameter<Object> OFFHEAP_TIERED_MEMORY_PARAM =
-        Parameters.parameter("setMemoryMode", CacheMemoryMode.OFFHEAP_TIERED);
-
-    /** */
-    private static final ConfigParameter<Object> OFFHEAP_VALUES_MEMORY_PARAM =
-        Parameters.parameter("setMemoryMode", CacheMemoryMode.OFFHEAP_VALUES);
-
-    /** */
-    private static final ConfigParameter<Object> OFFHEAP_ENABLED =
-        Parameters.parameter("setOffHeapMaxMemory", 10 * 1024 * 1024L);
-
-    /** */
     @SuppressWarnings("unchecked")
     private static final ConfigParameter<IgniteConfiguration>[][] BASIC_IGNITE_SET = new ConfigParameter[][] {
         Parameters.objectParameters("setMarshaller", Parameters.factory(BinaryMarshaller.class), optimizedMarshallerFactory()),
@@ -113,13 +95,13 @@ public class ConfigVariations {
     private static final ConfigParameter<CacheConfiguration>[][] BASIC_CACHE_SET = new ConfigParameter[][] {
         Parameters.objectParameters("setCacheMode", CacheMode.REPLICATED, CacheMode.PARTITIONED),
         Parameters.enumParameters("setAtomicityMode", CacheAtomicityMode.class),
-        Parameters.enumParameters("setMemoryMode", CacheMemoryMode.class),
         // Set default parameters.
         Parameters.objectParameters("setLoadPreviousValue", true),
         asArray(SIMPLE_CACHE_STORE_PARAM),
         Parameters.objectParameters("setWriteSynchronizationMode", CacheWriteSynchronizationMode.FULL_SYNC),
         Parameters.objectParameters("setAtomicWriteOrderMode", CacheAtomicWriteOrderMode.PRIMARY),
         Parameters.objectParameters("setStartSize", 1024),
+        Parameters.booleanParameters("setOnheapCacheEnabled")
     };
 
     /** */
@@ -127,11 +109,6 @@ public class ConfigVariations {
     private static final ConfigParameter<CacheConfiguration>[][] FULL_CACHE_SET = new ConfigParameter[][] {
         Parameters.enumParameters("setCacheMode", CacheMode.class),
         Parameters.enumParameters("setAtomicityMode", CacheAtomicityMode.class),
-        asArray(ONHEAP_TIERED_MEMORY_PARAM,
-            Parameters.complexParameter(ONHEAP_TIERED_MEMORY_PARAM, OFFHEAP_ENABLED),
-            Parameters.complexParameter(OFFHEAP_TIERED_MEMORY_PARAM, OFFHEAP_ENABLED),
-            Parameters.complexParameter(OFFHEAP_VALUES_MEMORY_PARAM, OFFHEAP_ENABLED)
-        ),
         Parameters.booleanParameters("setLoadPreviousValue"),
         Parameters.booleanParameters("setReadFromBackup"),
         Parameters.booleanParameters("setStoreKeepBinary"),
@@ -153,6 +130,7 @@ public class ConfigVariations {
         Parameters.objectParameters("setWriteSynchronizationMode", CacheWriteSynchronizationMode.FULL_SYNC),
         Parameters.objectParameters("setAtomicWriteOrderMode", CacheAtomicWriteOrderMode.PRIMARY),
         Parameters.objectParameters("setStartSize", 1024),
+        Parameters.booleanParameters("setOnheapCacheEnabled")
     };
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
index 5d01d79..fa287bd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/IgniteCacheConfigVariationsAbstractTest.java
@@ -24,7 +24,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -43,11 +42,8 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.configvariations.CacheStartMode;
 import org.apache.ignite.transactions.Transaction;
-import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Abstract class for cache configuration variations tests.
@@ -386,23 +382,6 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
     }
 
     /**
-     * @return {@code True} if values should be stored off-heap.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return cacheConfiguration().getMemoryMode();
-    }
-
-    /**
-     * @return {@code True} if swap should happend after localEvict() call.
-     */
-    protected boolean swapAfterLocalEvict() {
-        if (memoryMode() == OFFHEAP_TIERED)
-            return false;
-
-        return memoryMode() == ONHEAP_TIERED ? (!offheapEnabled() && swapEnabled()) : swapEnabled();
-    }
-
-    /**
      * @return {@code True} if store is enabled.
      */
     protected boolean storeEnabled() {
@@ -410,13 +389,6 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
     }
 
     /**
-     * @return {@code True} if offheap memory is enabled.
-     */
-    protected boolean offheapEnabled() {
-        return cacheConfiguration().getOffHeapMaxMemory() >= 0;
-    }
-
-    /**
      * @return {@code True} if swap is enabled.
      */
     protected boolean swapEnabled() {
@@ -513,20 +485,12 @@ public abstract class IgniteCacheConfigVariationsAbstractTest extends IgniteConf
 
     /**
      * @param cache Cache.
-     * @return {@code True} if cache has OFFHEAP_TIERED memory mode.
-     */
-    protected static <K, V> boolean offheapTiered(IgniteCache<K, V> cache) {
-        return cache.getConfiguration(CacheConfiguration.class).getMemoryMode() == OFFHEAP_TIERED;
-    }
-
-    /**
-     * @param cache Cache.
      * @param key Key.
      * @return {@code True} if cache contains given key.
      * @throws Exception If failed.
      */
     @SuppressWarnings("unchecked")
     protected static boolean containsKey(IgniteCache cache, Object key) throws Exception {
-        return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.OFFHEAP) != null : cache.containsKey(key);
+        return cache.containsKey(key);
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
index e10bebe..9e46040 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/junits/common/GridCommonAbstractTest.java
@@ -715,7 +715,7 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
      * @param c Cache proxy.
      */
     protected void printPartitionState(IgniteCache<?, ?> c) {
-        printPartitionState(c.getConfiguration(CacheConfiguration.class).getName(),0);
+        printPartitionState(c.getConfiguration(CacheConfiguration.class).getName(), 0);
     }
 
     /**
@@ -1151,6 +1151,14 @@ public abstract class GridCommonAbstractTest extends GridAbstractTest {
     }
 
     /**
+     * @param cache Cache.
+     * @param key Key.
+     */
+    protected static <K, V> V localPeekOnHeap(GridCacheAdapter<K, V> cache, K key) throws IgniteCheckedException {
+        return cache.localPeek(key, new CachePeekMode[] {CachePeekMode.ONHEAP}, null);
+    }
+
+    /**
      * @param comp Compute.
      * @param task Task.
      * @param arg Task argument.

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
index d237345..93f0168 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/test/ConfigVariationsTestSuiteBuilderTest.java
@@ -41,7 +41,7 @@ public class ConfigVariationsTestSuiteBuilderTest extends TestCase {
         TestSuite dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
             .withBasicCacheParams().build();
 
-        assertEquals(4 * 12, dfltCacheSuite.countTestCases());
+        assertEquals(4 * 4 * 2, dfltCacheSuite.countTestCases());
 
         // With clients.
         dfltSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
@@ -52,7 +52,7 @@ public class ConfigVariationsTestSuiteBuilderTest extends TestCase {
         dfltCacheSuite = new ConfigVariationsTestSuiteBuilder("testSuite", NoopTest.class)
             .withBasicCacheParams().testedNodesCount(3).withClients().build();
 
-        assertEquals(4 * 12 * 3, dfltCacheSuite.countTestCases());
+        assertEquals(4 * 4 * 2 * 3, dfltCacheSuite.countTestCases());
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
index 70084f2..0ec0f0d 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBasicTestSuite.java
@@ -42,7 +42,6 @@ import org.apache.ignite.internal.processors.cache.GridLocalIgniteSerializationT
 import org.apache.ignite.internal.processors.cache.GridProjectionForCachesOnDaemonNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteDaemonNodeMarshallerCacheTest;
 import org.apache.ignite.internal.processors.cache.IgniteMarshallerCacheConcurrentReadWriteTest;
-import org.apache.ignite.internal.processors.cache.OffHeapTieredTransactionSelfTest;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessorSelfTest;
 import org.apache.ignite.internal.processors.closure.GridClosureSerializationTest;
 import org.apache.ignite.internal.processors.continuous.GridEventConsumeSelfTest;
@@ -135,7 +134,6 @@ public class IgniteBasicTestSuite extends TestSuite {
         suite.addTestSuite(GridLifecycleAwareSelfTest.class);
         suite.addTestSuite(GridMessageListenSelfTest.class);
         suite.addTestSuite(GridFailFastNodeFailureDetectionSelfTest.class);
-        suite.addTestSuite(OffHeapTieredTransactionSelfTest.class);
         suite.addTestSuite(IgniteSlowClientDetectionSelfTest.class);
         GridTestUtils.addTestIfNeeded(suite, IgniteDaemonNodeMarshallerCacheTest.class, ignoredTests);
         suite.addTestSuite(IgniteMarshallerCacheConcurrentReadWriteTest.class);


[44/57] [abbrv] ignite git commit: IGNITE-4534: Page eviction rebalance test fix.

Posted by ag...@apache.org.
IGNITE-4534: Page eviction rebalance test fix.


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

Branch: refs/heads/ignite-3477-debug
Commit: 2068a7510b09e193a33ae074b5161f1166399b7e
Parents: 7eb1234
Author: Ivan Rakov <iv...@gmail.com>
Authored: Tue Apr 11 15:24:02 2017 +0300
Committer: Ivan Rakov <iv...@gmail.com>
Committed: Tue Apr 11 15:24:02 2017 +0300

----------------------------------------------------------------------
 .../cache/eviction/paged/PageEvictionWithRebalanceTest.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2068a751/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
index fd80201..f174908 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
@@ -51,11 +51,11 @@ public abstract class PageEvictionWithRebalanceTest extends PageEvictionAbstract
                 System.out.println(">>> Entries put: " + i);
         }
 
-        int size = cache.size(CachePeekMode.PRIMARY);
+        int size = cache.size(CachePeekMode.ALL);
 
         System.out.println(">>> Resulting size: " + size);
 
-        assertTrue(size < ENTRIES);
+        assertTrue(size < ENTRIES * 2); // Primary entries and backups.
 
         for (int i = 3; i >= 1; i--) {
             stopGrid(i);
@@ -64,7 +64,7 @@ public abstract class PageEvictionWithRebalanceTest extends PageEvictionAbstract
 
             awaitPartitionMapExchange();
 
-            int rebalanceSize = cache.size(CachePeekMode.PRIMARY);
+            int rebalanceSize = cache.size(CachePeekMode.ALL);
 
             System.out.println(">>> Size after rebalance: " + rebalanceSize);
 


[43/57] [abbrv] ignite git commit: Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master

Posted by ag...@apache.org.
Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: 7eb1234cb4853baf21d06cb1b7643de98403f261
Parents: 2a6afe5 3e86c51
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 15:15:48 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 15:15:48 2017 +0300

----------------------------------------------------------------------
 .../processors/query/h2/IgniteH2Indexing.java   |  15 +-
 .../processors/query/h2/opt/GridH2Table.java    |  15 +-
 .../cpp/core-test/config/cache-identity-32.xml  |  50 ++++++
 .../core-test/config/cache-identity-default.xml | 154 +++++++++++++++++++
 .../cpp/core-test/config/cache-identity.xml     | 124 +--------------
 .../cpp/core-test/config/cache-store-32.xml     |  50 ++++++
 .../core-test/config/cache-store-default.xml    |  71 +++++++++
 .../cpp/core-test/config/cache-store.xml        |  41 +----
 .../cpp/core-test/project/vs/core-test.vcxproj  |   8 +
 .../project/vs/core-test.vcxproj.filters        |  12 ++
 .../src/binary_identity_resolver_test.cpp       |   8 +
 .../cpp/core-test/src/binary_object_test.cpp    |   8 +
 .../cpp/core-test/src/cache_invoke_test.cpp     |   4 +
 .../cpp/core-test/src/cache_store_test.cpp      |  11 +-
 .../cpp/core-test/src/cluster_test.cpp          |   4 +
 .../cpp/core-test/src/continuous_query_test.cpp |   5 +
 16 files changed, 409 insertions(+), 171 deletions(-)
----------------------------------------------------------------------



[14/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
index 251e171..bfd7806 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSerializableTransactionsTest.java
@@ -51,6 +51,7 @@ import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.cache.CacheEntry;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -82,7 +83,6 @@ import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
 import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -2578,8 +2578,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
         String readCacheName,
         String writeCacheName,
         final boolean entry,
-        final AtomicInteger putKey) throws Exception
-    {
+        final AtomicInteger putKey) throws Exception {
         final int THREADS = 64;
 
         final IgniteCache<Integer, Integer> readCache = ignite.cache(readCacheName);
@@ -3065,7 +3064,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
             }
 
             try (Transaction tx = client2.transactions().txStart(OPTIMISTIC, SERIALIZABLE)) {
-                assertEquals(1, (Object) cache2.get(key));
+                assertEquals(1, (Object)cache2.get(key));
                 cache2.put(key, 2);
 
                 tx.commit();
@@ -3266,7 +3265,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
 
             ignite0.createCache(ccfg1);
 
-            CacheConfiguration<Integer, Integer> ccfg2=
+            CacheConfiguration<Integer, Integer> ccfg2 =
                 cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
 
             ccfg2.setName(CACHE2);
@@ -4008,42 +4007,35 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testAccountTx1() throws Exception {
-        accountTx(false, false, false, false, TestMemoryMode.HEAP);
+        accountTx(false, false, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAccountTx2() throws Exception {
-        accountTx(true, false, false, false, TestMemoryMode.HEAP);
+        accountTx(true, false, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAccountTxWithNonSerializable() throws Exception {
-        accountTx(false, false, true, false, TestMemoryMode.HEAP);
+        accountTx(false, false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAccountTxNearCache() throws Exception {
-        accountTx(false, true, false, false, TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAccountTxOffheapTiered() throws Exception {
-        accountTx(false, false, false, false, TestMemoryMode.OFFHEAP_TIERED);
+        accountTx(false, true, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAccountTxNodeRestart() throws Exception {
-        accountTx(false, false, false, true, TestMemoryMode.HEAP);
+        accountTx(false, false, false, true);
     }
 
     /**
@@ -4051,20 +4043,16 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
      * @param nearCache If {@code true} near cache is enabled.
      * @param nonSer If {@code true} starts threads executing non-serializable transactions.
      * @param restart If {@code true} restarts one node.
-     * @param memMode Test memory mode.
      * @throws Exception If failed.
      */
     private void accountTx(final boolean getAll,
         final boolean nearCache,
         final boolean nonSer,
-        final boolean restart,
-        TestMemoryMode memMode) throws Exception {
+        final boolean restart) throws Exception {
         final Ignite srv = ignite(1);
 
         CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
 
-        GridTestUtils.setMemoryMode(null, ccfg, memMode, 1, 64);
-
         final String cacheName = srv.createCache(ccfg).getName();
 
         try {
@@ -4346,12 +4334,18 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
             }
 
             {
-                // Offheap.
+                // Eviction.
                 CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
                 ccfg.setName("cache3");
                 ccfg.setRebalanceMode(SYNC);
 
-                GridTestUtils.setMemoryMode(null, ccfg, TestMemoryMode.OFFHEAP_TIERED, 1, 64);
+                LruEvictionPolicy plc = new LruEvictionPolicy();
+
+                plc.setMaxSize(100);
+
+                ccfg.setEvictionPolicy(plc);
+
+                ccfg.setOnheapCacheEnabled(true);
 
                 srv.createCache(ccfg);
 
@@ -4542,7 +4536,7 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
             }
         }
         finally {
-                destroyCache(cacheName);
+            destroyCache(cacheName);
         }
     }
 
@@ -4881,15 +4875,6 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
         ccfgs.add(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, true, true));
         ccfgs.add(cacheConfiguration(PARTITIONED, FULL_SYNC, 2, true, true));
 
-        // Swap and offheap enabled.
-        for (GridTestUtils.TestMemoryMode memMode : GridTestUtils.TestMemoryMode.values()) {
-            CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
-
-            GridTestUtils.setMemoryMode(null, ccfg, memMode, 1, 64);
-
-            ccfgs.add(ccfg);
-        }
-
         return ccfgs;
     }
 
@@ -4903,7 +4888,6 @@ public class CacheSerializableTransactionsTest extends GridCommonAbstractTest {
             ", near=" + (ccfg.getNearConfiguration() != null) +
             ", store=" + ccfg.isWriteThrough() +
             ", evictPlc=" + (ccfg.getEvictionPolicy() != null) +
-            ", maxOffheap=" + ccfg.getOffHeapMaxMemory()  +
             ']');
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
deleted file mode 100644
index 9a9b675..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheSwapUnswapGetTest.java
+++ /dev/null
@@ -1,310 +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.apache.ignite.internal.processors.cache;
-
-import java.util.Collections;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CachePeekMode;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.util.typedef.CAX;
-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;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.eclipse.jetty.util.ConcurrentHashSet;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-
-/**
- *
- */
-public class CacheSwapUnswapGetTest extends GridCommonAbstractTest {
-    /** */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** */
-    private static final long DURATION = 30_000;
-
-    /** */
-    private static final long OFFHEAP_MEM = 1000;
-
-    /** */
-    private static final int MAX_HEAP_SIZE = 100;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(ipFinder);
-
-        return cfg;
-    }
-
-    /**
-     * @param atomicityMode Cache atomicity mode.
-     * @param memMode Cache memory mode.
-     * @param swap {@code True} if swap enabled.
-     * @return Cache configuration.
-     */
-    private CacheConfiguration<Integer, String> cacheConfiguration(CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memMode,
-        boolean swap) {
-        CacheConfiguration<Integer, String> ccfg = new CacheConfiguration<>();
-
-        ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setWriteSynchronizationMode(FULL_SYNC);
-        ccfg.setMemoryMode(memMode);
-
-        if (memMode == CacheMemoryMode.ONHEAP_TIERED) {
-            LruEvictionPolicy plc = new LruEvictionPolicy();
-            plc.setMaxSize(MAX_HEAP_SIZE);
-
-            ccfg.setEvictionPolicy(plc);
-        }
-
-        // TODO GG-11148.
-//        if (swap) {
-//            ccfg.setSwapEnabled(true);
-//
-//            ccfg.setOffHeapMaxMemory(OFFHEAP_MEM);
-//        }
-//        else
-//            ccfg.setOffHeapMaxMemory(0);
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        startGrid(0);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return DURATION + 60_000;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxCacheOffheapEvict() throws Exception {
-        swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxCacheOffheapTiered() throws Exception {
-        swapUnswap(TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxCacheOffheapSwapEvict() throws Exception {
-        swapUnswap(TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxCacheOffheapTieredSwapEvict() throws Exception {
-        swapUnswap(TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicCacheOffheapEvict() throws Exception {
-        swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicCacheOffheapTiered() throws Exception {
-        swapUnswap(ATOMIC, CacheMemoryMode.OFFHEAP_TIERED, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicCacheOffheapSwapEvict() throws Exception {
-        swapUnswap(ATOMIC, CacheMemoryMode.ONHEAP_TIERED, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicCacheOffheapTieredSwapEvict() throws Exception {
-        swapUnswap(ATOMIC, CacheMemoryMode.OFFHEAP_TIERED, true);
-    }
-
-    /**
-     * @param atomicityMode Cache atomicity mode.
-     * @param memMode Cache memory mode.
-     * @param swap {@code True} if swap enabled.
-     * @throws Exception If failed.
-     */
-    private void swapUnswap(CacheAtomicityMode atomicityMode, CacheMemoryMode memMode, boolean swap) throws Exception {
-        log.info("Start test [mode=" + atomicityMode + ", swap=" + swap + ']');
-
-        int threadCnt = 20;
-        final int keyCnt = 1000;
-        final int valCnt = 10000;
-
-        final Ignite g = grid(0);
-
-        final ConcurrentHashSet<Integer> keys = new ConcurrentHashSet<>();
-
-        final AtomicBoolean done = new AtomicBoolean();
-
-        g.destroyCache(null);
-
-        final IgniteCache<Integer, String> cache = g.createCache(cacheConfiguration(atomicityMode, memMode, swap));
-
-        try {
-            IgniteInternalFuture<?> fut = multithreadedAsync(new CAX() {
-                @Override public void applyx() throws IgniteCheckedException {
-                    ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                    while (!done.get()) {
-                        Integer key = rnd.nextInt(keyCnt);
-
-                        switch (rnd.nextInt(3)) {
-                            case 0:
-                                cache.put(key, String.valueOf(rnd.nextInt(valCnt)));
-
-                                keys.add(key);
-
-                                break;
-
-                            case 1:
-                                cache.localEvict(Collections.singletonList(key));
-
-                                break;
-
-                            case 2:
-                                if (keys.contains(key)) {
-                                    String val = cache.get(key);
-
-                                    assertNotNull(val);
-                                }
-
-                                break;
-
-                            default:
-                                assert false;
-                        }
-                    }
-                }
-            }, threadCnt, "update-thread");
-
-            IgniteInternalFuture<?> getFut = GridTestUtils.runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    Thread.currentThread().setName("get-thread");
-
-                    while (!done.get()) {
-                        for (Integer key : keys) {
-                            String val = cache.get(key);
-
-                            assertNotNull(val);
-                        }
-                    }
-
-                    return null;
-                }
-            });
-
-            long endTime = System.currentTimeMillis() + DURATION;
-
-            while (System.currentTimeMillis() < endTime) {
-                Thread.sleep(5000);
-
-                log.info("Cache size [heap=" + cache.localSize(CachePeekMode.ONHEAP) +
-                    ", offheap=" + cache.localSize(CachePeekMode.OFFHEAP) +
-                    ", total=" + cache.localSize() +
-                    ", offheapMem=" + cache.localMetrics().getOffHeapAllocatedSize() + ']');
-            }
-
-            done.set(true);
-
-            fut.get();
-            getFut.get();
-
-            for (Integer key : keys) {
-                String val = cache.get(key);
-
-                assertNotNull(val);
-            }
-
-            int onheapSize = cache.localSize(CachePeekMode.ONHEAP);
-            int offheapSize = cache.localSize(CachePeekMode.OFFHEAP);
-            int swapSize = cache.localSize(CachePeekMode.SWAP);
-            int total = cache.localSize();
-            long offheapMem = cache.localMetrics().getOffHeapAllocatedSize();
-
-            log.info("Cache size [heap=" + onheapSize +
-                ", offheap=" + offheapSize +
-                ", swap=" + swapSize +
-                ", total=" + total +
-                ", offheapMem=" + offheapMem +  ']');
-
-            assertTrue(total > 0);
-
-            assertEquals(onheapSize + offheapSize + swapSize, total);
-
-            if (memMode == CacheMemoryMode.OFFHEAP_TIERED)
-                assertEquals(0, onheapSize);
-            else
-                assertEquals(MAX_HEAP_SIZE, onheapSize);
-
-            if (swap) {
-                assertTrue(swapSize > 0);
-                assertTrue(offheapMem <= OFFHEAP_MEM);
-            }
-            else
-                assertEquals(0, swapSize);
-        }
-        finally {
-            done.set(true);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
index 0812fcc..52c98c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridAbstractCacheInterceptorRebalanceTest.java
@@ -27,7 +27,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheInterceptor;
 import org.apache.ignite.cache.CacheInterceptorAdapter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteEx;
@@ -102,11 +101,6 @@ public abstract class GridAbstractCacheInterceptorRebalanceTest extends GridComm
      */
     protected abstract CacheAtomicityMode atomicityMode();
 
-    /**
-     * @return Cache memory mode;
-     */
-    protected abstract CacheMemoryMode memoryMode();
-
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         stopAllGrids();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
index abbf98d..fb8cc22 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractByteArrayValuesSelfTest.java
@@ -30,12 +30,6 @@ public abstract class GridCacheAbstractByteArrayValuesSelfTest extends GridCommo
     /** Regular cache name. */
     protected static final String CACHE_REGULAR = "cache";
 
-    /** Offheap cache name. */
-    protected static final String CACHE_OFFHEAP = "cache_offheap";
-
-    /** Offheap tiered cache name. */
-    protected static final String CACHE_OFFHEAP_TIERED = "cache_offheap_tiered";
-
     /** Key 1. */
     protected static final Integer KEY_1 = 1;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index de0b532..b70ca6a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@ -59,7 +59,6 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.cache.CacheEntry;
 import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.query.QueryCursor;
@@ -108,14 +107,10 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CachePeekMode.ALL;
-import static org.apache.ignite.cache.CachePeekMode.BACKUP;
 import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
 import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
 import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
@@ -203,13 +198,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         return true;
     }
 
-    /**
-     * @return {@code True} if values should be stored off-heap.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return ONHEAP_TIERED;
-    }
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -237,18 +225,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        if (memoryMode() == OFFHEAP_TIERED || memoryMode() == OFFHEAP_VALUES) {
-            ccfg.setMemoryMode(memoryMode());
-            ccfg.setOffHeapMaxMemory(0);
-        }
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         initStoreStrategy();
 
@@ -3133,8 +3109,8 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      *
      * @throws Exception If failed.
      */
-    public void _testDeletedEntriesFlag() throws Exception {
-        if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
+    public void testDeletedEntriesFlag() throws Exception {
+        if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
             final int cnt = 3;
 
             IgniteCache<String, Integer> cache = jcache();
@@ -4060,7 +4036,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      * TODO GG-11133.
      * @throws Exception In case of error.
      */
-    public void _testEvictExpired() throws Exception {
+    public void testEvictExpired() throws Exception {
         final IgniteCache<String, Integer> cache = jcache();
 
         final String key = primaryKeysForCache(cache, 1).get(0);
@@ -4115,7 +4091,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      *
      * @throws Exception If failed.
      */
-    public void _testPeekExpired() throws Exception {
+    public void testPeekExpired() throws Exception {
         final IgniteCache<String, Integer> c = jcache();
 
         final String key = primaryKeysForCache(c, 1).get(0);
@@ -4150,7 +4126,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      *
      * @throws Exception If failed.
      */
-    public void _testPeekExpiredTx() throws Exception {
+    public void testPeekExpiredTx() throws Exception {
         if (txShouldBeUsed()) {
             final IgniteCache<String, Integer> c = jcache();
 
@@ -4209,9 +4185,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
         if (true)
             return;
 
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         int ttl = 1000;
 
         final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -4493,144 +4466,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     }
 
     /**
-     * @throws Exception If failed.
-     *
-     * TODO: GG-11148 check if test makes sense.
-     */
-    public void _testUnswap() throws Exception {
-        IgniteCache<String, Integer> cache = grid(0).cache(null);
-
-        List<String> keys = primaryKeysForCache(jcache(), 3);
-
-        String k1 = keys.get(0);
-        String k2 = keys.get(1);
-        String k3 = keys.get(2);
-
-        cache.getAndPut(k1, 1);
-        cache.getAndPut(k2, 2);
-        cache.getAndPut(k3, 3);
-
-        final AtomicInteger swapEvts = new AtomicInteger(0);
-        final AtomicInteger unswapEvts = new AtomicInteger(0);
-
-        Collection<String> locKeys = new HashSet<>();
-
-        if (grid(0).context().cache().cache(null).context().affinityNode()) {
-            Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
-
-            for (Cache.Entry<String, Integer> entry : entries)
-                locKeys.add(entry.getKey());
-
-            info("Local keys (primary + backup): " + locKeys);
-        }
-
-        for (int i = 0; i < gridCount(); i++)
-            grid(i).events().localListen(
-                new SwapEvtsLocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
-        cache.localEvict(F.asList(k2, k3));
-
-        if (memoryMode() == OFFHEAP_TIERED) {
-            assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-            assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-            assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-        }
-        else {
-            assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-            assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-            assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-        }
-
-        int cnt = 0;
-
-        if (locKeys.contains(k2)) {
-            assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
-
-            cache.localPromote(Collections.singleton(k2));
-
-            assertEquals((Integer)2, cache.localPeek(k2, ONHEAP_PEEK_MODES));
-
-            cnt++;
-        }
-        else {
-            cache.localPromote(Collections.singleton(k2));
-
-            assertNull(cache.localPeek(k2, ONHEAP_PEEK_MODES));
-        }
-
-        if (locKeys.contains(k3)) {
-            assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
-
-            cache.localPromote(Collections.singleton(k3));
-
-            assertEquals((Integer)3, cache.localPeek(k3, ONHEAP_PEEK_MODES));
-
-            cnt++;
-        }
-        else {
-            cache.localPromote(Collections.singleton(k3));
-
-            assertNull(cache.localPeek(k3, ONHEAP_PEEK_MODES));
-        }
-
-        if (memoryMode() != OFFHEAP_TIERED) {
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-        }
-
-        cache.localEvict(Collections.singleton(k1));
-
-        assertEquals((Integer)1, cache.get(k1));
-
-        if (locKeys.contains(k1))
-            cnt++;
-
-        if (memoryMode() != OFFHEAP_TIERED) {
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-        }
-
-        cache.clear();
-
-        // Check with multiple arguments.
-        cache.getAndPut(k1, 1);
-        cache.getAndPut(k2, 2);
-        cache.getAndPut(k3, 3);
-
-        swapEvts.set(0);
-        unswapEvts.set(0);
-
-        cache.localEvict(Collections.singleton(k2));
-        cache.localEvict(Collections.singleton(k3));
-
-        if (memoryMode() == OFFHEAP_TIERED) {
-            assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-            assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-            assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-        }
-        else {
-            assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-            assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-            assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-        }
-
-        cache.localPromote(F.asSet(k2, k3));
-
-        cnt = 0;
-
-        if (locKeys.contains(k2))
-            cnt++;
-
-        if (locKeys.contains(k3))
-            cnt++;
-
-        if (memoryMode() != OFFHEAP_TIERED) {
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-        }
-    }
-
-    /**
      * JUnit.
      */
     public void testCacheProxy() {
@@ -4644,7 +4479,7 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      *
      * @throws Exception If failed.
      */
-    public void _testCompactExpired() throws Exception {
+    public void testCompactExpired() throws Exception {
         final IgniteCache<String, Integer> cache = jcache();
 
         final String key = F.first(primaryKeysForCache(cache, 1));
@@ -4835,9 +4670,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
     public void testToMap() throws Exception {
         IgniteCache<String, Integer> cache = jcache();
 
-        if (offheapTiered(cache))
-            return;
-
         cache.put("key1", 1);
         cache.put("key2", 2);
 
@@ -4858,9 +4690,6 @@ public abstract class GridCacheAbstractFullApiSelfTest extends GridCacheAbstract
      * @throws Exception If failed.
      */
     protected void checkSize(final Collection<String> keys) throws Exception {
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         if (nearEnabled())
             assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
         else {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
index a294196..64c60fe 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractLocalStoreSelfTest.java
@@ -37,7 +37,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteSystemProperties;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
@@ -64,7 +63,6 @@ import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.IgniteSystemProperties.IGNITE_LOCAL_STORE_KEEPS_PRIMARY_ONLY;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -194,10 +192,6 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
         cacheCfg.setWriteThrough(true);
         cacheCfg.setReadThrough(true);
         cacheCfg.setBackups(backups);
-        cacheCfg.setOffHeapMaxMemory(0);
-
-        if (isOffHeapTieredMode())
-            cacheCfg.setMemoryMode(OFFHEAP_TIERED);
 
         return cacheCfg;
     }
@@ -219,13 +213,6 @@ public abstract class GridCacheAbstractLocalStoreSelfTest extends GridCommonAbst
      */
     protected abstract CacheMode getCacheMode();
 
-    /**
-     * @return {@code True} if {@link CacheMemoryMode#OFFHEAP_TIERED} memory mode should be used.
-     */
-    protected boolean isOffHeapTieredMode() {
-        return false;
-    }
-
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         stopAllGrids();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
index bda0606..8606f7c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractRemoveFailureTest.java
@@ -164,7 +164,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testPutAndRemove() throws Exception {
-        putAndRemove(DUR, null, null, GridTestUtils.TestMemoryMode.HEAP);
+        putAndRemove(DUR, null, null);
     }
 
     /**
@@ -174,7 +174,7 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr
         if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL)
             return;
 
-        putAndRemove(30_000, PESSIMISTIC, REPEATABLE_READ, GridTestUtils.TestMemoryMode.HEAP);
+        putAndRemove(30_000, PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**
@@ -184,34 +184,18 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr
         if (atomicityMode() != CacheAtomicityMode.TRANSACTIONAL)
             return;
 
-        putAndRemove(30_000, OPTIMISTIC, SERIALIZABLE, GridTestUtils.TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAndRemoveOffheapEvict() throws Exception {
-        putAndRemove(30_000, null, null, GridTestUtils.TestMemoryMode.OFFHEAP_EVICT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAndRemoveOffheapEvictSwap() throws Exception {
-        putAndRemove(30_000, null, null, GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP);
+        putAndRemove(30_000, OPTIMISTIC, SERIALIZABLE);
     }
 
     /**
      * @param duration Test duration.
      * @param txConcurrency Transaction concurrency if test explicit transaction.
      * @param txIsolation Transaction isolation if test explicit transaction.
-     * @param memMode Memory mode.
      * @throws Exception If failed.
      */
     private void putAndRemove(long duration,
         final TransactionConcurrency txConcurrency,
-        final TransactionIsolation txIsolation,
-        GridTestUtils.TestMemoryMode memMode) throws Exception {
+        final TransactionIsolation txIsolation) throws Exception {
         assertEquals(testClientNode(), (boolean) grid(0).configuration().isClientMode());
 
         grid(0).destroyCache(null);
@@ -229,8 +213,6 @@ public abstract class GridCacheAbstractRemoveFailureTest extends GridCommonAbstr
         ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode());
         ccfg.setNearConfiguration(nearCache());
 
-        GridTestUtils.setMemoryMode(null, ccfg, memMode, 100, 1024);
-
         final IgniteCache<Integer, Integer> sndCache0 = grid(0).createCache(ccfg);
 
         final AtomicBoolean stop = new AtomicBoolean();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
index c758ec1..95f8bb8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractSelfTest.java
@@ -58,7 +58,6 @@ import org.apache.ignite.transactions.Transaction;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -143,7 +142,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
 
                     assertTrue(
                         "Cache is not empty: " + " localSize = " + jcache(fi).localSize(CachePeekMode.ALL)
-                        + ", local entries " + entrySet(jcache(fi).localEntries()),
+                            + ", local entries " + entrySet(jcache(fi).localEntries()),
                         GridTestUtils.waitForCondition(
                             // Preloading may happen as nodes leave, so we need to wait.
                             new GridAbsPredicateX() {
@@ -251,6 +250,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
         cfg.setAtomicityMode(atomicityMode());
         cfg.setWriteSynchronizationMode(writeSynchronization());
         cfg.setNearConfiguration(nearConfiguration());
+        cfg.setOnheapCacheEnabled(onheapCacheEnabled());
 
         Class<?>[] idxTypes = indexedTypes();
 
@@ -335,6 +335,13 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @return {@code True} if on-heap cache is enabled.
+     */
+    protected boolean onheapCacheEnabled() {
+        return false;
+    }
+
+    /**
      * @return {@code True} for partitioned caches.
      */
     protected final boolean partitionedMode() {
@@ -387,14 +394,6 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @param cache Cache.
-     * @return {@code True} if cache has OFFHEAP_TIERED memory mode.
-     */
-    protected <K, V> boolean offheapTiered(IgniteCache<K, V> cache) {
-        return cache.getConfiguration(CacheConfiguration.class).getMemoryMode() == OFFHEAP_TIERED;
-    }
-
-    /**
      * Executes regular peek or peek from swap.
      *
      * @param cache Cache projection.
@@ -413,7 +412,7 @@ public abstract class GridCacheAbstractSelfTest extends GridCommonAbstractTest {
      */
     @SuppressWarnings("unchecked")
     protected boolean containsKey(IgniteCache cache, Object key) throws Exception {
-        return offheapTiered(cache) ? cache.localPeek(key, CachePeekMode.OFFHEAP) != null : cache.containsKey(key);
+        return cache.containsKey(key);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java
index 796268d..707e275 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheClearSelfTest.java
@@ -23,7 +23,6 @@ import java.util.UUID;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -80,177 +79,92 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testClearPartitioned() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearPartitionedOffHeap() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, false, null);
+        testClear(CacheMode.PARTITIONED, false, null);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearPartitionedNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearPartitionedOffHeapNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, true, null);
+        testClear(CacheMode.PARTITIONED, true, null);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearReplicated() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearReplicatedOffHeap() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, false, null);
+        testClear(CacheMode.REPLICATED, false, null);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearReplicatedNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearReplicatedOffHeapNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, true, null);
+        testClear(CacheMode.REPLICATED, true, null);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeyPartitioned() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, Collections.singleton(3));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeyPartitionedOffHeap() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, false, Collections.singleton(3));
+        testClear(CacheMode.PARTITIONED, false, Collections.singleton(3));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeyPartitionedNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, Collections.singleton(3));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeyPartitionedOffHeapNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, true, Collections.singleton(3));
+        testClear(CacheMode.PARTITIONED, true, Collections.singleton(3));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeyReplicated() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, Collections.singleton(3));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeyReplicatedOffHeap() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, false, Collections.singleton(3));
+        testClear(CacheMode.REPLICATED, false, Collections.singleton(3));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeyReplicatedNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, Collections.singleton(3));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeyReplicatedOffHeapNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, true, Collections.singleton(3));
+        testClear(CacheMode.REPLICATED, true, Collections.singleton(3));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeysPartitioned() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, false, F.asSet(2, 6, 9));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeysPartitionedOffHeap() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, false, F.asSet(2, 6, 9));
+        testClear(CacheMode.PARTITIONED, false, F.asSet(2, 6, 9));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeysPartitionedNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED, true, F.asSet(2, 6, 9));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeysPartitionedOffHeapNear() throws Exception {
-        testClear(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED, true, F.asSet(2, 6, 9));
+        testClear(CacheMode.PARTITIONED, true, F.asSet(2, 6, 9));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeysReplicated() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, false, F.asSet(2, 6, 9));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeysReplicatedOffHeap() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, false, F.asSet(2, 6, 9));
+        testClear(CacheMode.REPLICATED, false, F.asSet(2, 6, 9));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClearKeysReplicatedNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED, true, F.asSet(2, 6, 9));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClearKeysReplicatedOffHeapNear() throws Exception {
-        testClear(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED, true, F.asSet(2, 6, 9));
+        testClear(CacheMode.REPLICATED, true, F.asSet(2, 6, 9));
     }
 
     /**
      * @param cacheMode Cache mode.
-     * @param memMode Memory mode.
      * @param near Near cache flag.
      * @param keys Keys to clear.
      */
-    private void testClear(CacheMode cacheMode, CacheMemoryMode memMode, boolean near, @Nullable Set<Integer> keys) {
+    private void testClear(CacheMode cacheMode, boolean near, @Nullable Set<Integer> keys) {
         Ignite client1 = client1();
         Ignite client2 = client2();
 
@@ -261,7 +175,6 @@ public class GridCacheClearSelfTest extends GridCommonAbstractTest {
             CacheConfiguration<Integer, Integer> cfg = new CacheConfiguration<>(cacheName);
 
             cfg.setCacheMode(cacheMode);
-            cfg.setMemoryMode(memMode);
 
             IgniteCache<Integer, Integer> cache1 = near ?
                 client1.createCache(cfg, new NearCacheConfiguration<Integer, Integer>()) :

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
index 491abff..4776456 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentTxMultiNodeTest.java
@@ -144,7 +144,7 @@ public class GridCacheConcurrentTxMultiNodeTest extends GridCommonAbstractTest {
             plc.setMaxSize(1000);
 
             cc.setEvictionPolicy(plc);
-            cc.setEvictSynchronized(false);
+            cc.setOnheapCacheEnabled(true);
             cc.setWriteSynchronizationMode(FULL_SYNC);
             cc.setRebalanceMode(NONE);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
index 74c5348..59a5ebb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheConfigurationConsistencySelfTest.java
@@ -362,6 +362,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             },
@@ -383,6 +384,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new SortedEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             },
@@ -390,6 +392,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 /** {@inheritDoc} */
                 @Override public Void apply(CacheConfiguration cfg) {
                     cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                    cfg.setOnheapCacheEnabled(true);
                     return null;
                 }
             }
@@ -443,42 +446,6 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
     /**
      * @throws Exception If failed.
      */
-    public void testDifferentEvictSynchronized() throws Exception {
-        cacheMode = PARTITIONED;
-
-        checkSecondGridStartFails(
-            new C1<CacheConfiguration, Void>() {
-                /** {@inheritDoc} */
-                @Override public Void apply(CacheConfiguration cfg) {
-                    cfg.setEvictSynchronized(true);
-
-                    FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
-                    plc.setMaxSize(100);
-
-                    cfg.setEvictionPolicy(plc);
-                    return null;
-                }
-            },
-            new C1<CacheConfiguration, Void>() {
-                /** {@inheritDoc} */
-                @Override public Void apply(CacheConfiguration cfg) {
-                    cfg.setEvictSynchronized(false);
-
-                    FifoEvictionPolicy plc = new FifoEvictionPolicy();
-
-                    plc.setMaxSize(100);
-
-                    cfg.setEvictionPolicy(plc);
-                    return null;
-                }
-            }
-        );
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testDifferentAtomicity() throws Exception {
         cacheMode = PARTITIONED;
 
@@ -672,6 +639,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 cfg.setAffinity(new TestRendezvousAffinityFunction());
 
                 cfg.setEvictionPolicy(new FifoEvictionPolicy());
+                cfg.setOnheapCacheEnabled(true);
 
                 cfg.setCacheStoreFactory(new IgniteCacheAbstractTest.TestStoreFactory());
                 cfg.setReadThrough(true);
@@ -690,6 +658,7 @@ public class GridCacheConfigurationConsistencySelfTest extends GridCommonAbstrac
                 cfg.setAffinity(new RendezvousAffinityFunction());
 
                 cfg.setEvictionPolicy(new LruEvictionPolicy());
+                cfg.setOnheapCacheEnabled(true);
 
                 cfg.setCacheStoreFactory(null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
deleted file mode 100644
index ed58c3e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapSelfTest.java
+++ /dev/null
@@ -1,41 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests deployment with off-heap storage.
- */
-public class GridCacheDeploymentOffHeapSelfTest extends GridCacheDeploymentSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration() throws Exception {
-        CacheConfiguration cacheCfg = super.cacheConfiguration();
-
-        cacheCfg.setMemoryMode(OFFHEAP_TIERED);
-        cacheCfg.setOffHeapMaxMemory(0);
-        cacheCfg.setAtomicityMode(TRANSACTIONAL);
-        cacheCfg.setNearConfiguration(new NearCacheConfiguration());
-
-        return cacheCfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
deleted file mode 100644
index 73d5183..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheDeploymentOffHeapValuesSelfTest.java
+++ /dev/null
@@ -1,41 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests deployment with off-heap storage.
- */
-public class GridCacheDeploymentOffHeapValuesSelfTest extends GridCacheDeploymentSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration() throws Exception {
-        CacheConfiguration cacheCfg = super.cacheConfiguration();
-
-        cacheCfg.setMemoryMode(OFFHEAP_VALUES);
-        cacheCfg.setOffHeapMaxMemory(0);
-        cacheCfg.setAtomicityMode(TRANSACTIONAL);
-        cacheCfg.setNearConfiguration(new NearCacheConfiguration());
-
-        return cacheCfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
index 40de38c..eae8dad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionEventAbstractTest.java
@@ -25,6 +25,7 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.CacheEvent;
@@ -69,6 +70,8 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
 
         cc.setCacheMode(cacheMode());
         cc.setAtomicityMode(atomicityMode());
+        cc.setEvictionPolicy(new FifoEvictionPolicy());
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 
@@ -116,7 +119,5 @@ public abstract class GridCacheEvictionEventAbstractTest extends GridCommonAbstr
         c.localEvict(Collections.singleton("1"));
 
         assertTrue("Failed to wait for eviction event", latch.await(10, TimeUnit.SECONDS));
-
-        assertNotNull(oldVal.get());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
deleted file mode 100644
index 103322f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicOffheapRebalanceTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class GridCacheInterceptorAtomicOffheapRebalanceTest extends GridCacheInterceptorAtomicRebalanceTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java
index aaeda4b..909810f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorAtomicRebalanceTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 /**
  *
@@ -28,9 +27,4 @@ public class GridCacheInterceptorAtomicRebalanceTest extends GridAbstractCacheIn
     @Override protected CacheAtomicityMode atomicityMode() {
         return CacheAtomicityMode.ATOMIC;
     }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
deleted file mode 100644
index bb90062..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalOffheapRebalanceTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class GridCacheInterceptorTransactionalOffheapRebalanceTest extends GridCacheInterceptorTransactionalRebalanceTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return 10 * 60_000;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
index bace87c..87c3f32 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheInterceptorTransactionalRebalanceTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 /**
  *
@@ -28,9 +27,4 @@ public class GridCacheInterceptorTransactionalRebalanceTest extends GridAbstract
     @Override protected CacheAtomicityMode atomicityMode() {
         return CacheAtomicityMode.TRANSACTIONAL;
     }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
index 089e278..22d94fb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheLifecycleAwareSelfTest.java
@@ -318,6 +318,7 @@ public class GridCacheLifecycleAwareSelfTest extends GridAbstractLifecycleAwareS
         TestEvictionPolicy evictionPlc = new TestEvictionPolicy();
 
         ccfg.setEvictionPolicy(evictionPlc);
+        ccfg.setOnheapCacheEnabled(true);
 
         lifecycleAwares.add(evictionPlc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
deleted file mode 100644
index 6768a0e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheMemoryModeSelfTest.java
+++ /dev/null
@@ -1,285 +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.apache.ignite.internal.processors.cache;
-
-import java.util.HashMap;
-import java.util.Map;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CachePeekMode;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.CIX1;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.junit.Assert;
-
-import static java.lang.String.valueOf;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-
-/**
- * Memory model self test.
- */
-@SuppressWarnings("deprecation")
-public class GridCacheMemoryModeSelfTest extends GridCommonAbstractTest {
-    /** */
-    private TcpDiscoveryIpFinder ipFinder;
-
-    /** */
-    private boolean swapEnabled;
-
-    /** */
-    private CacheMode mode;
-
-    /** */
-    private CacheMemoryMode memoryMode;
-
-    /** */
-    private int maxOnheapSize;
-
-    /** */
-    private long offheapSize;
-
-    /** */
-    private CacheAtomicityMode atomicity;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        cfg.setNetworkTimeout(2000);
-
-        cfg.setCacheConfiguration(cacheConfiguration());
-
-        return cfg;
-    }
-
-    /**
-     * Returns cache configuration.
-     *
-     * @return cache configuration.
-     */
-    protected CacheConfiguration cacheConfiguration() {
-        CacheConfiguration cacheCfg = defaultCacheConfiguration();
-
-        cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
-
-        cacheCfg.setCacheMode(mode);
-        cacheCfg.setMemoryMode(memoryMode);
-
-        LruEvictionPolicy plc = null;
-
-        if (maxOnheapSize != Integer.MAX_VALUE) {
-            plc = new LruEvictionPolicy();
-            plc.setMaxSize(maxOnheapSize);
-        }
-
-        cacheCfg.setEvictionPolicy(plc);
-
-        cacheCfg.setAtomicityMode(atomicity);
-        cacheCfg.setOffHeapMaxMemory(offheapSize);
-
-        return cacheCfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOnheap() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.ONHEAP_TIERED;
-        maxOnheapSize = Integer.MAX_VALUE;
-        swapEnabled = false;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = -1;
-
-        doTestPutAndPutAll(1000, 0, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOnheapSwap() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.ONHEAP_TIERED;
-        maxOnheapSize = 330;
-        swapEnabled = true;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = -1;
-
-        doTestPutAndPutAll(330, 670, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffheap() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.OFFHEAP_TIERED;
-        maxOnheapSize = Integer.MAX_VALUE;
-        swapEnabled = false;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = -1; // Must be fixed in config validation.
-
-        doTestPutAndPutAll(0, 1000, false, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffheapSwap() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.OFFHEAP_TIERED;
-        maxOnheapSize = Integer.MAX_VALUE;
-        swapEnabled = true;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = 1000; // Small for evictions from offheap to swap.
-
-        doTestPutAndPutAll(0, 1000, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTiered() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.ONHEAP_TIERED;
-        maxOnheapSize = 24;
-        swapEnabled = true;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = 1000; // Small for evictions from offheap to swap.
-
-        doTestPutAndPutAll(24, 976, false, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffheapValuesConfigFixBackward() throws Exception {
-        mode = CacheMode.LOCAL;
-        memoryMode = CacheMemoryMode.OFFHEAP_VALUES;
-        maxOnheapSize = 24;
-        swapEnabled = true;
-        atomicity = CacheAtomicityMode.ATOMIC;
-        offheapSize = -1;
-
-        Ignite g = startGrid();
-
-        CacheConfiguration cfg = g.cache(null).getConfiguration(CacheConfiguration.class);
-
-        assertEquals(memoryMode, cfg.getMemoryMode());
-        assertEquals(0, cfg.getOffHeapMaxMemory());
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        super.afterTest();
-
-        stopAllGrids();
-    }
-
-    /**
-     * @param cache In cache.
-     * @param offheapSwap In swap and offheap.
-     * @param offheapEmpty Offheap is empty.
-     * @param swapEmpty Swap is empty.
-     * @throws Exception If failed.
-     */
-    private void doTestPutAndPutAll(int cache, int offheapSwap, boolean offheapEmpty, boolean swapEmpty)
-        throws Exception {
-        final int all = cache + offheapSwap;
-
-        // put
-        doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<IgniteCache<String, Integer>>() {
-            @Override public void applyx(IgniteCache<String, Integer> c) throws IgniteCheckedException {
-                for (int i = 0; i < all; i++)
-                    c.put(valueOf(i), i);
-            }
-        });
-
-        //putAll
-        doTest(cache, offheapSwap, offheapEmpty, swapEmpty, new CIX1<IgniteCache<String, Integer>>() {
-            @Override public void applyx(IgniteCache<String, Integer> c) throws IgniteCheckedException {
-                putAll(c, 0, all / 2);
-
-                putAll(c, all / 2 + 1, all - 1);
-            }
-
-            private void putAll(IgniteCache<String, Integer> c, int k1, int k2) {
-                Map<String, Integer> m = new HashMap<>();
-
-                for (int i = k1; i <= k2; i++)
-                    m.put(valueOf(i), i);
-
-                c.putAll(m);
-            }
-        });
-    }
-
-    /**
-     * @param cache Cache size.
-     * @param offheapSwap Offheap + swap size.
-     * @param offheapEmpty Offheap is empty.
-     * @param swapEmpty Swap is empty.
-     * @param x Cache modifier.
-     * @throws IgniteCheckedException If failed.
-     */
-    void doTest(int cache, int offheapSwap, boolean offheapEmpty, boolean swapEmpty,
-        CIX1<IgniteCache<String, Integer>> x) throws Exception {
-        ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-        startGrid();
-
-        final IgniteCache<String, Integer> c = jcache();
-
-        x.applyx(c);
-
-        assertEquals(cache, c.size(CachePeekMode.ONHEAP));
-        assertEquals(offheapSwap, c.localSize(CachePeekMode.OFFHEAP) + c.localSize(CachePeekMode.SWAP));
-
-        info("size: " + c.size());
-        info("heap: " + c.localSize(CachePeekMode.ONHEAP));
-        info("offheap: " + c.localSize(CachePeekMode.OFFHEAP));
-        info("swap: " + c.localSize(CachePeekMode.SWAP));
-
-        if (offheapEmpty)
-            Assert.assertEquals(0, c.localSize(CachePeekMode.OFFHEAP));
-        else
-            Assert.assertNotEquals(0, c.localSize(CachePeekMode.OFFHEAP));
-
-        if (swapEmpty)
-            Assert.assertEquals(0, c.localSize(CachePeekMode.SWAP));
-        else
-            Assert.assertNotEquals(0, c.localSize(CachePeekMode.SWAP));
-
-        stopAllGrids();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
index 98d5682..54a3aa9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheObjectToStringSelfTest.java
@@ -68,6 +68,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
 
         cacheCfg.setCacheMode(cacheMode);
         cacheCfg.setEvictionPolicy(evictionPlc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
index e83ec3a..a806b7f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.lang.IgnitePredicate;
 import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -53,8 +52,6 @@ public abstract class GridCacheOffHeapMultiThreadedUpdateAbstractSelfTest extend
         ccfg.setAtomicityMode(atomicityMode());
         ccfg.setCacheMode(PARTITIONED);
         ccfg.setBackups(1);
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setOffHeapMaxMemory(1024 * 1024);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 


[46/57] [abbrv] ignite git commit: Merge remote-tracking branch 'community/ignite-3477-master' into ignite-3477-master

Posted by ag...@apache.org.
Merge remote-tracking branch 'community/ignite-3477-master' into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: d69a5942d8926fa6dcae081f70a61b7a2513798e
Parents: 5e5ffe6 2068a75
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Tue Apr 11 15:32:53 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Tue Apr 11 15:32:53 2017 +0300

----------------------------------------------------------------------
 .../cache/eviction/paged/PageEvictionWithRebalanceTest.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[39/57] [abbrv] ignite git commit: Merge branch master into ignite-3477-master

Posted by ag...@apache.org.
Merge branch master into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: 3eb05de5e2ee0d14567167bfe8547441cae69523
Parents: 8122099 aeacad6
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 13:16:03 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 13:16:03 2017 +0300

----------------------------------------------------------------------
 .../communication/GridIoMessageFactory.java     |   8 +-
 .../GridCachePartitionExchangeManager.java      |   6 +-
 .../processors/cache/GridCachePreloader.java    |   4 +-
 .../cache/GridCachePreloaderAdapter.java        |   4 +-
 .../dht/preloader/GridDhtPartitionDemander.java |   2 +-
 .../dht/preloader/GridDhtPartitionSupplier.java |   8 +-
 .../GridDhtPartitionSupplyMessage.java          | 103 +++--
 .../GridDhtPartitionSupplyMessageV2.java        | 422 -------------------
 .../dht/preloader/GridDhtPreloader.java         |   2 +-
 .../resources/META-INF/classnames.properties    |   1 -
 .../cache/ClusterStateAbstractTest.java         |  10 +-
 .../CacheLateAffinityAssignmentTest.java        |   6 +-
 .../IgniteCacheReadFromBackupTest.java          |   6 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |   3 +-
 14 files changed, 84 insertions(+), 501 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
index b80ad04,7c2599a..f7f0aff
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
@@@ -332,10 -537,8 +334,10 @@@ class GridDhtPartitionSupplier 
                                      if (!reply(node, d, s, scId))
                                          return;
  
-                                     s = new GridDhtPartitionSupplyMessageV2(d.updateSequence(),
+                                     s = new GridDhtPartitionSupplyMessage(d.updateSequence(),
 -                                        cctx.cacheId(), d.topologyVersion(), cctx.deploymentEnabled());
 +                                        cctx.cacheId(),
 +                                        d.topologyVersion(),
 +                                        cctx.deploymentEnabled());
                                  }
                              }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
index cc30321,a01be28..ee461ab
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@@ -66,9 -64,9 +64,14 @@@ public class GridDhtPartitionSupplyMess
      @GridDirectCollection(int.class)
      private Collection<Integer> missed;
  
++    /** Partitions for which we were able to get historical iterator. */
++    @GridToStringInclude
++    @GridDirectCollection(int.class)
++    private Collection<Integer> clean;
++
      /** Entries. */
      @GridDirectMap(keyType = int.class, valueType = CacheEntryInfoCollection.class)
-     private Map<Integer, CacheEntryInfoCollection> infos = new HashMap<>();
+     private Map<Integer, CacheEntryInfoCollection> infos;
  
      /** Message size. */
      @GridDirectTransient
@@@ -159,6 -142,6 +147,25 @@@
      }
  
      /**
++     * @param p Partition to clean.
++     */
++    void clean(int p) {
++        if (clean == null)
++            clean = new HashSet<>();
++
++        if (clean.add(p))
++            msgSize += 4;
++    }
++
++    /**
++     * @param p Partition to check.
++     * @return Check result.
++     */
++    boolean isClean(int p) {
++        return clean != null && clean.contains(p);
++    }
++
++    /**
       * @param p Missed partition.
       */
      void missed(int p) {
@@@ -288,7 -274,7 +298,7 @@@
  
          switch (writer.state()) {
              case 3:
-                 if (!writer.writeBoolean("ack", ack))
 -                if (!writer.writeMap("infos", infos, MessageCollectionItemType.INT, MessageCollectionItemType.MSG))
++                if (!writer.writeCollection("clean", clean, MessageCollectionItemType.INT))
                      return false;
  
                  writer.incrementState();
@@@ -312,13 -298,7 +322,13 @@@
                  writer.incrementState();
  
              case 7:
-                 if (!writer.writeLong("updateSeq", updateSeq))
++                if (!writer.writeMessage("topVer", topVer))
 +                    return false;
 +
 +                writer.incrementState();
 +
 +            case 8:
-                 if (!writer.writeInt("workerId", workerId))
+                 if (!writer.writeLong("updateSeq", updateSeq))
                      return false;
  
                  writer.incrementState();
@@@ -340,7 -320,7 +350,7 @@@
  
          switch (reader.state()) {
              case 3:
-                 ack = reader.readBoolean("ack");
 -                infos = reader.readMap("infos", MessageCollectionItemType.INT, MessageCollectionItemType.MSG, false);
++                clean = reader.readCollection("clean", MessageCollectionItemType.INT);
  
                  if (!reader.isLastRead())
                      return false;
@@@ -372,15 -352,7 +382,15 @@@
                  reader.incrementState();
  
              case 7:
-                 updateSeq = reader.readLong("updateSeq");
++                topVer = reader.readMessage("topVer");
 +
 +                if (!reader.isLastRead())
 +                    return false;
 +
 +                reader.incrementState();
 +
 +            case 8:
-                 workerId = reader.readInt("workerId");
+                 updateSeq = reader.readLong("updateSeq");
  
                  if (!reader.isLastRead())
                      return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --cc modules/core/src/main/resources/META-INF/classnames.properties
index 473f176,8c5a72e..335a33f
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@@ -763,9 -740,9 +763,8 @@@ org.apache.ignite.internal.processors.c
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap
 -org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$1
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$SupplyContextPhase
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
- org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$1
  org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$2

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java
index f095e79,0000000..ce7829a
mode 100644,000000..100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/ClusterStateAbstractTest.java
@@@ -1,439 -1,0 +1,439 @@@
 +/*
 + * 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.apache.ignite.internal.processors.cache;
 +
 +import java.util.Collection;
 +import java.util.concurrent.CountDownLatch;
 +import java.util.concurrent.TimeUnit;
 +import java.util.concurrent.atomic.AtomicReference;
 +import java.util.concurrent.locks.Lock;
 +import org.apache.ignite.Ignite;
 +import org.apache.ignite.IgniteCache;
 +import org.apache.ignite.IgniteException;
 +import org.apache.ignite.cluster.ClusterNode;
 +import org.apache.ignite.configuration.CacheConfiguration;
 +import org.apache.ignite.configuration.IgniteConfiguration;
 +import org.apache.ignite.internal.IgniteEx;
 +import org.apache.ignite.internal.IgniteInternalFuture;
 +import org.apache.ignite.internal.managers.communication.GridIoMessage;
 +import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
- import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
++import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 +import org.apache.ignite.internal.util.GridConcurrentHashSet;
 +import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 +import org.apache.ignite.internal.util.typedef.internal.U;
 +import org.apache.ignite.lang.IgniteInClosure;
 +import org.apache.ignite.plugin.extensions.communication.Message;
 +import org.apache.ignite.spi.IgniteSpiException;
 +import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
 +import org.apache.ignite.testframework.GridTestUtils;
 +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 +import org.apache.ignite.transactions.Transaction;
 +
 +import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 +import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
 +
 +/**
 + *
 + */
 +@SuppressWarnings("TooBroadScope")
 +public abstract class ClusterStateAbstractTest extends GridCommonAbstractTest {
 +    /** Entry count. */
 +    public static final int ENTRY_CNT = 5000;
 +
 +    /** */
 +    public static final int GRID_CNT = 4;
 +
 +    /** */
 +    private static final String CACHE_NAME = "cache1";
 +
 +    /** */
 +    private static final Collection<Class> forbidden = new GridConcurrentHashSet<>();
 +
 +    /** */
 +    private static AtomicReference<Exception> errEncountered = new AtomicReference<>();
 +
 +    /** */
 +    private boolean activeOnStart = true;
 +
 +    /** */
 +    private boolean client;
 +
 +    /** {@inheritDoc} */
 +    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
 +        IgniteConfiguration cfg = super.getConfiguration(gridName);
 +
 +        cfg.setActiveOnStart(activeOnStart);
 +
 +        cfg.setCacheConfiguration(cacheConfiguration(CACHE_NAME));
 +
 +        if (client)
 +            cfg.setClientMode(true);
 +
 +        cfg.setCommunicationSpi(new TestCommunicationSpi());
 +
 +        return cfg;
 +    }
 +
 +    /**
 +     * @param cacheName Cache name.
 +     * @return Cache configuration.
 +     */
 +    protected abstract CacheConfiguration cacheConfiguration(String cacheName);
 +
 +    /** {@inheritDoc} */
 +    @Override protected void afterTest() throws Exception {
 +        stopAllGrids();
 +
 +        forbidden.clear();
 +
 +        Exception err = errEncountered.getAndSet(null);
 +
 +        if (err != null)
 +            throw err;
 +    }
 +
 +    /**
 +     * @throws Exception if failed.
 +     */
 +    public void testDynamicCacheStart() throws Exception {
 +        activeOnStart = false;
 +
-         forbidden.add(GridDhtPartitionSupplyMessageV2.class);
++        forbidden.add(GridDhtPartitionSupplyMessage.class);
 +        forbidden.add(GridDhtPartitionDemandMessage.class);
 +
 +        startGrids(GRID_CNT);
 +
 +        checkInactive(GRID_CNT);
 +
 +        forbidden.clear();
 +
 +        grid(0).active(true);
 +
 +        IgniteCache<Object, Object> cache2 = grid(0).createCache(new CacheConfiguration<>("cache2"));
 +
 +        for (int k = 0; k < ENTRY_CNT; k++)
 +            cache2.put(k, k);
 +
 +        grid(0).active(false);
 +
 +        checkInactive(GRID_CNT);
 +
 +        stopAllGrids();
 +    }
 +
 +    /**
 +     * @throws Exception if failed.
 +     */
 +    public void testNoRebalancing() throws Exception {
 +        activeOnStart = false;
 +
-         forbidden.add(GridDhtPartitionSupplyMessageV2.class);
++        forbidden.add(GridDhtPartitionSupplyMessage.class);
 +        forbidden.add(GridDhtPartitionDemandMessage.class);
 +
 +        startGrids(GRID_CNT);
 +
 +        checkInactive(GRID_CNT);
 +
 +        forbidden.clear();
 +
 +        grid(0).active(true);
 +
 +        awaitPartitionMapExchange();
 +
 +        final IgniteCache<Object, Object> cache = grid(0).cache(CACHE_NAME);
 +
 +        for (int k = 0; k < ENTRY_CNT; k++)
 +            cache.put(k, k);
 +
 +        for (int g = 0; g < GRID_CNT; g++) {
 +            // Tests that state changes are propagated to existing and new nodes.
 +            assertTrue(grid(g).active());
 +
 +            IgniteCache<Object, Object> cache0 = grid(g).cache(CACHE_NAME);
 +
 +            for (int k = 0; k < ENTRY_CNT; k++)
 +                assertEquals(k,  cache0.get(k));
 +        }
 +
 +        // Check that new node startup and shutdown works fine after activation.
 +        startGrid(GRID_CNT);
 +        startGrid(GRID_CNT + 1);
 +
 +        for (int g = 0; g < GRID_CNT + 2; g++) {
 +            IgniteCache<Object, Object> cache0 = grid(g).cache(CACHE_NAME);
 +
 +            for (int k = 0; k < ENTRY_CNT; k++)
 +                assertEquals("Failed for [grid=" + g + ", key=" + k + ']', k, cache0.get(k));
 +        }
 +
 +        stopGrid(GRID_CNT + 1);
 +
 +        for (int g = 0; g < GRID_CNT + 1; g++)
 +            grid(g).cache(CACHE_NAME).rebalance().get();
 +
 +        stopGrid(GRID_CNT);
 +
 +        for (int g = 0; g < GRID_CNT; g++) {
 +            IgniteCache<Object, Object> cache0 = grid(g).cache(CACHE_NAME);
 +
 +            for (int k = 0; k < ENTRY_CNT; k++)
 +                assertEquals(k,  cache0.get(k));
 +        }
 +
 +        grid(0).active(false);
 +
 +        GridTestUtils.waitForCondition(new GridAbsPredicate() {
 +            @Override public boolean apply() {
 +                for (int g = 0; g < GRID_CNT; g++) {
 +                    if (grid(g).active())
 +                        return false;
 +                }
 +
 +                return true;
 +            }
 +        }, 5000);
 +
 +        checkInactive(GRID_CNT);
 +
-         forbidden.add(GridDhtPartitionSupplyMessageV2.class);
++        forbidden.add(GridDhtPartitionSupplyMessage.class);
 +        forbidden.add(GridDhtPartitionDemandMessage.class);
 +
 +        // Should stop without exchange.
 +        stopAllGrids();
 +    }
 +
 +    /**
 +     * @throws Exception if failed.
 +     */
 +    public void testActivationFromClient() throws Exception {
-         forbidden.add(GridDhtPartitionSupplyMessageV2.class);
++        forbidden.add(GridDhtPartitionSupplyMessage.class);
 +        forbidden.add(GridDhtPartitionDemandMessage.class);
 +
 +        activeOnStart = false;
 +
 +        startGrids(GRID_CNT);
 +
 +        client = true;
 +
 +        startGrid(GRID_CNT);
 +
 +        checkInactive(GRID_CNT + 1);
 +
 +        Ignite cl = grid(GRID_CNT);
 +
 +        forbidden.clear();
 +
 +        cl.active(true);
 +
 +        awaitPartitionMapExchange();
 +
 +        IgniteCache<Object, Object> cache = cl.cache(CACHE_NAME);
 +
 +        for (int k = 0; k < ENTRY_CNT; k++)
 +            cache.put(k, k);
 +
 +        for (int g = 0; g < GRID_CNT + 1; g++) {
 +            // Tests that state changes are propagated to existing and new nodes.
 +            assertTrue(grid(g).active());
 +
 +            IgniteCache<Object, Object> cache0 = grid(g).cache(CACHE_NAME);
 +
 +            for (int k = 0; k < ENTRY_CNT; k++)
 +                assertEquals(k,  cache0.get(k));
 +        }
 +
 +        cl.active(false);
 +
 +        GridTestUtils.waitForCondition(new GridAbsPredicate() {
 +            @Override public boolean apply() {
 +                for (int g = 0; g < GRID_CNT + 1; g++) {
 +                    if (grid(g).active())
 +                        return false;
 +                }
 +
 +                return true;
 +            }
 +        }, 5000);
 +
 +        checkInactive(GRID_CNT + 1);
 +    }
 +
 +    /**
 +     * Tests that state doesn't change until all acquired locks are released.
 +     *
 +     * @throws Exception If fails.
 +     */
 +    public void testDeactivationWithPendingLock() throws Exception {
 +        fail("https://issues.apache.org/jira/browse/IGNITE-4931");
 +
 +        startGrids(GRID_CNT);
 +
 +        final CountDownLatch finishedLatch = new CountDownLatch(1);
 +
 +        Lock lock = grid(0).cache(CACHE_NAME).lock(1);
 +
 +        IgniteInternalFuture<?> fut;
 +
 +        lock.lock();
 +
 +        try {
 +            fut = multithreadedAsync(new Runnable() {
 +                @Override public void run() {
 +                    grid(1).active(false);
 +
 +                    finishedLatch.countDown();
 +                }
 +            }, 1);
 +
 +            U.sleep(2000);
 +
 +            assert !fut.isDone();
 +
 +            boolean hasActive = false;
 +
 +            for (int g = 0; g < GRID_CNT; g++) {
 +                IgniteEx grid = grid(g);
 +
 +                if (grid.active()) {
 +                    hasActive = true;
 +
 +                    break;
 +                }
 +
 +            }
 +
 +            assertTrue(hasActive);
 +        }
 +        finally {
 +            lock.unlock();
 +        }
 +
 +        fut.get(getTestTimeout(), TimeUnit.MILLISECONDS);
 +
 +        checkInactive(GRID_CNT);
 +
 +        finishedLatch.await();
 +    }
 +
 +    /**
 +     * Tests that state doesn't change until all pending transactions are finished.
 +     *
 +     * @throws Exception If fails.
 +     */
 +    public void testDeactivationWithPendingTransaction() throws Exception {
 +        fail("https://issues.apache.org/jira/browse/IGNITE-4931");
 +
 +        startGrids(GRID_CNT);
 +
 +        final CountDownLatch finishedLatch = new CountDownLatch(1);
 +
 +        final Ignite ignite0 = grid(0);
 +
 +        final IgniteCache<Object, Object> cache0 = ignite0.cache(CACHE_NAME);
 +
 +        IgniteInternalFuture<?> fut;
 +
 +        try (Transaction tx = ignite0.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
 +            cache0.get(1);
 +
 +            fut = multithreadedAsync(new Runnable() {
 +                @Override public void run() {
 +                    ignite0.active(false);
 +
 +                    finishedLatch.countDown();
 +                }
 +            }, 1);
 +
 +            U.sleep(2000);
 +
 +            assert !fut.isDone();
 +
 +            boolean hasActive = false;
 +
 +            for (int g = 0; g < GRID_CNT; g++) {
 +                IgniteEx grid = grid(g);
 +
 +                if (grid.active()) {
 +                    hasActive = true;
 +
 +                    break;
 +                }
 +
 +            }
 +
 +            assertTrue(hasActive);
 +
 +            cache0.put(1, 2);
 +
 +            tx.commit();
 +        }
 +
 +        fut.get(getTestTimeout(), TimeUnit.MILLISECONDS);
 +
 +        checkInactive(GRID_CNT);
 +
 +        ignite0.active(true);
 +
 +        for (int g = 0; g < GRID_CNT; g++)
 +            assertEquals(2, grid(g).cache(CACHE_NAME).get(1));
 +
 +        finishedLatch.await();
 +    }
 +
 +    /**
 +     *
 +     */
 +    private void checkInactive(int cnt) {
 +        for (int g = 0; g < cnt; g++)
 +            assertFalse(grid(g).active());
 +    }
 +
 +    /**
 +     *
 +     */
 +    private static class TestCommunicationSpi extends TcpCommunicationSpi {
 +        /** {@inheritDoc} */
 +        @Override public void sendMessage(ClusterNode node, Message msg, IgniteInClosure<IgniteException> ackC) throws IgniteSpiException {
 +            checkForbidden((GridIoMessage)msg);
 +
 +            super.sendMessage(node, msg, ackC);
 +        }
 +
 +        /** {@inheritDoc} */
 +        @Override public void sendMessage(ClusterNode node, Message msg) throws IgniteSpiException {
 +            checkForbidden((GridIoMessage)msg);
 +
 +            super.sendMessage(node, msg);
 +        }
 +
 +        /**
 +         * @param msg Message to check.
 +         */
 +        private void checkForbidden(GridIoMessage msg) {
 +            if (forbidden.contains(msg.message().getClass())) {
 +                IgniteSpiException err = new IgniteSpiException("Message is forbidden for this test: " + msg.message());
 +
 +                // Set error in case if this exception is not visible to the user code.
 +                errEncountered.compareAndSet(null, err);
 +
 +                throw err;
 +            }
 +        }
 +    }
 +}

http://git-wip-us.apache.org/repos/asf/ignite/blob/3eb05de5/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
----------------------------------------------------------------------


[10/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index e2cf734..d268e47 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -36,6 +36,7 @@ import org.apache.ignite.IgniteException;
 import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi;
@@ -100,6 +101,9 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     protected CacheRebalanceMode rebalancMode = ASYNC;
 
     /** */
+    protected boolean evict = false;
+
+    /** */
     protected int rebalancBatchSize = DFLT_BATCH_SIZE;
 
     /** Number of partitions. */
@@ -115,9 +119,6 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     private int retries = DFLT_RETRIES;
 
     /** */
-    private GridTestUtils.TestMemoryMode memMode = GridTestUtils.TestMemoryMode.HEAP;
-
-    /** */
     private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
     /** {@inheritDoc} */
@@ -139,7 +140,14 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
 
         CacheConfiguration ccfg = cacheConfiguration();
 
-        GridTestUtils.setMemoryMode(c, ccfg, memMode, 100, 1024);
+        if (evict) {
+            LruEvictionPolicy plc = new LruEvictionPolicy();
+
+            plc.setMaxSize(100);
+
+            ccfg.setEvictionPolicy(plc);
+            ccfg.setOnheapCacheEnabled(true);
+        }
 
         c.setCacheConfiguration(ccfg);
 
@@ -166,6 +174,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         backups = DFLT_BACKUPS;
         partitions = DFLT_PARTITIONS;
         rebalancMode = ASYNC;
+        evict = false;
         rebalancBatchSize = DFLT_BATCH_SIZE;
         nodeCnt = DFLT_NODE_CNT;
         keyCnt = DFLT_KEY_CNT;
@@ -188,7 +197,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     /**
      * @throws Exception If failed.
      */
-    private void startGrids() throws  Exception {
+    private void startGrids() throws Exception {
         for (int i = 0; i < nodeCnt; i++) {
             startGrid(i);
 
@@ -282,6 +291,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 30000;
 
@@ -297,6 +307,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 30000;
 
@@ -312,6 +323,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 30000;
 
@@ -327,6 +339,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 30000;
 
@@ -342,6 +355,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 60000;
 
@@ -357,6 +371,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 60000;
 
@@ -372,6 +387,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 60000;
 
@@ -381,52 +397,15 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     /**
      * @throws Exception If failed.
      */
-    public void testRestartWithPutFourNodesOneBackupsSwap() throws Throwable {
-        restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithPutFourNodesOneBackupsOffheapTiered() throws Throwable {
-        restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithPutFourNodesOneBackupsOffheapTieredSwap() throws Throwable {
-        restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testRestartWithPutFourNodesOneBackupsOffheapEvict() throws Throwable {
-        restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithPutFourNodesOneBackupsOffheapEvictSwap() throws Throwable {
-        restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP);
-    }
-
-    /**
-     * @param memMode Memory mode.
-     * @throws Throwable If failed.
-     */
-    private void restartWithPutFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode memMode)
-        throws Throwable {
         backups = 1;
         nodeCnt = 4;
-        keyCnt = 100_000;
+        keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
-        this.memMode = memMode;
+        evict = true;
 
-        long duration = 30_000;
+        long duration = 60000;
 
         checkRestartWithPut(duration, 2, 2);
     }
@@ -440,6 +419,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 60000;
 
@@ -449,49 +429,13 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
     /**
      * @throws Exception If failed.
      */
-    public void testRestartWithTxFourNodesOneBackupsSwap() throws Throwable {
-        restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithTxFourNodesOneBackupsOffheapTiered() throws Throwable {
-        restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithTxFourNodesOneBackupsOffheapTieredSwap() throws Throwable {
-        restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testRestartWithTxFourNodesOneBackupsOffheapEvict() throws Throwable {
-        restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRestartWithTxFourNodesOneBackupsOffheapEvictSwap() throws Throwable {
-        restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP);
-    }
-
-    /**
-     * @param memMode Memory mode.
-     * @throws Throwable If failed.
-     */
-    private void restartWithTxFourNodesOneBackupsWithMemoryMode(GridTestUtils.TestMemoryMode memMode) throws Throwable {
         backups = 1;
         nodeCnt = 4;
         keyCnt = 100_000;
         partitions = 29;
         rebalancMode = ASYNC;
-        this.memMode = memMode;
+        evict = true;
 
         long duration = 30_000;
 
@@ -507,6 +451,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -522,6 +467,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -537,6 +483,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -552,6 +499,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -567,6 +515,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -582,6 +531,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -597,6 +547,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 
@@ -612,6 +563,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
         keyCnt = 10;
         partitions = 29;
         rebalancMode = ASYNC;
+        evict = false;
 
         long duration = 90000;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
index ba412d7..16ebf7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractPartitionedByteArrayValuesSelfTest.java
@@ -23,8 +23,6 @@ import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -55,37 +53,6 @@ public abstract class GridCacheAbstractPartitionedByteArrayValuesSelfTest extend
         cfg.setNearConfiguration(nearConfiguration());
         cfg.setBackups(1);
         cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setEvictSynchronized(false);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration offheapCacheConfiguration0() {
-        CacheConfiguration cfg = new CacheConfiguration();
-
-        cfg.setCacheMode(PARTITIONED);
-        cfg.setAtomicityMode(TRANSACTIONAL);
-        cfg.setNearConfiguration(nearConfiguration());
-        cfg.setBackups(1);
-        cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setMemoryMode(OFFHEAP_VALUES);
-        cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration offheapTieredCacheConfiguration0() {
-        CacheConfiguration cfg = new CacheConfiguration();
-
-        cfg.setCacheMode(PARTITIONED);
-        cfg.setAtomicityMode(TRANSACTIONAL);
-        cfg.setNearConfiguration(nearConfiguration());
-        cfg.setBackups(1);
-        cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setMemoryMode(OFFHEAP_TIERED);
-        cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
 
         return cfg;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
index 37ed866..6b62912 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheAtomicNodeRestartTest.java
@@ -35,9 +35,4 @@ public class IgniteCacheAtomicNodeRestartTest extends GridCachePartitionedNodeRe
     @Override public void testRestartWithPutFourNodesNoBackups() {
         fail("https://issues.apache.org/jira/browse/IGNITE-1587");
     }
-
-    /** {@inheritDoc} */
-    @Override public void testRestartWithPutFourNodesOneBackupsOffheapTiered() {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1587");
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
deleted file mode 100644
index 0635b2d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheNearOffheapGetSelfTest.java
+++ /dev/null
@@ -1,136 +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.apache.ignite.internal.processors.cache.distributed;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteState;
-import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class IgniteCacheNearOffheapGetSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        if (nearEnabled())
-            grid(gridCount() - 1).getOrCreateCache(new CacheConfiguration(), nearConfiguration());
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        NearCacheConfiguration nearCfg = super.nearConfiguration();
-
-        nearCfg.setNearEvictionPolicy(new FifoEvictionPolicy(100));
-
-        return nearCfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        if (getTestIgniteInstanceName(gridCount() - 1).equals(igniteInstanceName)) {
-            cfg.setClientMode(true);
-
-            cfg.setCacheConfiguration();
-        }
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setBackups(1);
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    @Override
-    protected long getTestTimeout() {
-        return Long.MAX_VALUE;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testGetFromNear() throws Exception {
-
-        IgniteCache<Object, Object> nearOnly = ignite(gridCount() - 1).cache(null);
-
-        // Start extra node.
-        IgniteEx ignite = startGrid(gridCount());
-
-        try {
-            final int keyCnt = 30;
-
-            for (int i = 0; i < keyCnt; i++)
-                ignite(0).cache(null).put(i, i);
-
-            for (int i = 0; i < keyCnt; i++)
-                assertEquals(i, nearOnly.get(i));
-
-            Collection<Integer> invalidatedKeys = new ArrayList<>();
-
-            Affinity<Object> cacheAff = ignite.affinity(null);
-
-            // Going to stop the last node.
-            for (int i = 0; i < keyCnt; i++) {
-                if (cacheAff.mapKeyToNode(i).equals(ignite.localNode()))
-                    invalidatedKeys.add(i);
-            }
-
-            stopGrid(gridCount());
-
-            for (Integer key : invalidatedKeys)
-                assertEquals(key, nearOnly.get(key));
-        }
-        finally {
-            if (Ignition.state(getTestIgniteInstanceName(gridCount())) == IgniteState.STARTED)
-                stopGrid(gridCount());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
index 2d9442c..cdf996d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxIteratorSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.distributed;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -62,7 +61,6 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
     private CacheConfiguration<String, TestClass> cacheConfiguration(
         CacheMode mode,
         CacheAtomicityMode atomMode,
-        CacheMemoryMode memMode,
         boolean nearEnabled,
         boolean useEvictPlc
     ) {
@@ -70,15 +68,14 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
 
         ccfg.setAtomicityMode(atomMode);
         ccfg.setCacheMode(mode);
-        ccfg.setMemoryMode(memMode);
         ccfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
         if (nearEnabled)
             ccfg.setNearConfiguration(new NearCacheConfiguration<String, TestClass>());
 
-        if (memMode == CacheMemoryMode.ONHEAP_TIERED && useEvictPlc) {
-            ccfg.setOffHeapMaxMemory(10 * 1024 * 1024);
+        if (useEvictPlc) {
             ccfg.setEvictionPolicy(new FifoEvictionPolicy(50));
+            ccfg.setOnheapCacheEnabled(true);
         }
 
         return ccfg;
@@ -107,17 +104,14 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
         try {
             for (CacheMode mode : CacheMode.values()) {
                 for (CacheAtomicityMode atomMode : CacheAtomicityMode.values()) {
-                    for (CacheMemoryMode memMode : CacheMemoryMode.values()) {
-                        if (mode == CacheMode.PARTITIONED) {
-                            // Near cache makes sense only for partitioned cache.
-                            checkTxCache(CacheMode.PARTITIONED, atomMode, memMode, true, false);
-                        }
+                    if (mode == CacheMode.PARTITIONED) {
+                        // Near cache makes sense only for partitioned cache.
+                        checkTxCache(CacheMode.PARTITIONED, atomMode, true, false);
+                    }
 
-                        if (memMode == CacheMemoryMode.ONHEAP_TIERED)
-                            checkTxCache(mode, atomMode, CacheMemoryMode.ONHEAP_TIERED, false, true);
+                    checkTxCache(CacheMode.PARTITIONED, atomMode, false, true);
 
-                        checkTxCache(mode, atomMode, memMode, false, false);
-                    }
+                    checkTxCache(CacheMode.PARTITIONED, atomMode, false, false);
                 }
             }
         }
@@ -132,7 +126,6 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
     private void checkTxCache(
         CacheMode mode,
         CacheAtomicityMode atomMode,
-        CacheMemoryMode memMode,
         boolean nearEnabled,
         boolean useEvicPlc
     ) throws Exception {
@@ -141,14 +134,13 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
         final CacheConfiguration<String, TestClass> ccfg = cacheConfiguration(
             mode,
             atomMode,
-            memMode,
             nearEnabled,
             useEvicPlc);
 
         final IgniteCache<String, TestClass> cache = ignite.createCache(ccfg);
 
-        info("Checking cache [mode=" + mode + ", atomMode=" + atomMode + ", memMode=" + memMode +
-            ", near=" + nearEnabled + ']');
+        info("Checking cache [mode=" + mode + ", atomMode=" + atomMode + ", near=" + nearEnabled +
+            ", evict=" + useEvicPlc + ']');
 
         try {
             for (int i = 0; i < 30; i++) {
@@ -213,8 +205,10 @@ public class IgniteCacheTxIteratorSelfTest extends GridCommonAbstractTest {
          */
         @Override
         public boolean equals(final Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if (this == o)
+                return true;
+            if (o == null || getClass() != o.getClass())
+                return false;
 
             final TestClass testCls = (TestClass)o;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
index 0151be5..affac28 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest.java
@@ -38,18 +38,9 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
     /** Offheap cache name. */
     protected static final String CACHE_ATOMIC_OFFHEAP = "cache_atomic_offheap";
 
-    /** Offheap tiered cache name. */
-    protected static final String CACHE_ATOMIC_OFFHEAP_TIERED = "cache_atomic_offheap_tiered";
-
     /** Atomic caches. */
     private static IgniteCache<Integer, Object>[] cachesAtomic;
 
-    /** Atomic offheap caches. */
-    private static IgniteCache<Integer, Object>[] cachesAtomicOffheap;
-
-    /** Atomic offheap caches. */
-    private static IgniteCache<Integer, Object>[] cachesAtomicOffheapTiered;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
@@ -60,24 +51,7 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
         atomicCacheCfg.setAtomicityMode(ATOMIC);
         atomicCacheCfg.setAtomicWriteOrderMode(PRIMARY);
 
-        CacheConfiguration atomicOffheapCacheCfg = offheapCacheConfiguration0();
-
-        atomicOffheapCacheCfg.setName(CACHE_ATOMIC_OFFHEAP);
-        atomicOffheapCacheCfg.setAtomicityMode(ATOMIC);
-        atomicOffheapCacheCfg.setAtomicWriteOrderMode(PRIMARY);
-
-        CacheConfiguration atomicOffheapTieredCacheCfg = offheapTieredCacheConfiguration();
-
-        atomicOffheapTieredCacheCfg.setName(CACHE_ATOMIC_OFFHEAP_TIERED);
-        atomicOffheapTieredCacheCfg.setAtomicityMode(ATOMIC);
-        atomicOffheapTieredCacheCfg.setAtomicWriteOrderMode(PRIMARY);
-
-        c.setCacheConfiguration(cacheConfiguration(),
-            offheapCacheConfiguration(),
-            offheapTieredCacheConfiguration(),
-            atomicCacheCfg,
-            atomicOffheapCacheCfg,
-            atomicOffheapTieredCacheCfg);
+        c.setCacheConfiguration(cacheConfiguration(), atomicCacheCfg);
 
         c.setPeerClassLoadingEnabled(peerClassLoading());
 
@@ -97,21 +71,14 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
         int gridCnt = gridCount();
 
         cachesAtomic = new IgniteCache[gridCnt];
-        cachesAtomicOffheap = new IgniteCache[gridCnt];
-        cachesAtomicOffheapTiered = new IgniteCache[gridCnt];
 
-        for (int i = 0; i < gridCount(); i++) {
+        for (int i = 0; i < gridCount(); i++)
             cachesAtomic[i] = ignites[i].cache(CACHE_ATOMIC);
-            cachesAtomicOffheap[i] = ignites[i].cache(CACHE_ATOMIC_OFFHEAP);
-            cachesAtomicOffheapTiered[i] = ignites[i].cache(CACHE_ATOMIC_OFFHEAP_TIERED);
-        }
     }
 
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         cachesAtomic = null;
-        cachesAtomicOffheap = null;
-        cachesAtomicOffheapTiered = null;
 
         super.afterTestsStopped();
     }
@@ -126,24 +93,6 @@ public abstract class GridCacheAbstractPartitionedOnlyByteArrayValuesSelfTest ex
     }
 
     /**
-     * Test atomic offheap cache.
-     *
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheap() throws Exception {
-        testAtomic0(cachesAtomicOffheap);
-    }
-
-    /**
-     * Test atomic offheap cache.
-     *
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTiered() throws Exception {
-        testAtomic0(cachesAtomicOffheapTiered);
-    }
-
-    /**
      * INternal routine for ATOMIC cache testing.
      *
      * @param caches Caches.

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
index f056825..e32d4a1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedOptimisticTransactionSelfTest.java
@@ -77,7 +77,6 @@ public class GridCacheColocatedOptimisticTransactionSelfTest extends GridCommonA
         cc.setNearConfiguration(null);
         cc.setBackups(1);
         cc.setWriteSynchronizationMode(FULL_SYNC);
-        cc.setEvictSynchronized(false);
 
         c.setDiscoverySpi(disco);
         c.setCacheConfiguration(cc);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
index 2d2ef41..20162a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionNearReadersSelfTest.java
@@ -76,19 +76,15 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT
 
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
-        cacheCfg.setEvictSynchronized(true);
         cacheCfg.setRebalanceMode(SYNC);
         cacheCfg.setAtomicityMode(atomicityMode());
         cacheCfg.setBackups(1);
 
-        // Set eviction queue size explicitly.
-        cacheCfg.setEvictSynchronizedKeyBufferSize(1);
-        cacheCfg.setEvictMaxOverflowRatio(0);
-
         FifoEvictionPolicy plc = new FifoEvictionPolicy();
         plc.setMaxSize(10);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
deleted file mode 100644
index b177a86..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEvictionSelfTest.java
+++ /dev/null
@@ -1,356 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheAdapter;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.lang.IgnitePredicate;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheRebalanceMode.NONE;
-import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-
-/**
- * Tests for dht cache eviction.
- */
-public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static final int GRID_CNT = 2;
-
-    /** */
-    private TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** Default constructor. */
-    public GridCacheDhtEvictionSelfTest() {
-        super(false /* don't start grid. */);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        CacheConfiguration cacheCfg = defaultCacheConfiguration();
-
-        cacheCfg.setCacheMode(PARTITIONED);
-        cacheCfg.setRebalanceMode(NONE);
-        cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
-        cacheCfg.setEvictSynchronized(true);
-        cacheCfg.setAtomicityMode(TRANSACTIONAL);
-        cacheCfg.setBackups(1);
-
-        NearCacheConfiguration nearCfg = new NearCacheConfiguration();
-
-        FifoEvictionPolicy nearPlc = new FifoEvictionPolicy();
-        nearPlc.setMaxSize(10000);
-
-        nearCfg.setNearEvictionPolicy(nearPlc);
-        cacheCfg.setNearConfiguration(nearCfg);
-
-        // Set eviction queue size explicitly.
-        cacheCfg.setEvictMaxOverflowRatio(0);
-        cacheCfg.setEvictSynchronizedKeyBufferSize(1);
-
-        FifoEvictionPolicy plc = new FifoEvictionPolicy();
-        plc.setMaxSize(10000);
-
-        cacheCfg.setEvictionPolicy(plc);
-
-        cfg.setCacheConfiguration(cacheCfg);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"ConstantConditions"})
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        if (GRID_CNT < 2)
-            throw new IgniteCheckedException("GRID_CNT must not be less than 2.");
-
-        startGrids(GRID_CNT);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"SizeReplaceableByIsEmpty"})
-    @Override protected void beforeTest() throws Exception {
-        for (int i = 0; i < GRID_CNT; i++) {
-            assert near(grid(i)).size() == 0;
-            assert dht(grid(i)).size() == 0;
-
-            assert near(grid(i)).isEmpty();
-            assert dht(grid(i)).isEmpty();
-        }
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings({"unchecked"})
-    @Override protected void afterTest() throws Exception {
-        for (int i = 0; i < GRID_CNT; i++) {
-            near(grid(i)).removeAll();
-
-            assert near(grid(i)).isEmpty() : "Near cache is not empty [idx=" + i + "]";
-            assert dht(grid(i)).isEmpty() : "Dht cache is not empty [idx=" + i + "]";
-        }
-    }
-
-    /**
-     * @param g Grid.
-     * @return Near cache.
-     */
-    @SuppressWarnings({"unchecked"})
-    private GridNearCacheAdapter<Integer, String> near(Ignite g) {
-        return (GridNearCacheAdapter)((IgniteKernal)g).internalCache();
-    }
-
-    /**
-     * @param g Grid.
-     * @return Dht cache.
-     */
-    @SuppressWarnings({"unchecked", "TypeMayBeWeakened"})
-    private GridDhtCacheAdapter<Integer, String> dht(Ignite g) {
-        return ((GridNearCacheAdapter)((IgniteKernal)g).internalCache()).dht();
-    }
-
-    /**
-     * @param key Key.
-     * @return Primary node for the given key.
-     */
-    private Collection<ClusterNode> keyNodes(Object key) {
-        return grid(0).affinity(null).mapKeyToPrimaryAndBackups(key);
-    }
-
-    /**
-     * @param nodeId Node id.
-     * @return Predicate for events belonging to specified node.
-     */
-    private IgnitePredicate<Event> nodeEvent(final UUID nodeId) {
-        assert nodeId != null;
-
-        return new P1<Event>() {
-            @Override public boolean apply(Event e) {
-                info("Predicate called [e.nodeId()=" + e.node().id() + ", nodeId=" + nodeId + ']');
-
-                return e.node().id().equals(nodeId);
-            }
-        };
-    }
-
-    /**
-     * JUnit.
-     *
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("NullArgumentToVariableArgMethod")
-    public void testSingleKey() throws Exception {
-        Integer key = 1;
-
-        Collection<ClusterNode> nodes = new ArrayList<>(keyNodes(key));
-
-        ClusterNode primary = F.first(nodes);
-
-        assert primary != null;
-
-        nodes.remove(primary);
-
-        ClusterNode backup = F.first(nodes);
-
-        assert backup != null;
-
-        assert !F.eqNodes(primary, backup);
-
-        info("Key primary node: " + primary.id());
-        info("Key backup node: " + backup.id());
-
-        GridNearCacheAdapter<Integer, String> nearPrimary = near(grid(primary));
-        GridDhtCacheAdapter<Integer, String> dhtPrimary = dht(grid(primary));
-
-        GridNearCacheAdapter<Integer, String> nearBackup = near(grid(backup));
-        GridDhtCacheAdapter<Integer, String> dhtBackup = dht(grid(backup));
-
-        String val = "v1";
-
-        // Put on primary node.
-        nearPrimary.getAndPut(key, val, null);
-
-        assertEquals(val, localPeek(nearPrimary, key));
-        assertEquals(val, localPeek(dhtPrimary, key));
-
-        assertEquals(val, localPeek(nearBackup, key));
-        assertEquals(val, localPeek(dhtBackup, key));
-
-        GridDhtCacheEntry entryPrimary = (GridDhtCacheEntry)dhtPrimary.peekEx(key);
-        GridDhtCacheEntry entryBackup = (GridDhtCacheEntry)dhtBackup.peekEx(key);
-
-        assert entryPrimary != null;
-        assert entryBackup != null;
-
-        assertTrue(entryPrimary.readers().isEmpty());
-        assertTrue(entryBackup.readers().isEmpty());
-
-        IgniteFuture<Event> futBackup =
-            waitForLocalEvent(grid(backup).events(), nodeEvent(backup.id()), EVT_CACHE_ENTRY_EVICTED);
-
-        IgniteFuture<Event> futPrimary =
-            waitForLocalEvent(grid(primary).events(), nodeEvent(primary.id()), EVT_CACHE_ENTRY_EVICTED);
-
-        // Evict on primary node.
-        // It should trigger dht eviction and eviction on backup node.
-        grid(primary).cache(null).localEvict(Collections.<Object>singleton(key));
-
-        // Give some time for eviction event to occur on backup and primary node.
-        futBackup.get(10_000);
-        futPrimary.get(10_000);
-
-        assertEquals(0, nearPrimary.size());
-
-        assertNull(nearPrimary.peekEx(key));
-        assertNull(dhtPrimary.peekEx(key));
-
-        assertNull(nearBackup.peekEx(key));
-        assertNull(dhtBackup.peekEx(key));
-    }
-
-    /**
-     * JUnit.
-     *
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("NullArgumentToVariableArgMethod")
-    public void testMultipleKeys() throws Exception {
-        final int keyCnt = 1000;
-
-        final Ignite primaryIgnite = grid(0);
-        final Ignite backupIgnite = grid(1);
-
-        GridNearCacheAdapter<Integer, String> nearPrimary = near(primaryIgnite);
-        GridDhtCacheAdapter<Integer, String> dhtPrimary = dht(primaryIgnite);
-
-        GridNearCacheAdapter<Integer, String> nearBackup = near(backupIgnite);
-        GridDhtCacheAdapter<Integer, String> dhtBackup = dht(backupIgnite);
-
-        Collection<Integer> keys = new ArrayList<>(keyCnt);
-
-        for (int key = 0; keys.size() < keyCnt; key++) {
-            if (F.eqNodes(primaryIgnite.cluster().localNode(), F.first(keyNodes(key))))
-                keys.add(key++);
-        }
-
-        info("Test keys: " + keys);
-
-        // Put on primary node.
-        for (Integer key : keys)
-            nearPrimary.getAndPut(key, "v" + key, null);
-
-        for (Integer key : keys) {
-            String val = "v" + key;
-
-            assertEquals(val, localPeek(nearPrimary, key));
-            assertEquals(val, localPeek(dhtPrimary, key));
-
-            assertEquals(val, localPeek(nearBackup, key));
-            assertEquals(val, localPeek(dhtBackup, key));
-        }
-
-        final AtomicInteger cntBackup = new AtomicInteger();
-
-        IgniteFuture<Event> futBackup = waitForLocalEvent(backupIgnite.events(), new P1<Event>() {
-            @Override public boolean apply(Event e) {
-                return e.node().id().equals(backupIgnite.cluster().localNode().id()) &&
-                    cntBackup.incrementAndGet() == keyCnt;
-            }
-        }, EVT_CACHE_ENTRY_EVICTED);
-
-        final AtomicInteger cntPrimary = new AtomicInteger();
-
-        IgniteFuture<Event> futPrimary = waitForLocalEvent(primaryIgnite.events(), new P1<Event>() {
-            @Override public boolean apply(Event e) {
-                return e.node().id().equals(primaryIgnite.cluster().localNode().id()) &&
-                    cntPrimary.incrementAndGet() == keyCnt;
-            }
-        }, EVT_CACHE_ENTRY_EVICTED);
-
-        // Evict on primary node.
-        // Eviction of the last key should trigger queue processing.
-        for (Integer key : keys)
-            primaryIgnite.cache(null).localEvict(Collections.<Object>singleton(key));
-
-        // Give some time for eviction events to occur on backup and primary node.
-        futBackup.get(10_000);
-        futPrimary.get(10_000);
-
-        info("nearBackupSize: " + nearBackup.size());
-        info("dhtBackupSize: " + dhtBackup.size());
-        info("nearPrimarySize: " + nearPrimary.size());
-        info("dhtPrimarySize: " + dhtPrimary.size());
-
-        // Check backup node first.
-        for (Integer key : keys) {
-            String msg = "Failed key: " + key;
-
-            assertNull(msg, localPeek(nearBackup, key));
-            assertNull(msg, localPeek(dhtBackup, key));
-            assertNull(msg, nearBackup.peekEx(key));
-            assertNull(msg, dhtBackup.peekEx(key));
-        }
-
-        for (Integer key : keys) {
-            String msg = "Failed key: " + key;
-
-            assertNull(msg, localPeek(nearPrimary, key));
-            assertNull(msg, localPeek(dhtPrimary, key));
-            assertNull(msg, nearPrimary.peekEx(key));
-            assertNull(dhtPrimary.peekEx(key));
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
deleted file mode 100644
index 2680a4f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOffHeapSelfTest.java
+++ /dev/null
@@ -1,38 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Test cases for partitioned cache {@link GridDhtPreloader preloader} with off-heap value storage.
- */
-public class GridCacheDhtPreloadOffHeapSelfTest extends GridCacheDhtPreloadSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) {
-        CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
-        cacheCfg.setMemoryMode(OFFHEAP_VALUES);
-        cacheCfg.setOffHeapMaxMemory(0);
-
-        return cacheCfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
new file mode 100644
index 0000000..07a858e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadOnheapSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCacheDhtPreloadOnheapSelfTest extends GridCacheDhtPreloadSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
index 9987a8d..43aa10b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadSelfTest.java
@@ -136,6 +136,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
         cacheCfg.setRebalanceMode(preloadMode);
         cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cacheCfg.setBackups(backups);
+        cacheCfg.setOnheapCacheEnabled(onheapCacheEnabled());
 
         return cacheCfg;
     }
@@ -163,6 +164,13 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
     }
 
     /**
+     * @return {@code True} if on-heap cache is enabled.
+     */
+    protected boolean onheapCacheEnabled() {
+        return false;
+    }
+
+    /**
      * @throws Exception If failed.
      */
     public void testActivePartitionTransferSyncSameCoordinator() throws Exception {
@@ -344,7 +352,8 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
             error("Test failed.", e);
 
             throw e;
-        } finally {
+        }
+        finally {
             stopAllGrids();
         }
     }
@@ -432,7 +441,6 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
         checkNodes(1000, 4, false, false);
     }
 
-
     /**
      * @throws Exception If failed.
      */
@@ -549,17 +557,16 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
 
                 for (Ignite gg : ignites)
                     futs.add(waitForLocalEvent(gg.events(), new P1<Event>() {
-                            @Override public boolean apply(Event e) {
-                                CacheRebalancingEvent evt = (CacheRebalancingEvent)e;
+                        @Override public boolean apply(Event e) {
+                            CacheRebalancingEvent evt = (CacheRebalancingEvent)e;
 
-                                ClusterNode node = evt.discoveryNode();
+                            ClusterNode node = evt.discoveryNode();
 
-                                return evt.type() == EVT_CACHE_REBALANCE_STOPPED && node.id().equals(nodeId) &&
-                                    (evt.discoveryEventType() == EVT_NODE_LEFT ||
+                            return evt.type() == EVT_CACHE_REBALANCE_STOPPED && node.id().equals(nodeId) &&
+                                (evt.discoveryEventType() == EVT_NODE_LEFT ||
                                     evt.discoveryEventType() == EVT_NODE_FAILED);
-                            }
-                        }, EVT_CACHE_REBALANCE_STOPPED));
-
+                        }
+                    }, EVT_CACHE_REBALANCE_STOPPED));
 
                 info("Before grid stop [name=" + g.name() + ", fullTop=" + top2string(ignites));
 
@@ -607,7 +614,8 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
             error("Test failed.", e);
 
             throw e;
-        } finally {
+        }
+        finally {
             stopAllGrids();
         }
     }
@@ -652,9 +660,9 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
                 boolean primary = primaryNode.equals(loc);
 
                 assertEquals("Key check failed [igniteInstanceName=" + ignite.name() +
-                    ", cache=" + cache.getName() + ", key=" + i + ", expected=" + i + ", actual=" + val +
-                    ", part=" + aff.partition(i) + ", primary=" + primary + ", affNodes=" + U.nodeIds(affNodes) +
-                    ", locId=" + loc.id() + ", allNodes=" + U.nodeIds(nodes) + ", allParts=" + top2string(grids) + ']',
+                        ", cache=" + cache.getName() + ", key=" + i + ", expected=" + i + ", actual=" + val +
+                        ", part=" + aff.partition(i) + ", primary=" + primary + ", affNodes=" + U.nodeIds(affNodes) +
+                        ", locId=" + loc.id() + ", allNodes=" + U.nodeIds(nodes) + ", allParts=" + top2string(grids) + ']',
                     Integer.toString(i), val);
             }
         }
@@ -664,7 +672,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
      * @param grids Grids
      * @return String representation of all partitions and their state.
      */
-    @SuppressWarnings( {"ConstantConditions"})
+    @SuppressWarnings({"ConstantConditions"})
     private String top2string(Iterable<Ignite> grids) {
         Map<String, String> map = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 4bddbf9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,43 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
-    GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean txEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean lockingEnabled() {
-        return false;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..14facae
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.dht;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean txEnabled() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean lockingEnabled() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..20e7b7a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.dht;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
deleted file mode 100644
index 6f64c9a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests colocated cache with values being stored off-heap.
- */
-public class GridCachePartitionedNearDisabledOffHeapFullApiSelfTest extends
-    GridCachePartitionedNearDisabledFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index b559395..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests colocated cache with values being stored off-heap.
- */
-public class GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest
-    extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
deleted file mode 100644
index 7e3220f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.java
+++ /dev/null
@@ -1,57 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFullApiSelfTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest extends
-    GridCachePartitionedFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean txEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean lockingEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 1ff7702..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest extends
-    GridCachePartitionedNearDisabledOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 7fc98cc..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests colocated cache with off-heap tiered mode.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest extends
-    GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..620db8a
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapFullApiSelfTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCachePartitionedNearDisabledOnheapFullApiSelfTest
+    extends GridCachePartitionedNearDisabledFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..3769103
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.dht;
+
+public class GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest
+    extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
index 436eec8..ca7b3ed 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheConcurrentPutGetRemove.java
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -38,8 +37,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
 /**
@@ -72,28 +69,14 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testPutGetRemoveAtomic() throws Exception {
-        putGetRemove(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 1));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveAtomicOffheap() throws Exception {
-        putGetRemove(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1));
+        putGetRemove(cacheConfiguration(ATOMIC, 1));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPutGetRemoveTx() throws Exception {
-        putGetRemove(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 1));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveTxOffheap() throws Exception {
-        putGetRemove(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1));
+        putGetRemove(cacheConfiguration(TRANSACTIONAL, 1));
     }
 
     /**
@@ -181,17 +164,13 @@ public class IgniteCacheConcurrentPutGetRemove extends GridCommonAbstractTest {
 
     /**
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param backups Backups number.
      * @return Cache configuration.
      */
-    private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
-        int backups) {
+    private CacheConfiguration cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) {
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setBackups(backups);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
index 9a1aaff..0831d1e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheCrossCacheTxFailoverTest.java
@@ -53,9 +53,7 @@ import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
 import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync;
-import static org.apache.ignite.testframework.GridTestUtils.setMemoryMode;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -115,13 +113,11 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
      * @param name Cache name.
      * @param cacheMode Cache mode.
      * @param parts Number of partitions.
-     * @param memMode Memory mode.
      * @return Cache configuration.
      */
     private CacheConfiguration cacheConfiguration(String name,
         CacheMode cacheMode,
-        int parts,
-        TestMemoryMode memMode) {
+        int parts) {
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setName(name);
@@ -134,8 +130,6 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
 
         ccfg.setAffinity(new RendezvousAffinityFunction(false, parts));
 
-        setMemoryMode(null, ccfg, memMode, 100, 1024);
-
         return ccfg;
     }
 
@@ -148,70 +142,56 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     public void testCrossCachePessimisticTxFailover() throws Exception {
-        crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCrossCachePessimisticTxFailoverOffheapSwap() throws Exception {
-        crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+        crossCacheTxFailover(PARTITIONED, true, PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCachePessimisticTxFailoverDifferentAffinity() throws Exception {
-        crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheOptimisticTxFailover() throws Exception {
-        crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheOptimisticSerializableTxFailover() throws Exception {
-        crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE, TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCrossCacheOptimisticTxFailoverOffheapSwap() throws Exception {
-        crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+        crossCacheTxFailover(PARTITIONED, true, OPTIMISTIC, SERIALIZABLE);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheOptimisticTxFailoverDifferentAffinity() throws Exception {
-        crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(PARTITIONED, false, OPTIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCachePessimisticTxFailoverReplicated() throws Exception {
-        crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(REPLICATED, true, PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheOptimisticTxFailoverReplicated() throws Exception {
-        crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(REPLICATED, true, OPTIMISTIC, REPEATABLE_READ);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCachePessimisticTxFailoverDifferentAffinityReplicated() throws Exception {
-        crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ, TestMemoryMode.HEAP);
+        crossCacheTxFailover(PARTITIONED, false, PESSIMISTIC, REPEATABLE_READ);
     }
 
     /**
@@ -219,21 +199,19 @@ public class IgniteCacheCrossCacheTxFailoverTest extends GridCommonAbstractTest
      * @param sameAff If {@code false} uses different number of partitions for caches.
      * @param concurrency Transaction concurrency.
      * @param isolation Transaction isolation.
-     * @param memMode Memory mode.
      * @throws Exception If failed.
      */
     private void crossCacheTxFailover(CacheMode cacheMode,
         boolean sameAff,
         final TransactionConcurrency concurrency,
-        final TransactionIsolation isolation,
-        TestMemoryMode memMode) throws Exception {
+        final TransactionIsolation isolation) throws Exception {
         IgniteKernal ignite0 = (IgniteKernal)ignite(0);
 
         final AtomicBoolean stop = new AtomicBoolean();
 
         try {
-            ignite0.createCache(cacheConfiguration(CACHE1, cacheMode, 256, memMode));
-            ignite0.createCache(cacheConfiguration(CACHE2, cacheMode, sameAff ? 256 : 128, memMode));
+            ignite0.createCache(cacheConfiguration(CACHE1, cacheMode, 256));
+            ignite0.createCache(cacheConfiguration(CACHE2, cacheMode, sameAff ? 256 : 128));
 
             final AtomicInteger threadIdx = new AtomicInteger();
 


[36/57] [abbrv] ignite git commit: Configs for Win32 platform tests, tests code changes to employ new configs

Posted by ag...@apache.org.
Configs for Win32 platform tests, tests code changes to employ new configs


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

Branch: refs/heads/ignite-3477-debug
Commit: 8daada7b4cbaebfffa538047f9710436ec1f390d
Parents: 6e67866
Author: Sergey Chugunov <se...@gmail.com>
Authored: Mon Apr 10 18:01:57 2017 +0300
Committer: Sergey Chugunov <se...@gmail.com>
Committed: Tue Apr 11 13:06:25 2017 +0300

----------------------------------------------------------------------
 .../cpp/core-test/config/cache-identity-32.xml  |  50 ++++++
 .../core-test/config/cache-identity-default.xml | 154 +++++++++++++++++++
 .../cpp/core-test/config/cache-identity.xml     | 124 +--------------
 .../cpp/core-test/config/cache-store-32.xml     |  50 ++++++
 .../core-test/config/cache-store-default.xml    |  71 +++++++++
 .../cpp/core-test/config/cache-store.xml        |  41 +----
 .../cpp/core-test/project/vs/core-test.vcxproj  |   8 +
 .../project/vs/core-test.vcxproj.filters        |  12 ++
 .../src/binary_identity_resolver_test.cpp       |   8 +
 .../cpp/core-test/src/binary_object_test.cpp    |   8 +
 .../cpp/core-test/src/cache_invoke_test.cpp     |   4 +
 .../cpp/core-test/src/cache_store_test.cpp      |  11 +-
 .../cpp/core-test/src/cluster_test.cpp          |   4 +
 .../cpp/core-test/src/continuous_query_test.cpp |   5 +
 14 files changed, 388 insertions(+), 162 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-identity-32.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-identity-32.xml b/modules/platforms/cpp/core-test/config/cache-identity-32.xml
new file mode 100644
index 0000000..4a8a68f
--- /dev/null
+++ b/modules/platforms/cpp/core-test/config/cache-identity-32.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    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.
+-->
+
+<!--
+    Ignite Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util.xsd">
+    <import resource="cache-identity-default.xml"/>
+
+    <bean parent="grid.cfg">
+        <property name="memoryConfiguration">
+            <bean class="org.apache.ignite.configuration.MemoryConfiguration">
+                <property name="systemCacheMemorySize" value="#{40 * 1024 * 1024}"/>
+                <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+
+                <property name="memoryPolicies">
+                    <list>
+                        <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
+                            <property name="name" value="dfltPlc"/>
+                            <property name="size" value="#{100 * 1024 * 1024}"/>
+                        </bean>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-identity-default.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-identity-default.xml b/modules/platforms/cpp/core-test/config/cache-identity-default.xml
new file mode 100644
index 0000000..a73d0bb
--- /dev/null
+++ b/modules/platforms/cpp/core-test/config/cache-identity-default.xml
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    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.
+-->
+
+<!--
+    Ignite Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean abstract="true" id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="localHost" value="127.0.0.1"/>
+        <property name="connectorConfiguration"><null/></property>
+
+        <property name="cacheConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="cache1"/>
+                    <property name="cacheMode" value="PARTITIONED"/>
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+                    <!-- Configure type metadata to enable queries. -->
+                    <property name="queryEntities">
+                        <list>
+                            <bean class="org.apache.ignite.cache.QueryEntity">
+                                <property name="keyType" value="CompositeKey"/>
+                                <property name="valueType" value="java.lang.Integer"/>
+
+                                <property name="fields">
+                                    <map>
+                                        <entry key="str" value="java.lang.String"/>
+                                        <entry key="ts" value="java.sql.Timestamp"/>
+                                        <entry key="guid" value="java.util.UUID"/>
+                                    </map>
+                                </property>
+
+                                <property name="keyFields">
+                                    <list>
+                                        <value>str</value>
+                                        <value>ts</value>
+                                        <value>guid</value>
+                                    </list>
+                                </property>
+                            </bean>
+                        </list>
+                    </property>
+                </bean>
+
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="cache2"/>
+                    <property name="cacheMode" value="PARTITIONED"/>
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+                    <!-- Configure type metadata to enable queries. -->
+                    <property name="queryEntities">
+                        <list>
+                            <bean class="org.apache.ignite.cache.QueryEntity">
+                                <property name="keyType" value="CompositeKeySimple"/>
+                                <property name="valueType" value="java.lang.Integer"/>
+
+                                <property name="fields">
+                                    <map>
+                                        <entry key="str" value="java.lang.String"/>
+                                        <entry key="ts" value="java.sql.Timestamp"/>
+                                        <entry key="i64" value="java.lang.Long"/>
+                                    </map>
+                                </property>
+
+                                <property name="keyFields">
+                                    <list>
+                                        <value>str</value>
+                                        <value>ts</value>
+                                        <value>i64</value>
+                                    </list>
+                                </property>
+                            </bean>
+                        </list>
+                    </property>
+                </bean>
+
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="cache3"/>
+                    <property name="cacheMode" value="PARTITIONED"/>
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+                    <!-- Configure type metadata to enable queries. -->
+                    <property name="queryEntities">
+                        <list>
+                            <bean class="org.apache.ignite.cache.QueryEntity">
+                                <property name="keyType" value="ComplexType2"/>
+                                <property name="valueType" value="java.lang.Integer"/>
+
+                                <property name="fields">
+                                    <map>
+                                        <entry key="i32Field" value="java.lang.Integer"/>
+                                        <entry key="objField" value="InnerObject"/>
+                                        <entry key="strField" value="java.lang.String"/>
+                                    </map>
+                                </property>
+
+                                <property name="keyFields">
+                                    <list>
+                                        <value>i32Field</value>
+                                        <value>objField</value>
+                                        <value>strField</value>
+                                    </list>
+                                </property>
+                            </bean>
+                        </list>
+                    </property>
+                </bean>
+            </list>
+        </property>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with actual host IP address. -->
+                                <value>127.0.0.1:47500</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+                <property name="socketTimeout" value="300" />
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-identity.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-identity.xml b/modules/platforms/cpp/core-test/config/cache-identity.xml
index c4e0b1b..67bb9e9 100644
--- a/modules/platforms/cpp/core-test/config/cache-identity.xml
+++ b/modules/platforms/cpp/core-test/config/cache-identity.xml
@@ -28,127 +28,7 @@
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <property name="localHost" value="127.0.0.1"/>
-        <property name="connectorConfiguration"><null/></property>
+    <import resource="cache-identity-default.xml"/>
 
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="cache1"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-
-                    <!-- Configure type metadata to enable queries. -->
-                    <property name="queryEntities">
-                        <list>
-                            <bean class="org.apache.ignite.cache.QueryEntity">
-                                <property name="keyType" value="CompositeKey"/>
-                                <property name="valueType" value="java.lang.Integer"/>
-
-                                <property name="fields">
-                                    <map>
-                                        <entry key="str" value="java.lang.String"/>
-                                        <entry key="ts" value="java.sql.Timestamp"/>
-                                        <entry key="guid" value="java.util.UUID"/>
-                                    </map>
-                                </property>
-
-                                <property name="keyFields">
-                                    <list>
-                                        <value>str</value>
-                                        <value>ts</value>
-                                        <value>guid</value>
-                                    </list>
-                                </property>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="cache2"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-
-                    <!-- Configure type metadata to enable queries. -->
-                    <property name="queryEntities">
-                        <list>
-                            <bean class="org.apache.ignite.cache.QueryEntity">
-                                <property name="keyType" value="CompositeKeySimple"/>
-                                <property name="valueType" value="java.lang.Integer"/>
-
-                                <property name="fields">
-                                    <map>
-                                        <entry key="str" value="java.lang.String"/>
-                                        <entry key="ts" value="java.sql.Timestamp"/>
-                                        <entry key="i64" value="java.lang.Long"/>
-                                    </map>
-                                </property>
-
-                                <property name="keyFields">
-                                    <list>
-                                        <value>str</value>
-                                        <value>ts</value>
-                                        <value>i64</value>
-                                    </list>
-                                </property>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="cache3"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-
-                    <!-- Configure type metadata to enable queries. -->
-                    <property name="queryEntities">
-                        <list>
-                            <bean class="org.apache.ignite.cache.QueryEntity">
-                                <property name="keyType" value="ComplexType2"/>
-                                <property name="valueType" value="java.lang.Integer"/>
-
-                                <property name="fields">
-                                    <map>
-                                        <entry key="i32Field" value="java.lang.Integer"/>
-                                        <entry key="objField" value="InnerObject"/>
-                                        <entry key="strField" value="java.lang.String"/>
-                                    </map>
-                                </property>
-
-                                <property name="keyFields">
-                                    <list>
-                                        <value>i32Field</value>
-                                        <value>objField</value>
-                                        <value>strField</value>
-                                    </list>
-                                </property>
-                            </bean>
-                        </list>
-                    </property>
-                </bean>
-            </list>
-        </property>
-
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-                <property name="socketTimeout" value="300" />
-            </bean>
-        </property>
-    </bean>
+    <bean parent="grid.cfg"/>
 </beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-store-32.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-store-32.xml b/modules/platforms/cpp/core-test/config/cache-store-32.xml
new file mode 100644
index 0000000..f2b6682
--- /dev/null
+++ b/modules/platforms/cpp/core-test/config/cache-store-32.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    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.
+-->
+
+<!--
+    Ignite Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util.xsd">
+    <import resource="cache-store-default.xml"/>
+
+    <bean parent="grid.cfg">
+        <property name="memoryConfiguration">
+            <bean class="org.apache.ignite.configuration.MemoryConfiguration">
+                <property name="systemCacheMemorySize" value="#{40 * 1024 * 1024}"/>
+                <property name="defaultMemoryPolicyName" value="dfltPlc"/>
+
+                <property name="memoryPolicies">
+                    <list>
+                        <bean class="org.apache.ignite.configuration.MemoryPolicyConfiguration">
+                            <property name="name" value="dfltPlc"/>
+                            <property name="size" value="#{100 * 1024 * 1024}"/>
+                        </bean>
+                    </list>
+                </property>
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-store-default.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-store-default.xml b/modules/platforms/cpp/core-test/config/cache-store-default.xml
new file mode 100644
index 0000000..06baa7e
--- /dev/null
+++ b/modules/platforms/cpp/core-test/config/cache-store-default.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    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.
+-->
+
+<!--
+    Ignite Spring configuration file to startup grid cache.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:util="http://www.springframework.org/schema/util"
+       xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util.xsd">
+    <bean abstract="true" id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
+        <property name="localHost" value="127.0.0.1"/>
+        <property name="connectorConfiguration"><null/></property>
+
+        <property name="cacheConfiguration">
+            <list>
+                <bean class="org.apache.ignite.configuration.CacheConfiguration">
+                    <property name="name" value="cache1"/>
+                    <property name="cacheMode" value="PARTITIONED"/>
+                    <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
+
+                    <property name="cacheStoreFactory">
+                        <bean class="org.apache.ignite.internal.processors.cache.MapCacheStoreStrategy.MapStoreFactory"/>
+                    </property>
+
+                    <property name="writeBehindEnabled" value="false"/>
+
+                    <property name="readThrough" value="false"/>
+                    <property name="writeThrough" value="true"/>
+                </bean>
+            </list>
+        </property>
+
+        <property name="discoverySpi">
+            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
+                <property name="ipFinder">
+                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
+                        <property name="addresses">
+                            <list>
+                                <!-- In distributed environment, replace with actual host IP address. -->
+                                <value>127.0.0.1:47500</value>
+                            </list>
+                        </property>
+                    </bean>
+                </property>
+                <property name="socketTimeout" value="300" />
+            </bean>
+        </property>
+    </bean>
+</beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/config/cache-store.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-store.xml b/modules/platforms/cpp/core-test/config/cache-store.xml
index 94c7ddd..8669631 100644
--- a/modules/platforms/cpp/core-test/config/cache-store.xml
+++ b/modules/platforms/cpp/core-test/config/cache-store.xml
@@ -28,44 +28,7 @@
         http://www.springframework.org/schema/beans/spring-beans.xsd
         http://www.springframework.org/schema/util
         http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <property name="localHost" value="127.0.0.1"/>
-        <property name="connectorConfiguration"><null/></property>
+    <import resource="cache-store-default.xml"/>
 
-        <property name="cacheConfiguration">
-            <list>
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="cache1"/>
-                    <property name="cacheMode" value="PARTITIONED"/>
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-                    <property name="writeSynchronizationMode" value="FULL_SYNC"/>
-
-                    <property name="cacheStoreFactory">
-                        <bean class="org.apache.ignite.internal.processors.cache.MapCacheStoreStrategy.MapStoreFactory"/>
-                    </property>
-
-                    <property name="writeBehindEnabled" value="false"/>
-
-                    <property name="readThrough" value="false"/>
-                    <property name="writeThrough" value="true"/>
-                </bean>
-            </list>
-        </property>
-
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-                <property name="socketTimeout" value="300" />
-            </bean>
-        </property>
-    </bean>
+    <bean parent="grid.cfg"/>
 </beans>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
index d97f917..5d97d20 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj
@@ -34,14 +34,22 @@
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\config\cache-identity.xml" />
+    <None Include="..\..\config\cache-identity-32.xml" />
+    <None Include="..\..\config\cache-identity-default.xml" />
     <None Include="..\..\config\cache-query-continuous.xml" />
     <None Include="..\..\config\cache-query-32.xml" />
     <None Include="..\..\config\cache-query.xml" />
     <None Include="..\..\config\cache-query-default.xml" />
     <None Include="..\..\config\cache-test-32.xml" />
+    <None Include="..\..\config\cache-store-default.xml">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="..\..\config\cache-store.xml">
       <SubType>Designer</SubType>
     </None>
+    <None Include="..\..\config\cache-store-32.xml">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="..\..\config\cache-test.xml" />
     <None Include="..\..\config\cache-test-default.xml" />
     <None Include="..\..\config\cache-query-continuous-32.xml" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
index 933118f..08652d9 100644
--- a/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
+++ b/modules/platforms/cpp/core-test/project/vs/core-test.vcxproj.filters
@@ -157,12 +157,24 @@
     <None Include="..\..\config\cache-identity.xml">
       <Filter>Configs</Filter>
     </None>
+    <None Include="..\..\config\cache-identity-32.xml">
+      <Filter>Configs</Filter>
+    </None>
+    <None Include="..\..\config\cache-identity-default.xml">
+      <Filter>Configs</Filter>
+    </None>
     <None Include="..\..\config\cache-query-continuous.xml">
       <Filter>Configs</Filter>
     </None>
+    <None Include="..\..\config\cache-store-default.xml">
+      <Filter>Configs</Filter>
+    </None>
     <None Include="..\..\config\cache-store.xml">
       <Filter>Configs</Filter>
     </None>
+    <None Include="..\..\config\cache-store-32.xml">
+      <Filter>Configs</Filter>
+    </None>
     <None Include="..\..\config\cache-query-continuous.xml">
       <Filter>Configs</Filter>
     </None>

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
index b6831c3..62f37f9 100644
--- a/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_identity_resolver_test.cpp
@@ -298,7 +298,11 @@ BOOST_AUTO_TEST_CASE(GetDataHashCode)
 
 BOOST_AUTO_TEST_CASE(IdentityEquilityWithGuid)
 {
+#ifdef IGNITE_TESTS_32
+    Ignite grid = ignite_test::StartNode("cache-identity-32.xml");
+#else
     Ignite grid = ignite_test::StartNode("cache-identity.xml");
+#endif
 
     CompositeKey key("Key String", Timestamp(123851, 562304134), Guid(0x4A950C6206FE4502, 0xAC06145097E56F02));
     int32_t value = 12321;
@@ -321,7 +325,11 @@ BOOST_AUTO_TEST_CASE(IdentityEquilityWithGuid)
 
 BOOST_AUTO_TEST_CASE(IdentityEquilityWithoutGuid)
 {
+#ifdef IGNITE_TESTS_32
+    Ignite grid = ignite_test::StartNode("cache-identity-32.xml");
+#else
     Ignite grid = ignite_test::StartNode("cache-identity.xml");
+#endif
 
     CompositeKeySimple key("Lorem ipsum", Timestamp(112460, 163002155), 1337);
     int32_t value = 42;

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/binary_object_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/binary_object_test.cpp b/modules/platforms/cpp/core-test/src/binary_object_test.cpp
index bc30428..fa8878d 100644
--- a/modules/platforms/cpp/core-test/src/binary_object_test.cpp
+++ b/modules/platforms/cpp/core-test/src/binary_object_test.cpp
@@ -328,7 +328,11 @@ BOOST_AUTO_TEST_CASE(RemoteSchemaRetrieval)
     try
     {
         BOOST_CHECKPOINT("Node1 startup");
+#ifdef IGNITE_TESTS_32
+        Ignite node1 = ignite_test::StartNode("cache-test-32.xml", "node1");
+#else
         Ignite node1 = ignite_test::StartNode("cache-test.xml", "node1");
+#endif
 
         BOOST_CHECKPOINT("Creating cache");
         cache::Cache<int32_t, BinaryFields> cache = node1.GetOrCreateCache<int32_t, BinaryFields>("cache");
@@ -339,7 +343,11 @@ BOOST_AUTO_TEST_CASE(RemoteSchemaRetrieval)
         cache.Put(42, some);
 
         BOOST_CHECKPOINT("Node2 startup");
+#ifdef IGNITE_TESTS_32
+        Ignite node2 = ignite_test::StartNode("cache-test-32.xml", "node2");
+#else
         Ignite node2 = ignite_test::StartNode("cache-test.xml", "node2");
+#endif
 
         impl::IgniteImpl* nodeImpl = impl::IgniteImpl::GetFromProxy(node2);
         impl::IgniteEnvironment* env = nodeImpl->GetEnvironment();

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp b/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp
index f094d1c..73b419e 100644
--- a/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_invoke_test.cpp
@@ -396,7 +396,11 @@ struct CacheInvokeTestSuiteFixture
      * Constructor.
      */
     CacheInvokeTestSuiteFixture() :
+#ifdef IGNITE_TESTS_32
+        node(ignite_test::StartNode("cache-query-32.xml", "InvokeTest"))
+#else
         node(ignite_test::StartNode("cache-query.xml", "InvokeTest"))
+#endif
     {
         // No-op.
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/cache_store_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cache_store_test.cpp b/modules/platforms/cpp/core-test/src/cache_store_test.cpp
index f1b4630..396cad0 100644
--- a/modules/platforms/cpp/core-test/src/cache_store_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cache_store_test.cpp
@@ -41,8 +41,13 @@ struct CacheStoreTestSuiteFixture
     /*
      * Constructor.
      */
-    CacheStoreTestSuiteFixture() : 
+    CacheStoreTestSuiteFixture() :
+#ifdef IGNITE_TESTS_32
+        node1(ignite_test::StartNode("cache-store-32.xml", "node1"))
+#else
         node1(ignite_test::StartNode("cache-store.xml", "node1"))
+#endif
+
     {
         // No-op.
     }
@@ -102,7 +107,11 @@ BOOST_AUTO_TEST_CASE(LoadCacheSingleNodeNoPredicate)
 BOOST_AUTO_TEST_CASE(LoadCacheSeveralNodesNoPredicate)
 {
     BOOST_CHECKPOINT("Starting additional node");
+#ifdef IGNITE_TESTS_32
+    Ignite node2 = ignite_test::StartNode("cache-store-32.xml", "node2");
+#else
     Ignite node2 = ignite_test::StartNode("cache-store.xml", "node2");
+#endif
 
     const int64_t entriesNum = 100;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/cluster_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/cluster_test.cpp b/modules/platforms/cpp/core-test/src/cluster_test.cpp
index c681ca2..754fe7e 100644
--- a/modules/platforms/cpp/core-test/src/cluster_test.cpp
+++ b/modules/platforms/cpp/core-test/src/cluster_test.cpp
@@ -40,7 +40,11 @@ struct ClusterTestSuiteFixture
      * Constructor.
      */
     ClusterTestSuiteFixture() :
+#ifdef IGNITE_TESTS_32
+        node(ignite_test::StartNode("cache-test-32.xml", "ClusterTest"))
+#else
         node(ignite_test::StartNode("cache-test.xml", "ClusterTest"))
+#endif
     {
         // No-op.
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/8daada7b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
index 46ffc2f..e09b403 100644
--- a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
@@ -718,8 +718,13 @@ BOOST_AUTO_TEST_CASE(TestFilterSingleNode)
 
 BOOST_AUTO_TEST_CASE(TestFilterMultipleNodes)
 {
+#ifdef IGNITE_TESTS_32
+    Ignite node2 = ignite_test::StartNode("cache-query-continuous-32.xml", "node-02");
+    Ignite node3 = ignite_test::StartNode("cache-query-continuous-32.xml", "node-03");
+#else
     Ignite node2 = ignite_test::StartNode("cache-query-continuous.xml", "node-02");
     Ignite node3 = ignite_test::StartNode("cache-query-continuous.xml", "node-03");
+#endif
 
     node.GetBinding().RegisterCacheEntryEventFilter< RangeFilter<int, TestEntry> >();
 


[54/57] [abbrv] ignite git commit: Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master

Posted by ag...@apache.org.
Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: 06cee57e623a1c70c9bfc23547cbc66f2b62eac9
Parents: b9867eb face0c7
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 19:53:59 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 19:53:59 2017 +0300

----------------------------------------------------------------------
 .../configuration/DataPageEvictionMode.java       | 16 ++++++++++++++--
 .../configuration/MemoryPolicyConfiguration.java  | 18 ++++++++++++------
 .../core/src/test/config/spring-multicache.xml    | 16 ++++++++++++++++
 .../eviction/paged/PageEvictionAbstractTest.java  |  4 ++--
 .../eviction/paged/PageEvictionMultinodeTest.java |  4 ++--
 .../paged/PageEvictionReadThroughTest.java        |  2 +-
 6 files changed, 47 insertions(+), 13 deletions(-)
----------------------------------------------------------------------



[32/57] [abbrv] ignite git commit: ignite-3477-master - drop FairAffinityFunction

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java
index 294951f..ef7c7a7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheExchangeMessageDuplicatedStateTest.java
@@ -22,7 +22,6 @@ import java.util.List;
 import java.util.Map;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -54,12 +53,6 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
     private static final String AFF1_CACHE2 = "a1c2";
 
     /** */
-    private static final String AFF2_CACHE1 = "a2c1";
-
-    /** */
-    private static final String AFF2_CACHE2 = "a2c2";
-
-    /** */
     private static final String AFF3_CACHE1 = "a3c1";
 
     /** */
@@ -69,9 +62,6 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
     private static final String AFF4_FILTER_CACHE2 = "a4c2";
 
     /** */
-    private static final String AFF5_FILTER_CACHE1 = "a5c1";
-
-    /** */
     private boolean client;
 
     /** {@inheritDoc} */
@@ -104,18 +94,6 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
         }
         {
             CacheConfiguration ccfg = new CacheConfiguration();
-            ccfg.setName(AFF2_CACHE1);
-            ccfg.setAffinity(new FairAffinityFunction(false,512));
-            ccfgs.add(ccfg);
-        }
-        {
-            CacheConfiguration ccfg = new CacheConfiguration();
-            ccfg.setName(AFF2_CACHE2);
-            ccfg.setAffinity(new FairAffinityFunction(false,512));
-            ccfgs.add(ccfg);
-        }
-        {
-            CacheConfiguration ccfg = new CacheConfiguration();
             ccfg.setName(AFF3_CACHE1);
             ccfg.setBackups(3);
 
@@ -138,13 +116,6 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
             ccfg.setAffinity(new RendezvousAffinityFunction());
             ccfgs.add(ccfg);
         }
-        {
-            CacheConfiguration ccfg = new CacheConfiguration();
-            ccfg.setName(AFF5_FILTER_CACHE1);
-            ccfg.setNodeFilter(new TestNodeFilter());
-            ccfg.setAffinity(new FairAffinityFunction());
-            ccfgs.add(ccfg);
-        }
 
         cfg.setCacheConfiguration(ccfgs.toArray(new CacheConfiguration[ccfgs.size()]));
 
@@ -265,11 +236,9 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
         assertNotNull(dupPartsData);
 
         checkFullMessage(AFF1_CACHE1, AFF1_CACHE2, dupPartsData, msg);
-        checkFullMessage(AFF2_CACHE1, AFF2_CACHE2, dupPartsData, msg);
         checkFullMessage(AFF4_FILTER_CACHE1, AFF4_FILTER_CACHE2, dupPartsData, msg);
 
         assertFalse(dupPartsData.containsKey(CU.cacheId(AFF3_CACHE1)));
-        assertFalse(dupPartsData.containsKey(CU.cacheId(AFF5_FILTER_CACHE1)));
 
         Map<Integer, Map<Integer, Long>> partCntrs = GridTestUtils.getFieldValue(msg, "partCntrs");
 
@@ -288,11 +257,9 @@ public class CacheExchangeMessageDuplicatedStateTest extends GridCommonAbstractT
         assertNotNull(dupPartsData);
 
         checkSingleMessage(AFF1_CACHE1, AFF1_CACHE2, dupPartsData, msg);
-        checkSingleMessage(AFF2_CACHE1, AFF2_CACHE2, dupPartsData, msg);
         checkSingleMessage(AFF4_FILTER_CACHE1, AFF4_FILTER_CACHE2, dupPartsData, msg);
 
         assertFalse(dupPartsData.containsKey(CU.cacheId(AFF3_CACHE1)));
-        assertFalse(dupPartsData.containsKey(CU.cacheId(AFF5_FILTER_CACHE1)));
 
         Map<Integer, Map<Integer, Long>> partCntrs = GridTestUtils.getFieldValue(msg, "partCntrs");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
index db112a1..1194a27 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CrossCacheTxRandomOperationsTest.java
@@ -30,7 +30,6 @@ import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -110,55 +109,46 @@ public class CrossCacheTxRandomOperationsTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testTxOperations() throws Exception {
-        txOperations(PARTITIONED, FULL_SYNC, false, false);
+        txOperations(PARTITIONED, FULL_SYNC, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheTxOperations() throws Exception {
-        txOperations(PARTITIONED, FULL_SYNC, true, false);
+        txOperations(PARTITIONED, FULL_SYNC, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheTxOperationsPrimarySync() throws Exception {
-        txOperations(PARTITIONED, PRIMARY_SYNC, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCrossCacheTxOperationsFairAffinity() throws Exception {
-        txOperations(PARTITIONED, FULL_SYNC, true, true);
+        txOperations(PARTITIONED, PRIMARY_SYNC, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheTxOperationsReplicated() throws Exception {
-        txOperations(REPLICATED, FULL_SYNC, true, false);
+        txOperations(REPLICATED, FULL_SYNC, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testCrossCacheTxOperationsReplicatedPrimarySync() throws Exception {
-        txOperations(REPLICATED, PRIMARY_SYNC, true, false);
+        txOperations(REPLICATED, PRIMARY_SYNC, true);
     }
 
     /**
      * @param name Cache name.
      * @param cacheMode Cache mode.
      * @param writeSync Write synchronization mode.
-     * @param fairAff If {@code true} uses {@link FairAffinityFunction}, otherwise {@link RendezvousAffinityFunction}.
      * @return Cache configuration.
      */
     protected CacheConfiguration cacheConfiguration(String name,
         CacheMode cacheMode,
-        CacheWriteSynchronizationMode writeSync,
-        boolean fairAff) {
+        CacheWriteSynchronizationMode writeSync) {
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setName(name);
@@ -169,7 +159,7 @@ public class CrossCacheTxRandomOperationsTest extends GridCommonAbstractTest {
         if (cacheMode == PARTITIONED)
             ccfg.setBackups(1);
 
-        ccfg.setAffinity(fairAff ? new FairAffinityFunction() : new RendezvousAffinityFunction());
+        ccfg.setAffinity(new RendezvousAffinityFunction());
 
         return ccfg;
     }
@@ -177,34 +167,30 @@ public class CrossCacheTxRandomOperationsTest extends GridCommonAbstractTest {
     /**
      * @param cacheMode Cache mode.
      * @param writeSync Write synchronization mode.
-     * @param fairAff Fair affinity flag.
      * @param ignite Node to use.
      * @param name Cache name.
      */
     protected void createCache(CacheMode cacheMode,
         CacheWriteSynchronizationMode writeSync,
-        boolean fairAff,
         Ignite ignite,
         String name) {
-        ignite.createCache(cacheConfiguration(name, cacheMode, writeSync, fairAff));
+        ignite.createCache(cacheConfiguration(name, cacheMode, writeSync));
     }
 
     /**
      * @param cacheMode Cache mode.
      * @param writeSync Write synchronization mode.
      * @param crossCacheTx If {@code true} uses cross cache transaction.
-     * @param fairAff If {@code true} uses {@link FairAffinityFunction}, otherwise {@link RendezvousAffinityFunction}.
      * @throws Exception If failed.
      */
     private void txOperations(CacheMode cacheMode,
         CacheWriteSynchronizationMode writeSync,
-        boolean crossCacheTx,
-        boolean fairAff) throws Exception {
+        boolean crossCacheTx) throws Exception {
         Ignite ignite = ignite(0);
 
         try {
-            createCache(cacheMode, writeSync, fairAff, ignite, CACHE1);
-            createCache(cacheMode, writeSync, fairAff, ignite, CACHE2);
+            createCache(cacheMode, writeSync, ignite, CACHE1);
+            createCache(cacheMode, writeSync, ignite, CACHE2);
 
             txOperations(PESSIMISTIC, REPEATABLE_READ, crossCacheTx, false);
             txOperations(PESSIMISTIC, REPEATABLE_READ, crossCacheTx, true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
index bd9ad54..491e4dc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheVersionTopologyChangeTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntry;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -214,10 +213,6 @@ public class GridCacheVersionTopologyChangeTest extends GridCommonAbstractTest {
         ccfgs.add(cacheConfiguration("c2", atomicityMode, new RendezvousAffinityFunction(), 1));
         ccfgs.add(cacheConfiguration("c3", atomicityMode, new RendezvousAffinityFunction(false, 10), 0));
 
-        ccfgs.add(cacheConfiguration("c4", atomicityMode, new FairAffinityFunction(), 0));
-        ccfgs.add(cacheConfiguration("c5", atomicityMode, new FairAffinityFunction(), 1));
-        ccfgs.add(cacheConfiguration("c6", atomicityMode, new FairAffinityFunction(false, 10), 0));
-
         return ccfgs;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
index aea9167..09d1099 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteClientAffinityAssignmentSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -48,9 +47,6 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
     /** */
     private boolean cache;
 
-    /** */
-    private int aff;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -66,10 +62,7 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
 
             ccfg.setNearConfiguration(null);
 
-            if (aff == 0)
-                ccfg.setAffinity(new RendezvousAffinityFunction(false, PARTS));
-            else
-                ccfg.setAffinity(new FairAffinityFunction(PARTS));
+            ccfg.setAffinity(new RendezvousAffinityFunction(false, PARTS));
 
             cfg.setCacheConfiguration(ccfg);
         }
@@ -83,17 +76,6 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     public void testRendezvousAssignment() throws Exception {
-        aff = 0;
-
-        checkAffinityFunction();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testFairAssignment() throws Exception {
-        aff = 1;
-
         checkAffinityFunction();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
index 78ab065..0588139 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteDynamicCacheStartNoExchangeTimeoutTest.java
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -371,7 +370,6 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
             ccfg.setName("cache-3");
             ccfg.setAtomicityMode(ATOMIC);
             ccfg.setBackups(1);
-            ccfg.setAffinity(new FairAffinityFunction());
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
 
             res.add(ccfg);
@@ -405,7 +403,6 @@ public class IgniteDynamicCacheStartNoExchangeTimeoutTest extends GridCommonAbst
             ccfg.setName("cache-4");
             ccfg.setAtomicityMode(TRANSACTIONAL);
             ccfg.setBackups(1);
-            ccfg.setAffinity(new FairAffinityFunction());
             ccfg.setWriteSynchronizationMode(FULL_SYNC);
 
             res.add(ccfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentFairAffinityTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentFairAffinityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentFairAffinityTest.java
deleted file mode 100644
index 0ab2314..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentFairAffinityTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed;
-
-import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.jetbrains.annotations.Nullable;
-
-/**
- *
- */
-public class CacheLateAffinityAssignmentFairAffinityTest extends CacheLateAffinityAssignmentTest {
-    /** {@inheritDoc} */
-    @Override protected AffinityFunction affinityFunction(@Nullable Integer parts) {
-        return new FairAffinityFunction(false, parts == null ? FairAffinityFunction.DFLT_PART_CNT : parts);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
index 3ed3ec7..d07398d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheClientNodePartitionsExchangeTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheServerNotFoundException;
 import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -69,9 +68,6 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
     /** */
     private boolean client;
 
-    /** */
-    private boolean fairAffinity;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -82,9 +78,6 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         CacheConfiguration ccfg = new CacheConfiguration();
 
-        if (fairAffinity)
-            ccfg.setAffinity(new FairAffinityFunction());
-
         cfg.setCacheConfiguration(ccfg);
 
         cfg.setCommunicationSpi(new TestCommunicationSpi());
@@ -210,15 +203,6 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
     /**
      * @throws Exception If failed.
      */
-    public void testPartitionsExchangeFairAffinity() throws Exception {
-        fairAffinity = true;
-
-        partitionsExchange();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     private void partitionsExchange() throws Exception {
         Ignite ignite0 = startGrid(0);
 
@@ -327,7 +311,7 @@ public class IgniteCacheClientNodePartitionsExchangeTest extends GridCommonAbstr
 
         if (lateAff) {
             // With FairAffinityFunction affinity calculation is different, this causes one more topology change.
-            boolean exchangeAfterRebalance = fairAffinity;
+            boolean exchangeAfterRebalance = false;
 
             waitForTopologyUpdate(4,
                 exchangeAfterRebalance ? new AffinityTopologyVersion(6, 1) : new AffinityTopologyVersion(6, 0));

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxFairAffinityNodeJoinTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxFairAffinityNodeJoinTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxFairAffinityNodeJoinTest.java
deleted file mode 100644
index 53079f9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxFairAffinityNodeJoinTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class IgniteCacheTxFairAffinityNodeJoinTest extends IgniteCacheTxNodeJoinTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAffinity(new FairAffinityFunction(128));
-
-        return ccfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.java
deleted file mode 100644
index e8d59e3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest extends IgniteCacheTxNearDisabledPutGetRestartTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index db30a89..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.distributed.dht;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest
-    extends GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java
index 25b3901..1eb8347 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/AtomicPutAllChangingTopologyTest.java
@@ -26,7 +26,7 @@ import java.util.concurrent.CountDownLatch;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -68,7 +68,7 @@ public class AtomicPutAllChangingTopologyTest extends GridCommonAbstractTest {
         return new CacheConfiguration<Integer, Integer>()
             .setAtomicityMode(ATOMIC)
             .setCacheMode(REPLICATED)
-            .setAffinity(new FairAffinityFunction(false, 1))
+            .setAffinity(new RendezvousAffinityFunction(false, 1))
             .setWriteSynchronizationMode(FULL_SYNC)
             .setRebalanceMode(SYNC)
             .setName(CACHE_NAME);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 36e5054..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest
-    extends GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index eaaf808..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Multi-node tests for partitioned cache.
- */
-public class GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest extends GridCacheAtomicMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 5563dd3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest
-    extends GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 28080b7..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest
-    extends GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 860cdf4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- *
- */
-public class GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest extends GridCacheNearOnlyMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 5fab7d5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Multi-node tests for partitioned cache with {@link FairAffinityFunction}.
- */
-public class CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest
-    extends GridCacheReplicatedMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction(true));
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index d06bf9b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/CacheReplicatedFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Multi-node tests for partitioned cache with {@link FairAffinityFunction}.
- */
-public class CacheReplicatedFairAffinityMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction(false));
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 9dfaafb..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,37 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest;
-
-/**
- * Multi-node tests for partitioned cache with {@link FairAffinityFunction}.
- */
-public class GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest
-    extends GridCachePartitionedMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
-
-        cfg.setAffinity(new FairAffinityFunction());
-
-        return cfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index fdc800f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest
-    extends GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 1ccee61..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest extends
-    GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 0948a1d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest extends
-    GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testPutAllPutAll() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1112");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index c55f06f6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest extends
-    GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 7db196a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest extends
-    GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 9e4abd5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest extends
-    GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 2b9bf56..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest extends
-    GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
index 14cdc2a..26e7a90 100644
--- a/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
+++ b/modules/core/src/test/java/org/apache/ignite/testframework/configvariations/ConfigVariations.java
@@ -32,7 +32,6 @@ import org.apache.ignite.cache.CacheInterceptorAdapter;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.eviction.EvictionFilter;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStoreSession;
@@ -120,7 +119,6 @@ public class ConfigVariations {
                 EVICTION_PARAM,
                 CACHE_STORE_PARAM,
                 REBALANCING_PARAM,
-                Parameters.parameter("setAffinity", Parameters.factory(FairAffinityFunction.class)),
                 Parameters.parameter("setInterceptor", Parameters.factory(NoopInterceptor.class)),
                 Parameters.parameter("setTopologyValidator", Parameters.factory(NoopTopologyValidator.class)),
                 Parameters.parameter("addCacheEntryListenerConfiguration", Parameters.factory(EmptyCacheEntryListenerConfiguration.class))

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
index 986b8d4..3b42f16 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFailoverTestSuite.java
@@ -23,8 +23,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheIncrementTransformTe
 import org.apache.ignite.internal.processors.cache.IgniteCacheTopologySafeGetSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheAtomicNodeJoinTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheSizeFailoverTest;
-import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheTxFairAffinityNodeJoinTest;
-import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheTxNearDisabledPutGetRestartTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheTxNodeJoinTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtAtomicRemoveFailureTest;
@@ -85,10 +83,8 @@ public class IgniteCacheFailoverTestSuite extends TestSuite {
 
         suite.addTestSuite(IgniteCacheAtomicNodeJoinTest.class);
         suite.addTestSuite(IgniteCacheTxNodeJoinTest.class);
-        suite.addTestSuite(IgniteCacheTxFairAffinityNodeJoinTest.class);
 
         suite.addTestSuite(IgniteCacheTxNearDisabledPutGetRestartTest.class);
-        suite.addTestSuite(IgniteCacheTxNearDisabledFairAffinityPutGetRestartTest.class);
 
         suite.addTestSuite(IgniteCacheSizeFailoverTest.class);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
index 896bb0e..e9813dd 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
@@ -18,32 +18,25 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicClientOnlyMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicCopyOnReadDisabledMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearEnabledMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOnheapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedCopyOnReadDisabledMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest;
@@ -98,14 +91,6 @@ public class IgniteCacheFullApiMultiJvmSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest.class);
 
-        suite.addTestSuite(GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicNearEnabledFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.class);
-
         suite.addTestSuite(GridCacheAtomicOnheapMultiJvmFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index fa11f24..1a1bfe7 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -22,15 +22,12 @@ import org.apache.ignite.internal.processors.cache.GridCacheClearSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledPrimaryWriteOrderFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest;
@@ -38,25 +35,22 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePart
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedMultiNodeLongTxTimeoutFullApiTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicCopyOnReadDisabledMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicLateAffDisabledPrimaryWriteOrderMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearReloadAllSelfTest;
@@ -75,11 +69,8 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedAtomicFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedAtomicMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest;
@@ -159,17 +150,8 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest.class);
 
-        suite.addTestSuite(CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(CacheReplicatedFairAffinityMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(CacheReplicatedRendezvousAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicNearEnabledFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest.class);
 
         suite.addTestSuite(GridCacheNearReloadAllSelfTest.class);
         suite.addTestSuite(GridCacheColocatedReloadAllSelfTest.class);
@@ -182,7 +164,7 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class);;
+        suite.addTestSuite(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.class);;
 
         // Old affinity assignment mode.

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 5c1a879..0c310a7 100755
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -20,13 +20,6 @@ package org.apache.ignite.testsuites;
 import java.util.Set;
 import junit.framework.TestSuite;
 import org.apache.ignite.cache.IgniteWarmupClosureSelfTest;
-import org.apache.ignite.cache.affinity.AffinityClientNodeSelfTest;
-import org.apache.ignite.cache.affinity.AffinityHistoryCleanupTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityDynamicCacheSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionNodesSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityNodesRestart;
-import org.apache.ignite.cache.affinity.local.LocalAffinityFunctionTest;
 import org.apache.ignite.cache.store.GridCacheBalancingStoreSelfTest;
 import org.apache.ignite.cache.store.GridCacheLoadOnlyStoreAdapterSelfTest;
 import org.apache.ignite.cache.store.StoreResourceInjectionSelfTest;
@@ -38,12 +31,12 @@ import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreOptimizedMarshallerW
 import org.apache.ignite.cache.store.jdbc.CacheJdbcPojoStoreTest;
 import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreMultithreadedSelfTest;
 import org.apache.ignite.cache.store.jdbc.GridCacheJdbcBlobStoreSelfTest;
+import org.apache.ignite.cache.store.jdbc.JdbcTypesDefaultTransformerTest;
 import org.apache.ignite.internal.managers.communication.IgniteCommunicationBalanceMultipleConnectionsTest;
 import org.apache.ignite.internal.managers.communication.IgniteCommunicationBalancePairedConnectionsTest;
 import org.apache.ignite.internal.managers.communication.IgniteCommunicationBalanceTest;
 import org.apache.ignite.internal.managers.communication.IgniteIoTestMessagesTest;
 import org.apache.ignite.internal.managers.communication.IgniteVariousConnectionNumberTest;
-import org.apache.ignite.cache.store.jdbc.JdbcTypesDefaultTransformerTest;
 import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteQueueTest;
 import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteSanitySelfTest;

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index 1c50908..f902242 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionBackupFilterSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionExcludeNeighborsSelfTest;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionBackupFilterSelfTest;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunctionExcludeNeighborsSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheConcurrentReadThroughTest;
@@ -173,7 +171,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCacheAtomicNearReadersSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAffinitySelfTest.class));
         suite.addTest(new TestSuite(RendezvousAffinityFunctionExcludeNeighborsSelfTest.class));
-        suite.addTest(new TestSuite(FairAffinityFunctionExcludeNeighborsSelfTest.class));
         suite.addTest(new TestSuite(GridCacheRendezvousAffinityClientSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedProjectionAffinitySelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedBasicOpSelfTest.class));
@@ -210,7 +207,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCacheDhtPreloadStartStopSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadUnloadSelfTest.class));
         suite.addTest(new TestSuite(RendezvousAffinityFunctionBackupFilterSelfTest.class));
-        suite.addTest(new TestSuite(FairAffinityFunctionBackupFilterSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedPreloadLifecycleSelfTest.class));
         suite.addTest(new TestSuite(CacheLoadingConcurrentGridStartSelfTest.class));
         suite.addTest(new TestSuite(CacheLoadingConcurrentGridStartSelfTestAllowOverwrite.class));


[08/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
deleted file mode 100644
index 4233244..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedEvictionSelfTest.java
+++ /dev/null
@@ -1,135 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.UUID;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.PA;
-import org.apache.ignite.lang.IgniteFuture;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheMode.REPLICATED;
-import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-
-/**
- * Tests synchronous eviction for replicated cache.
- */
-public class GridCacheReplicatedEvictionSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return REPLICATED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setEvictSynchronized(true);
-        ccfg.setEvictSynchronizedKeyBufferSize(1);
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean swapEnabled() {
-        return false;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testEvictSynchronized() throws Exception {
-        final int KEYS = 10;
-
-        for (int i = 0; i < KEYS; i++)
-            jcache(0).put(String.valueOf(i), i);
-
-        for (int g = 0 ; g < gridCount(); g++) {
-            for (int i = 0; i < KEYS; i++)
-                assertNotNull(jcache(g).localPeek(String.valueOf(i)));
-        }
-
-        Collection<IgniteFuture<Event>> futs = new ArrayList<>();
-
-        for (int g = 0 ; g < gridCount(); g++)
-            futs.add(waitForLocalEvent(grid(g).events(), nodeEvent(grid(g).localNode().id()), EVT_CACHE_ENTRY_EVICTED));
-
-        for (int g = 0; g < gridCount(); g++) {
-            for (int i = 0; i < KEYS; i++) {
-                if (grid(g).affinity(null).isPrimary(grid(g).localNode(), String.valueOf(i)))
-                    jcache(g).localEvict(Collections.singleton(String.valueOf(i)));
-            }
-        }
-
-        for (IgniteFuture<Event> fut : futs)
-            fut.get(3000);
-
-        boolean evicted = GridTestUtils.waitForCondition(new PA() {
-            @Override public boolean apply() {
-                for (int g = 0 ; g < gridCount(); g++) {
-                    for (int i = 0; i < KEYS; i++) {
-                        if (jcache(g).localPeek(String.valueOf(i)) != null) {
-                            log.info("Non-null value, will wait [grid=" + g + ", key=" + i + ']');
-
-                            return false;
-                        }
-                    }
-                }
-
-                return true;
-            }
-        }, 3000);
-
-        assertTrue(evicted);
-    }
-
-    /**
-     * @param nodeId Node id.
-     * @return Predicate for events belonging to specified node.
-     */
-    private IgnitePredicate<Event> nodeEvent(final UUID nodeId) {
-        assert nodeId != null;
-
-        return new P1<Event>() {
-            @Override public boolean apply(Event e) {
-                info("Predicate called [e.nodeId()=" + e.node().id() + ", nodeId=" + nodeId + ']');
-
-                return e.node().id().equals(nodeId);
-            }
-        };
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
deleted file mode 100644
index 9a6703b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests replicated cache with values being stored off-heap.
- */
-public class GridCacheReplicatedOffHeapFullApiSelfTest extends GridCacheReplicatedFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 237e5f5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests replicated cache with values being stored off-heap.
- */
-public class GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 4f909e4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests replicated cache with off-heap tiered mode.
- */
-public class GridCacheReplicatedOffHeapTieredFullApiSelfTest extends
-    GridCacheReplicatedOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index babe1c4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.replicated;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests replicated cache with off-heap tiered mode.
- */
-public class GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest extends
-    GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest{
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..4280277
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.replicated;
+
+public class GridCacheReplicatedOnheapFullApiSelfTest extends GridCacheReplicatedFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..cd04b58
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.replicated;
+
+public class GridCacheReplicatedOnheapMultiNodeFullApiSelfTest extends GridCacheReplicatedMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
deleted file mode 100644
index b4f9960..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/preloader/GridCacheReplicatedPreloadOffHeapSelfTest.java
+++ /dev/null
@@ -1,37 +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.apache.ignite.internal.processors.cache.distributed.replicated.preloader;
-
-import org.apache.ignite.configuration.CacheConfiguration;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests for replicated cache preloader.
- */
-public class GridCacheReplicatedPreloadOffHeapSelfTest extends GridCacheReplicatedPreloadSelfTest {
-    /** {@inheritDoc} */
-    @Override CacheConfiguration cacheConfiguration(String igniteInstanceName) {
-        CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
-        cacheCfg.setMemoryMode(OFFHEAP_VALUES);
-        cacheCfg.setOffHeapMaxMemory(0);
-
-        return cacheCfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
index 707bfba..b6fcebc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/EvictionAbstractTest.java
@@ -75,12 +75,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
     /** Near enabled flag. */
     protected boolean nearEnabled;
 
-    /** Evict backup sync. */
-    protected boolean evictSync;
-
-    /** Evict near sync. */
-    protected boolean evictNearSync = true;
-
     /** Policy max. */
     protected int plcMax = 10;
 
@@ -110,7 +104,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
 
         cc.setCacheMode(mode);
         cc.setEvictionPolicy(createPolicy(plcMax));
-        cc.setEvictSynchronized(evictSync);
+        cc.setOnheapCacheEnabled(true);
         cc.setWriteSynchronizationMode(syncCommit ? FULL_SYNC : FULL_ASYNC);
         cc.setStartSize(plcMax);
         cc.setAtomicityMode(TRANSACTIONAL);
@@ -705,7 +699,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
         nearEnabled = true;
         nearMax = 3;
         plcMax = 10;
-        evictNearSync = true;
         syncCommit = true;
 
         gridCnt = 2;
@@ -718,19 +711,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
         mode = PARTITIONED;
         nearEnabled = false;
         plcMax = 100;
-        evictSync = false;
-
-        gridCnt = 2;
-
-        checkPartitionedMultiThreaded();
-    }
-
-    /** @throws Exception If failed. */
-    public void testPartitionedNearDisabledBackupSyncMultiThreaded() throws Exception {
-        mode = PARTITIONED;
-        nearEnabled = false;
-        plcMax = 100;
-        evictSync = true;
 
         gridCnt = 2;
 
@@ -742,19 +722,6 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
         mode = PARTITIONED;
         nearEnabled = true;
         plcMax = 10;
-        evictSync = false;
-
-        gridCnt = 2;
-
-        checkPartitionedMultiThreaded();
-    }
-
-    /** @throws Exception If failed. */
-    public void testPartitionedNearEnabledBackupSyncMultiThreaded() throws Exception {
-        mode = PARTITIONED;
-        nearEnabled = true;
-        plcMax = 10;
-        evictSync = true;
 
         gridCnt = 2;
 
@@ -814,7 +781,7 @@ public abstract class EvictionAbstractTest<T extends EvictionPolicy<?, ?>>
 
                 if (plcMax > 0) {
                     for (int i = 0; i < gridCnt; i++) {
-                        int actual = colocated(i).size();
+                        int actual = colocated(i).map().keySet().size();
 
                         assertTrue("Cache size is greater then policy size [expected=" + endSize + ", actual=" + actual + ']',
                             actual <= endSize + (plcMaxMemSize > 0 ? 1 : plcBatchSize));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
deleted file mode 100644
index 67700b6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheBatchEvictUnswapSelfTest.java
+++ /dev/null
@@ -1,199 +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.apache.ignite.internal.processors.cache.eviction;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.cache.store.CacheStore;
-import org.apache.ignite.cache.store.CacheStoreAdapter;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.lang.IgniteBiInClosure;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Swap benchmark.
- */
-@SuppressWarnings("BusyWait")
-public class GridCacheBatchEvictUnswapSelfTest extends GridCacheAbstractSelfTest {
-    /** Eviction policy size. */
-    public static final int EVICT_PLC_SIZE = 100000;
-
-    /** Keys count. */
-    public static final int KEYS_CNT = 100000;
-
-    /** Batch size. */
-    private static final int BATCH_SIZE = 200;
-
-    /** Number of threads for concurrent benchmark + concurrency level. */
-    private static final int N_THREADS = 8;
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        // Let this test run 2 minutes as it runs for 20 seconds locally.
-        return 2 * 60 * 1000;
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration cacheCfg = super.cacheConfiguration(igniteInstanceName);
-
-        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-
-        CacheStore store = new CacheStoreAdapter<Long, String>() {
-            @Nullable @Override public String load(Long key) {
-                return null;
-            }
-
-            @Override public void loadCache(final IgniteBiInClosure<Long, String> c,
-                @Nullable Object... args) {
-                for (int i = 0; i < KEYS_CNT; i++)
-                    c.apply((long)i, String.valueOf(i));
-            }
-
-            @Override public void write(javax.cache.Cache.Entry<? extends Long, ? extends String> val) {
-                // No-op.
-            }
-
-            @Override public void delete(Object key) {
-                // No-op.
-            }
-        };
-
-        cacheCfg.setCacheStoreFactory(singletonFactory(store));
-        cacheCfg.setReadThrough(true);
-        cacheCfg.setWriteThrough(true);
-        cacheCfg.setLoadPreviousValue(true);
-
-        FifoEvictionPolicy plc = new FifoEvictionPolicy();
-        plc.setMaxSize(EVICT_PLC_SIZE);
-
-        cacheCfg.setEvictionPolicy(plc);
-        cacheCfg.setEvictSynchronized(false);
-        cacheCfg.setNearConfiguration(null);
-
-        return cacheCfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testConcurrentEvictions() throws Exception {
-        runConcurrentTest(grid(0), KEYS_CNT, BATCH_SIZE);
-    }
-
-    /**
-     * @param g Grid instance.
-     * @param keysCnt Number of keys to swap and promote.
-     * @param batchSize Size of batch to swap/promote.
-     * @throws Exception If failed.
-     */
-    private void runConcurrentTest(Ignite g, final int keysCnt, final int batchSize) throws Exception {
-        assert keysCnt % batchSize == 0;
-
-        final AtomicInteger evictedKeysCnt = new AtomicInteger();
-
-        final IgniteCache<Object, Object> cache = g.cache(null);
-
-        cache.loadCache(null, 0);
-
-        info("Finished load cache.");
-
-        IgniteInternalFuture<?> evictFut = multithreadedAsync(new Runnable() {
-            @Override public void run() {
-                Collection<Long> keys = new ArrayList<>(batchSize);
-
-                int evictedBatches = 0;
-
-                for (long i = 0; i < keysCnt; i++) {
-                    keys.add(i);
-
-                    if (keys.size() == batchSize) {
-                        for (Long key : keys)
-                            cache.localEvict(Collections.<Object>singleton(key));
-
-                        evictedKeysCnt.addAndGet(batchSize);
-
-                        keys.clear();
-
-                        evictedBatches++;
-
-                        if (evictedBatches % 100 == 0 && evictedBatches > 0)
-                            info("Evicted " + (evictedBatches * batchSize) + " entries.");
-                    }
-                }
-            }
-        }, N_THREADS, "evict");
-
-        final AtomicInteger unswappedKeys = new AtomicInteger();
-
-        IgniteInternalFuture<?> unswapFut = multithreadedAsync(new Runnable() {
-            @Override public void run() {
-                try {
-                    Collection<Long> keys = new ArrayList<>(batchSize);
-
-                    int unswappedBatches = 0;
-
-                    for (long i = 0; i < keysCnt; i++) {
-                        keys.add(i);
-
-                        if (keys.size() == batchSize) {
-                            for (Long key : keys)
-                                cache.localPromote(Collections.singleton(key));
-
-                            unswappedKeys.addAndGet(batchSize);
-
-                            keys.clear();
-
-                            unswappedBatches++;
-
-                            if (unswappedBatches % 100 == 0 && unswappedBatches > 0)
-                                info("Unswapped " + (unswappedBatches * batchSize) + " entries.");
-                        }
-                    }
-                }
-                catch (IgniteException e) {
-                    e.printStackTrace();
-                }
-            }
-        }, N_THREADS, "promote");
-
-        evictFut.get();
-
-        unswapFut.get();
-
-        info("Clearing cache.");
-
-        for (long i = 0; i < KEYS_CNT; i++)
-            cache.remove(i);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
index f7ef897..e61bef6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionConsistencySelfTest.java
@@ -24,6 +24,7 @@ import java.util.concurrent.Callable;
 import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.EvictableEntry;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -83,6 +84,7 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
         cc.setNearConfiguration(null);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 
@@ -295,10 +297,10 @@ public class GridCacheConcurrentEvictionConsistencySelfTest extends GridCommonAb
             if (detached)
                 fail("Eviction policy contains keys that are not present in cache");
 
-            if (!(cache.localSize() == 0)) {
+            if (!(cache.localSize(CachePeekMode.ONHEAP) == 0)) {
                 boolean zombies = false;
 
-                for (Cache.Entry<Integer, Integer> e : cache) {
+                for (Cache.Entry<Integer, Integer> e : cache.localEntries(CachePeekMode.ONHEAP)) {
                     U.warn(log, "Zombie entry: " + e);
 
                     zombies = true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
index 8eb029e..31d7c26 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheConcurrentEvictionsSelfTest.java
@@ -75,6 +75,7 @@ public class GridCacheConcurrentEvictionsSelfTest extends GridCommonAbstractTest
         cc.setNearConfiguration(null);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
deleted file mode 100644
index 7621897..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheDistributedEvictionsSelfTest.java
+++ /dev/null
@@ -1,235 +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.apache.ignite.internal.processors.cache.eviction;
-
-import java.util.TreeSet;
-import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CacheWriteSynchronizationMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.configuration.TransactionConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.GridCacheModuloAffinityFunction;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.U;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMode.LOCAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
-
-/**
- *
- */
-public class GridCacheDistributedEvictionsSelfTest extends GridCommonAbstractTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** */
-    private int gridCnt = 2;
-
-    /** */
-    private CacheMode mode;
-
-    /** */
-    private boolean nearEnabled;
-
-    /** */
-    private boolean evictSync;
-
-    /** */
-    private final AtomicInteger idxGen = new AtomicInteger();
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
-
-        TransactionConfiguration tCfg = new TransactionConfiguration();
-
-        tCfg.setDefaultTxConcurrency(PESSIMISTIC);
-        tCfg.setDefaultTxIsolation(READ_COMMITTED);
-
-        c.setTransactionConfiguration(tCfg);
-
-        CacheConfiguration cc = defaultCacheConfiguration();
-
-        cc.setCacheMode(mode);
-        cc.setAtomicityMode(TRANSACTIONAL);
-
-        if (nearEnabled) {
-            NearCacheConfiguration nearCfg = new NearCacheConfiguration();
-
-            cc.setNearConfiguration(nearCfg);
-        }
-
-        cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
-
-        // Set only DHT policy, leave default near policy.
-        FifoEvictionPolicy plc = new FifoEvictionPolicy();
-        plc.setMaxSize(10);
-
-        cc.setEvictionPolicy(plc);
-        cc.setEvictSynchronized(evictSync);
-        cc.setEvictSynchronizedKeyBufferSize(1);
-
-        cc.setAffinity(new GridCacheModuloAffinityFunction(gridCnt, 1));
-
-        c.setCacheConfiguration(cc);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        c.setDiscoverySpi(disco);
-
-        c.setUserAttributes(F.asMap(GridCacheModuloAffinityFunction.IDX_ATTR, idxGen.getAndIncrement()));
-
-        return c;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-
-        super.afterTest();
-    }
-
-    /** @throws Throwable If failed. */
-    public void testNearSyncBackupSync() throws Throwable {
-        gridCnt = 3;
-        mode = PARTITIONED;
-        evictSync = true;
-        nearEnabled = true;
-
-        checkEvictions();
-    }
-
-    /**
-     * @throws Throwable If failed.
-     */
-    public void testLocalSync() throws Throwable {
-        gridCnt = 1;
-        mode = LOCAL;
-        evictSync = true;
-        nearEnabled = true;
-
-        Ignite g = startGrid(0);
-
-        final IgniteCache<Integer, Integer> cache = g.cache(null);
-
-        for (int i = 1; i < 20; i++) {
-            cache.put(i * gridCnt, i * gridCnt);
-
-            info("Put to cache: " + i * gridCnt);
-        }
-    }
-
-    /** @throws Throwable If failed. */
-    private void checkEvictions() throws Throwable {
-        try {
-            startGrids(gridCnt);
-
-            Ignite ignite = grid(0);
-
-            final IgniteCache<Integer, Integer> cache = ignite.cache(null);
-
-            // Put 1 entry to primary node.
-            cache.put(0, 0);
-
-            Integer nearVal = this.<Integer, Integer>jcache(2).get(0);
-
-            assert nearVal == 0 : "Unexpected near value: " + nearVal;
-
-            // Put several vals to primary node.
-            for (int i = 1; i < 20; i++) {
-                cache.put(i * gridCnt, i * gridCnt);
-
-                info("Put to cache: " + i * gridCnt);
-            }
-
-            for (int i = 0; i < 3; i++) {
-                try {
-                    assert jcache(2).get(0) == null : "Entry has not been evicted from near node for key: " + 0;
-                    assert jcache(1).get(0) == null : "Entry has not been evicted from backup node for key: " + 0;
-                    assert cache.get(0) == null : "Entry has not been evicted from primary node for key: " + 0;
-                }
-                catch (Throwable e) {
-                    if (i == 2)
-                        // No attempts left.
-                        throw e;
-
-                    U.warn(log, "Check failed (will retry in 2000 ms): " + e);
-
-                    // Unwind evicts?
-                    cache.get(0);
-
-                    U.sleep(2000);
-                }
-            }
-
-            for (int i = 0; i < 3; i++) {
-                info("Primary key set: " + new TreeSet<>(this.<Integer, Integer>dht(0).keySet()));
-                info("Primary near key set: " + new TreeSet<>(this.<Integer, Integer>near(0).keySet()));
-
-                info("Backup key set: " + new TreeSet<>(this.<Integer, Integer>dht(1).keySet()));
-                info("Backup near key set: " + new TreeSet<>(this.<Integer, Integer>near(1).keySet()));
-
-                info("Near key set: " + new TreeSet<>(this.<Integer, Integer>dht(2).keySet()));
-                info("Near node near key set: " + new TreeSet<>(this.<Integer, Integer>near(2).keySet()));
-
-                try {
-                    assert cache.localSize() == 10 : "Invalid cache size [size=" + cache.localSize() + ']';
-                    assert cache.localSize() == 10 : "Invalid key size [size=" + cache.localSize() + ']';
-
-                    assert jcache(2).localSize() == 0;
-
-                    break;
-                }
-                catch (Throwable e) {
-                    if (i == 2)
-                        // No attempts left.
-                        throw e;
-
-                    U.warn(log, "Check failed (will retry in 2000 ms): " + e);
-
-                    // Unwind evicts?
-                    cache.get(0);
-
-                    U.sleep(2000);
-                }
-            }
-        }
-        catch (Throwable t) {
-            error("Test failed.", t);
-
-            throw t;
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
index 0c4ac3f..c97f2ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEmptyEntriesAbstractSelfTest.java
@@ -83,9 +83,7 @@ public abstract class GridCacheEmptyEntriesAbstractSelfTest extends GridCommonAb
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
         cc.setEvictionPolicy(plc);
-        cc.setEvictSynchronizedKeyBufferSize(1);
-
-        cc.setEvictSynchronized(true);
+        cc.setOnheapCacheEnabled(true);
 
         if (testStore != null) {
             cc.setCacheStoreFactory(singletonFactory(testStore));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
index 2b40365..98c8b77 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictableEntryEqualsSelfTest.java
@@ -39,6 +39,7 @@ public class GridCacheEvictableEntryEqualsSelfTest extends GridCommonAbstractTes
             CacheConfiguration<TestKey, String> cfg = new CacheConfiguration<>("test");
 
             cfg.setEvictionPolicy(new TestEvictionPolicy());
+            cfg.setOnheapCacheEnabled(true);
 
             IgniteCache<TestKey, String> cache = ignite.createCache(cfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
index db23661..eb675ad 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionFilterSelfTest.java
@@ -74,7 +74,7 @@ public class GridCacheEvictionFilterSelfTest extends GridCommonAbstractTest {
 
         cc.setCacheMode(mode);
         cc.setEvictionPolicy(notSerializableProxy(plc, EvictionPolicy.class));
-        cc.setEvictSynchronized(false);
+        cc.setOnheapCacheEnabled(true);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setEvictionFilter(notSerializableProxy(filter, org.apache.ignite.cache.eviction.EvictionFilter.class));
         cc.setRebalanceMode(SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
index ba9b2d7..55b7b63 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionLockUnlockSelfTest.java
@@ -73,6 +73,7 @@ public class GridCacheEvictionLockUnlockSelfTest extends GridCommonAbstractTest
         cc.setCacheMode(mode);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setEvictionPolicy(new EvictionPolicy());
+        cc.setOnheapCacheEnabled(true);
         cc.setAtomicityMode(TRANSACTIONAL);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
index d8746c8..396083e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheEvictionTouchSelfTest.java
@@ -28,6 +28,7 @@ import java.util.TreeSet;
 import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStore;
@@ -74,6 +75,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
         cc.setWriteSynchronizationMode(FULL_SYNC);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         CacheStore store = new GridCacheGenericTestStore<Object, Object>() {
             @Override public Object load(Object key) {
@@ -191,7 +193,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
                 cache.localEvict(Collections.singleton(i));
 
             assertEquals(0, ((FifoEvictionPolicy)plc).queue().size());
-            assertEquals(0, cache.size());
+            assertEquals(0, cache.size(CachePeekMode.ONHEAP));
         }
         finally {
             stopAllGrids();
@@ -226,7 +228,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
                 cache.localEvict(Collections.singleton(key));
 
             assertEquals(0, ((FifoEvictionPolicy)plc).queue().size());
-            assertEquals(0, cache.size());
+            assertEquals(0, cache.size(CachePeekMode.ONHEAP));
         }
         finally {
             stopAllGrids();
@@ -250,8 +252,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < 10000; i++)
                 load(cache, i, true);
 
-            assertEquals(100, cache.size());
-            assertEquals(100, cache.size());
+            assertEquals(100, cache.size(CachePeekMode.ONHEAP));
             assertEquals(100, ((FifoEvictionPolicy)plc).queue().size());
 
             Set<Integer> keys = new TreeSet<>();
@@ -261,8 +262,7 @@ public class GridCacheEvictionTouchSelfTest extends GridCommonAbstractTest {
 
             loadAll(cache, keys, true);
 
-            assertEquals(100, cache.size());
-            assertEquals(100, cache.size());
+            assertEquals(100, cache.size(CachePeekMode.ONHEAP));
             assertEquals(100, ((FifoEvictionPolicy)plc).queue().size());
         }
         finally {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
deleted file mode 100644
index 377afa0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/GridCacheSynchronousEvictionsFailoverSelfTest.java
+++ /dev/null
@@ -1,166 +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.apache.ignite.internal.processors.cache.eviction;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Random;
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicBoolean;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.processors.cache.GridCacheAbstractSelfTest;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class GridCacheSynchronousEvictionsFailoverSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-804");
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 3;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setEvictSynchronized(true);
-        ccfg.setEvictSynchronizedKeyBufferSize(10);
-
-        ccfg.setBackups(2);
-
-        ccfg.setAffinity(new RendezvousAffinityFunction(false, 500));
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return 60_000;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testSynchronousEvictions() throws Exception {
-        IgniteCache<String, Integer> cache = jcache(0);
-
-        final AtomicBoolean stop = new AtomicBoolean();
-
-        IgniteInternalFuture<?> fut = null;
-
-        try {
-            Map<String, Integer> data = new HashMap<>();
-
-            addKeysForNode(affinity(cache), grid(0).localNode(), data);
-            addKeysForNode(affinity(cache), grid(1).localNode(), data);
-            addKeysForNode(affinity(cache), grid(2).localNode(), data);
-
-            fut = GridTestUtils.runAsync(new Callable<Void>() {
-                @Override public Void call() throws Exception {
-                    Random rnd = new Random();
-
-                    while (!stop.get()) {
-                        int idx = rnd.nextBoolean() ? 1 : 2;
-
-                        log.info("Stopping grid: " + idx);
-
-                        stopGrid(idx);
-
-                        U.sleep(100);
-
-                        log.info("Starting grid: " + idx);
-
-                        startGrid(idx);
-                    }
-
-                    return null;
-                }
-            });
-
-            for (int i = 0 ; i < 100; i++) {
-                log.info("Iteration: " + i);
-
-                try {
-                    cache.putAll(data);
-                }
-                catch (IgniteException ignore) {
-                    continue;
-                }
-
-                cache.localEvict(data.keySet());
-            }
-        }
-        finally {
-            stop.set(true);
-
-            if (fut != null)
-                fut.get();
-        }
-    }
-
-    /**
-     * @param aff Cache affinity.
-     * @param node Primary node for keys.
-     * @param data Map where keys/values should be put to.
-     */
-    private void addKeysForNode(Affinity<String> aff, ClusterNode node, Map<String, Integer> data) {
-        int cntr = 0;
-
-        for (int i = 0; i < 100_000; i++) {
-            String key = String.valueOf(i);
-
-            if (aff.isPrimary(node, key)) {
-                data.put(key, i);
-
-                cntr++;
-
-                if (cntr == 500)
-                    break;
-            }
-        }
-
-        assertEquals(500, cntr);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
index ed7f918..0eb7a42 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearEvictionPolicySelfTest.java
@@ -21,7 +21,6 @@ import java.util.Random;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -33,7 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
@@ -54,9 +52,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
     /** Cache atomicity mode specified by test. */
     private CacheAtomicityMode atomicityMode;
 
-    /** Memory mode. */
-    private CacheMemoryMode memMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
@@ -65,7 +60,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
 
         cc.setCacheMode(PARTITIONED);
         cc.setAtomicityMode(atomicityMode);
-        cc.setMemoryMode(memMode);
         cc.setWriteSynchronizationMode(PRIMARY_SYNC);
         cc.setRebalanceMode(SYNC);
         cc.setStartSize(100);
@@ -95,17 +89,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
      */
     public void testAtomicNearEvictionMaxSize() throws Exception {
         atomicityMode = ATOMIC;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = ATOMIC;
-        memMode = CacheMemoryMode.OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }
@@ -115,17 +98,6 @@ public class LruNearEvictionPolicySelfTest extends GridCommonAbstractTest {
      */
     public void testTransactionalNearEvictionMaxSize() throws Exception {
         atomicityMode = TRANSACTIONAL;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTransactionalOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = TRANSACTIONAL;
-        memMode = CacheMemoryMode.OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
index 1f6ce65..5b0a12c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/lru/LruNearOnlyNearEvictionPolicySelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache.eviction.lru;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -33,8 +32,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
@@ -62,9 +59,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
     /** Cache atomicity mode specified by test. */
     private CacheAtomicityMode atomicityMode;
 
-    /** Memory mode. */
-    private CacheMemoryMode memMode;
-
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
         super.beforeTest();
@@ -83,7 +77,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
 
             cc.setCacheMode(cacheMode);
             cc.setAtomicityMode(atomicityMode);
-            cc.setMemoryMode(memMode);
             cc.setWriteSynchronizationMode(PRIMARY_SYNC);
             cc.setRebalanceMode(SYNC);
             cc.setStartSize(100);
@@ -105,18 +98,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
     public void testPartitionedAtomicNearEvictionMaxSize() throws Exception {
         atomicityMode = ATOMIC;
         cacheMode = PARTITIONED;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionedAtomicOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = ATOMIC;
-        cacheMode = PARTITIONED;
-        memMode = OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }
@@ -127,18 +108,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
     public void testPartitionedTransactionalNearEvictionMaxSize() throws Exception {
         atomicityMode = TRANSACTIONAL;
         cacheMode = PARTITIONED;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionedTransactionalOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = TRANSACTIONAL;
-        cacheMode = PARTITIONED;
-        memMode = OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }
@@ -149,18 +118,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
     public void testReplicatedAtomicNearEvictionMaxSize() throws Exception {
         atomicityMode = ATOMIC;
         cacheMode = REPLICATED;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedAtomicOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = ATOMIC;
-        cacheMode = REPLICATED;
-        memMode = OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }
@@ -171,18 +128,6 @@ public class LruNearOnlyNearEvictionPolicySelfTest extends GridCommonAbstractTes
     public void testReplicatedTransactionalNearEvictionMaxSize() throws Exception {
         atomicityMode = TRANSACTIONAL;
         cacheMode = REPLICATED;
-        memMode = ONHEAP_TIERED;
-
-        checkNearEvictionMaxSize();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedTransactionalOffHeapNearEvictionMaxSize() throws Exception {
-        atomicityMode = TRANSACTIONAL;
-        cacheMode = REPLICATED;
-        memMode = OFFHEAP_TIERED;
 
         checkNearEvictionMaxSize();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
index de41691..a3a61a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/sorted/SortedEvictionPolicyPerformanceTest.java
@@ -80,7 +80,7 @@ public class SortedEvictionPolicyPerformanceTest extends GridCommonAbstractTest
         plc.setMaxSize(MAX_SIZE);
 
         ccfg.setEvictionPolicy(plc);
-        ccfg.setEvictSynchronized(false);
+        ccfg.setOnheapCacheEnabled(true);
 
         cfg.setPeerClassLoadingEnabled(false);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
deleted file mode 100644
index 24a7478..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicLocalOffheapExpiryPolicyTest extends IgniteCacheAtomicLocalExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
new file mode 100644
index 0000000..af178e5
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicLocalOnheapExpiryPolicyTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.expiry;
+
+public class IgniteCacheAtomicLocalOnheapExpiryPolicyTest extends IgniteCacheAtomicLocalExpiryPolicyTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
deleted file mode 100644
index 45a0183..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicOffheapExpiryPolicyTest extends IgniteCacheAtomicExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
new file mode 100644
index 0000000..f71a4e3
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicOnheapExpiryPolicyTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.expiry;
+
+public class IgniteCacheAtomicOnheapExpiryPolicyTest extends IgniteCacheAtomicExpiryPolicyTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
deleted file mode 100644
index 594a6d9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest extends
-    IgniteCacheAtomicPrimaryWriteOrderExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index 51d8ba2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest extends
-    IgniteCacheAtomicPrimaryWriteOrderWithStoreExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
deleted file mode 100644
index a65e155..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest extends IgniteCacheAtomicReplicatedExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index ffb170b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest extends IgniteCacheAtomicWithStoreExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index e7a76db..a40c555 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -38,7 +38,6 @@ import javax.cache.processor.EntryProcessor;
 import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -110,11 +109,6 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
 
         cfg.setExpiryPolicyFactory(factory);
 
-        cfg.setMemoryMode(memoryMode());
-
-        if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            cfg.setOffHeapMaxMemory(0);
-
         if (disableEagerTtl)
             cfg.setEagerTtl(false);
 
@@ -122,13 +116,6 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
     }
 
     /**
-     * @return Cache memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
-    }
-
-    /**
      * @throws Exception if failed.
      */
     public void testCreateUpdate0() throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
index faa0cd5..58a8fdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyTestSuite.java
@@ -48,19 +48,6 @@ public class IgniteCacheExpiryPolicyTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheTxWithStoreExpiryPolicyTest.class);
         suite.addTestSuite(IgniteCacheTxReplicatedExpiryPolicyTest.class);
 
-        // Offheap tests.
-        suite.addTestSuite(IgniteCacheAtomicLocalOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheAtomicOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheAtomicWithStoreOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheAtomicPrimaryWriteOrderWithStoreOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheAtomicReplicatedOffheapExpiryPolicyTest.class);
-
-        suite.addTestSuite(IgniteCacheTxLocalOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheTxOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheTxWithStoreOffheapExpiryPolicyTest.class);
-        suite.addTestSuite(IgniteCacheTxReplicatedOffheapExpiryPolicyTest.class);
-
         suite.addTestSuite(IgniteCacheAtomicExpiryPolicyWithStoreTest.class);
         suite.addTestSuite(IgniteCacheTxExpiryPolicyWithStoreTest.class);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
deleted file mode 100644
index 60fa556..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxLocalOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxLocalOffheapExpiryPolicyTest extends IgniteCacheTxLocalExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}


[21/57] [abbrv] ignite git commit: ignite-4571 - reviewed contribution

Posted by ag...@apache.org.
ignite-4571 - reviewed contribution


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

Branch: refs/heads/ignite-3477-debug
Commit: b99c1980dfe250b3f24a94eb4b6cb948bb314ab5
Parents: 5c48260
Author: Konstantin Dudkov <kd...@ya.ru>
Authored: Mon Apr 10 18:29:33 2017 +0300
Committer: Yakov Zhdanov <yz...@gridgain.com>
Committed: Mon Apr 10 18:29:33 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAtomicFuture.java |  2 +-
 .../processors/cache/GridCacheMvccManager.java  | 84 ++++++++++++++++----
 .../cache/GridDeferredAckMessageSender.java     | 11 ++-
 .../GridDhtAtomicAbstractUpdateFuture.java      |  4 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |  2 +-
 .../GridNearAtomicSingleUpdateFuture.java       | 21 ++---
 .../dht/atomic/GridNearAtomicUpdateFuture.java  | 23 +++---
 .../cache/transactions/IgniteTxManager.java     |  2 +-
 8 files changed, 102 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
index 8df229e..87ae29c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAtomicFuture.java
@@ -27,7 +27,7 @@ public interface GridCacheAtomicFuture<R> extends GridCacheFuture<R> {
     /**
      * @return Future ID.
      */
-    public Long id();
+    public long id();
 
     /**
      * Gets future that will be completed when it is safe when update is finished on the given version of topology.

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
index dff2c88..712d136 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java
@@ -81,6 +81,9 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     /** Maxim number of removed locks. */
     private static final int MAX_REMOVED_LOCKS = 10240;
 
+    /** Maxim number of atomic IDs for thread. Must be power of two! */
+    protected static final int THREAD_RESERVE_SIZE = 0x4000;
+
     /** */
     private static final int MAX_NESTED_LSNR_CALLS = getInteger(IGNITE_MAX_NESTED_LISTENER_CALLS, 5);
 
@@ -106,9 +109,6 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     @GridToStringExclude
     private final ConcurrentMap<GridCacheVersion, Collection<GridCacheMvccFuture<?>>> mvccFuts = newMap();
 
-    /** */
-    private final AtomicLong atomicFutId = new AtomicLong(U.currentTimeMillis());
-
     /** Pending atomic futures. */
     private final ConcurrentHashMap8<Long, GridCacheAtomicFuture<?>> atomicFuts = new ConcurrentHashMap8<>();
 
@@ -138,6 +138,16 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     /** */
     private volatile boolean stopping;
 
+    /** Global atomic id counter. */
+    protected final AtomicLong globalAtomicCnt = new AtomicLong();
+
+    /** Per thread atomic id counter. */
+    private final ThreadLocal<LongWrapper> threadAtomicCnt = new ThreadLocal<LongWrapper>() {
+        @Override protected LongWrapper initialValue() {
+            return new LongWrapper(globalAtomicCnt.getAndAdd(THREAD_RESERVE_SIZE));
+        }
+    };
+
     /** Lock callback. */
     @GridToStringExclude
     private final GridCacheMvccCallback cb = new GridCacheMvccCallback() {
@@ -256,9 +266,9 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
                 cacheFut.onNodeLeft(discoEvt.eventNode().id());
 
                 if (cacheFut.isCancelled() || cacheFut.isDone()) {
-                    Long futId = cacheFut.id();
+                    long futId = cacheFut.id();
 
-                    if (futId != null)
+                    if (futId > 0)
                         atomicFuts.remove(futId, cacheFut);
                 }
             }
@@ -426,18 +436,11 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     }
 
     /**
-     * @return ID for atomic cache update future.
-     */
-    public long atomicFutureId() {
-        return atomicFutId.incrementAndGet();
-    }
-
-    /**
      * @param futId Future ID.
      * @param fut Future.
      * @return {@code False} if future was forcibly completed with error.
      */
-    public boolean addAtomicFuture(Long futId, GridCacheAtomicFuture<?> fut) {
+    public boolean addAtomicFuture(long futId, GridCacheAtomicFuture<?> fut) {
         IgniteInternalFuture<?> old = atomicFuts.put(futId, fut);
 
         assert old == null : "Old future is not null [futId=" + futId + ", fut=" + fut + ", old=" + old + ']';
@@ -472,7 +475,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
      * @param futId Future ID.
      * @return Future.
      */
-    @Nullable public IgniteInternalFuture<?> atomicFuture(Long futId) {
+    @Nullable public IgniteInternalFuture<?> atomicFuture(long futId) {
         return atomicFuts.get(futId);
     }
 
@@ -480,7 +483,7 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
      * @param futId Future ID.
      * @return Removed future.
      */
-    @Nullable public IgniteInternalFuture<?> removeAtomicFuture(Long futId) {
+    @Nullable public IgniteInternalFuture<?> removeAtomicFuture(long futId) {
         return atomicFuts.remove(futId);
     }
 
@@ -1174,6 +1177,20 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
     }
 
     /**
+     * @return Next future ID for atomic futures.
+     */
+    public long nextAtomicId() {
+        LongWrapper cnt = threadAtomicCnt.get();
+
+        long res = cnt.getAndIncrement();
+
+        if ((cnt.get() & (THREAD_RESERVE_SIZE - 1)) == 0)
+            cnt.set(globalAtomicCnt.getAndAdd(THREAD_RESERVE_SIZE));
+
+        return res;
+    }
+
+    /**
      *
      */
     private class FinishLockFuture extends GridFutureAdapter<Object> {
@@ -1382,4 +1399,41 @@ public class GridCacheMvccManager extends GridCacheSharedManagerAdapter {
             return S.toString(DataStreamerFuture.class, this, super.toString());
         }
     }
+
+    /** Long wrapper. */
+    private static class LongWrapper {
+        /** */
+        private long val;
+
+        /**
+         * @param val Value.
+         */
+        public LongWrapper(long val) {
+            this.val = val + 1;
+
+            if (this.val == 0)
+                this.val = 1;
+        }
+
+        /**
+         * @param val Value to set.
+         */
+        public void set(long val) {
+            this.val = val;
+        }
+
+        /**
+         * @return Current value.
+         */
+        public long get() {
+            return val;
+        }
+
+        /**
+         * @return Current value (and stores incremented value).
+         */
+        public long getAndIncrement() {
+            return val++;
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
index 5265ec9..89aa725 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridDeferredAckMessageSender.java
@@ -21,7 +21,6 @@ import java.util.UUID;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
@@ -33,7 +32,7 @@ import org.jsr166.ConcurrentLinkedDeque8;
 /**
  *
  */
-public abstract class GridDeferredAckMessageSender {
+public abstract class GridDeferredAckMessageSender<T> {
     /** Deferred message buffers. */
     private ConcurrentMap<UUID, DeferredAckMessageBuffer> deferredAckMsgBuffers = new ConcurrentHashMap8<>();
 
@@ -67,7 +66,7 @@ public abstract class GridDeferredAckMessageSender {
      * @param nodeId Node ID.
      * @param vers Versions to send.
      */
-    public abstract void finish(UUID nodeId, ConcurrentLinkedDeque8<GridCacheVersion> vers);
+    public abstract void finish(UUID nodeId, ConcurrentLinkedDeque8<T> vers);
 
     /**
      *
@@ -81,7 +80,7 @@ public abstract class GridDeferredAckMessageSender {
      * @param nodeId Node ID to send message to.
      * @param ver Version to ack.
      */
-    public void sendDeferredAckMessage(UUID nodeId, GridCacheVersion ver) {
+    public void sendDeferredAckMessage(UUID nodeId, T ver) {
         while (true) {
             DeferredAckMessageBuffer buf = deferredAckMsgBuffers.get(nodeId);
 
@@ -117,7 +116,7 @@ public abstract class GridDeferredAckMessageSender {
         private AtomicBoolean guard = new AtomicBoolean(false);
 
         /** Versions. */
-        private ConcurrentLinkedDeque8<GridCacheVersion> vers = new ConcurrentLinkedDeque8<>();
+        private ConcurrentLinkedDeque8<T> vers = new ConcurrentLinkedDeque8<>();
 
         /** Node ID. */
         private final UUID nodeId;
@@ -173,7 +172,7 @@ public abstract class GridDeferredAckMessageSender {
          * @param ver Version to send.
          * @return {@code True} if request was handled, {@code false} if this buffer is filled and cannot be used.
          */
-        public boolean add(GridCacheVersion ver) {
+        public boolean add(T ver) {
             readLock().lock();
 
             boolean snd = false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
index 5ff5aa4..0940acb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicAbstractUpdateFuture.java
@@ -110,7 +110,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
         this.updateReq = updateReq;
         this.writeVer = writeVer;
 
-        futId = cctx.mvcc().atomicFutureId();
+        futId = cctx.mvcc().nextAtomicId();
 
         if (log == null) {
             msgLog = cctx.shared().atomicMessageLogger();
@@ -295,7 +295,7 @@ public abstract class GridDhtAtomicAbstractUpdateFuture extends GridFutureAdapte
     }
 
     /** {@inheritDoc} */
-    @Override public final Long id() {
+    @Override public final long id() {
         return futId;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
index 39abb73..a2adb05 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
@@ -138,7 +138,7 @@ public abstract class GridNearAtomicAbstractUpdateFuture extends GridFutureAdapt
 
     /** Future ID. */
     @GridToStringInclude
-    protected Long futId;
+    protected long futId;
 
     /** Operation result. */
     protected GridCacheReturn opRes;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
index c2372d1..e4ba457 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
@@ -125,7 +125,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
     }
 
     /** {@inheritDoc} */
-    @Override public Long id() {
+    @Override public long id() {
         synchronized (mux) {
             return futId;
         }
@@ -216,7 +216,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         AffinityTopologyVersion remapTopVer0;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             assert reqState != null;
@@ -258,7 +258,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         CachePartialUpdateCheckedException err0 = null;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             req = reqState.processPrimaryResponse(nodeId, res);
@@ -331,7 +331,8 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
      * @return Non-null topology version if update should be remapped.
      */
     private AffinityTopologyVersion onAllReceived() {
-        assert futId != null;
+        assert Thread.holdsLock(mux);
+        assert futId > 0;
 
         AffinityTopologyVersion remapTopVer0 = null;
 
@@ -362,7 +363,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
             cctx.mvcc().removeAtomicFuture(futId);
 
             reqState = null;
-            futId = null;
+            futId = 0;
             topVer = AffinityTopologyVersion.ZERO;
 
             remapTopVer = null;
@@ -479,7 +480,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
 
     /** {@inheritDoc} */
     @Override protected void map(AffinityTopologyVersion topVer) {
-        long futId = cctx.mvcc().atomicFutureId();
+        long futId = cctx.mvcc().nextAtomicId();
 
         Exception err = null;
         PrimaryRequestState reqState0 = null;
@@ -488,7 +489,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
             reqState0 = mapSingleUpdate(topVer, futId);
 
             synchronized (mux) {
-                assert this.futId == null : this;
+                assert this.futId == 0 : this;
                 assert this.topVer == AffinityTopologyVersion.ZERO : this;
 
                 this.topVer = topVer;
@@ -529,7 +530,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
     /**
      * @param futId Future ID.
      */
-    private void checkDhtNodes(Long futId) {
+    private void checkDhtNodes(long futId) {
         GridCacheReturn opRes0 = null;
         CachePartialUpdateCheckedException err0 = null;
         AffinityTopologyVersion remapTopVer0 = null;
@@ -537,7 +538,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         GridNearAtomicCheckUpdateRequest checkReq = null;
 
         synchronized (mux) {
-            if (this.futId == null || !this.futId.equals(futId))
+            if (this.futId == 0 || this.futId != futId)
                 return;
 
             assert reqState != null;
@@ -570,7 +571,7 @@ public class GridNearAtomicSingleUpdateFuture extends GridNearAtomicAbstractUpda
         synchronized (mux) {
             id0 = futId;
 
-            futId = null;
+            futId = 0;
         }
 
         return id0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
index a44ccf9..84deefc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
@@ -150,7 +150,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
     }
 
     /** {@inheritDoc} */
-    @Override public Long id() {
+    @Override public long id() {
         synchronized (mux) {
             return futId;
         }
@@ -167,7 +167,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         List<GridNearAtomicCheckUpdateRequest> checkReqs = null;
 
         synchronized (mux) {
-            if (futId == null)
+            if (futId == 0)
                 return false;
 
             if (singleReq != null) {
@@ -300,7 +300,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         AffinityTopologyVersion remapTopVer0;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             PrimaryRequestState reqState;
@@ -373,7 +373,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         boolean rcvAll;
 
         synchronized (mux) {
-            if (futId == null || futId != res.futureId())
+            if (futId == 0 || futId != res.futureId())
                 return;
 
             if (singleReq != null) {
@@ -534,7 +534,8 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
      * @return Non null topology version if update should be remapped.
      */
     @Nullable private AffinityTopologyVersion onAllReceived() {
-        assert futId != null;
+        assert Thread.holdsLock(mux);
+        assert futId > 0;
 
         AffinityTopologyVersion remapTopVer0 = null;
 
@@ -577,7 +578,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         if (remapTopVer0 != null) {
             cctx.mvcc().removeAtomicFuture(futId);
 
-            futId = null;
+            futId = 0;
             topVer = AffinityTopologyVersion.ZERO;
 
             remapTopVer = null;
@@ -767,7 +768,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             return;
         }
 
-        Long futId = cctx.mvcc().atomicFutureId();
+        long futId = cctx.mvcc().nextAtomicId();
 
         Exception err = null;
         PrimaryRequestState singleReq0 = null;
@@ -801,7 +802,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             }
 
             synchronized (mux) {
-                assert this.futId == null : this;
+                assert this.futId == 0 : this;
                 assert this.topVer == AffinityTopologyVersion.ZERO : this;
 
                 this.topVer = topVer;
@@ -856,7 +857,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
             checkDhtNodes(futId);
     }
 
-    private void checkDhtNodes(Long futId) {
+    private void checkDhtNodes(long futId) {
         GridCacheReturn opRes0 = null;
         CachePartialUpdateCheckedException err0 = null;
         AffinityTopologyVersion remapTopVer0 = null;
@@ -866,7 +867,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         boolean rcvAll = false;
 
         synchronized (mux) {
-            if (this.futId == null || !this.futId.equals(futId))
+            if (this.futId == 0 || this.futId != futId)
                 return;
 
             if (singleReq != null) {
@@ -940,7 +941,7 @@ public class GridNearAtomicUpdateFuture extends GridNearAtomicAbstractUpdateFutu
         synchronized (mux) {
             id0 = futId;
 
-            futId = null;
+            futId = 0;
         }
 
         return id0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b99c1980/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
index d1334ef..6b383a4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
@@ -211,7 +211,7 @@ public class IgniteTxManager extends GridCacheSharedManagerAdapter {
 
         txHnd = new IgniteTxHandler(cctx);
 
-        deferredAckMsgSnd = new GridDeferredAckMessageSender(cctx.time(), cctx.kernalContext().closure()) {
+        deferredAckMsgSnd = new GridDeferredAckMessageSender<GridCacheVersion>(cctx.time(), cctx.kernalContext().closure()) {
             @Override public int getTimeout() {
                 return DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT;
             }


[31/57] [abbrv] ignite git commit: ignite-3477-master - drop FairAffinityFunction

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
index 934047d..3e79da0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite5.java
@@ -22,10 +22,6 @@ import org.apache.ignite.GridCacheAffinityBackupsSelfTest;
 import org.apache.ignite.IgniteCacheAffinitySelfTest;
 import org.apache.ignite.cache.affinity.AffinityClientNodeSelfTest;
 import org.apache.ignite.cache.affinity.AffinityHistoryCleanupTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityDynamicCacheSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionNodesSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunctionSelfTest;
-import org.apache.ignite.cache.affinity.fair.FairAffinityNodesRestart;
 import org.apache.ignite.cache.affinity.local.LocalAffinityFunctionTest;
 import org.apache.ignite.internal.processors.cache.CacheNearReaderUpdateTest;
 import org.apache.ignite.internal.processors.cache.CacheRebalancingSelfTest;
@@ -37,7 +33,6 @@ import org.apache.ignite.internal.processors.cache.IgniteCachePutStackOverflowSe
 import org.apache.ignite.internal.processors.cache.IgniteCacheReadThroughEvictionsVariationsSuite;
 import org.apache.ignite.internal.processors.cache.IgniteCacheStoreCollectionTest;
 import org.apache.ignite.internal.processors.cache.PartitionsExchangeOnDiscoveryHistoryOverflowTest;
-import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentFairAffinityTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentNodeJoinValidationTest;
 import org.apache.ignite.internal.processors.cache.distributed.CacheLateAffinityAssignmentTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteActiveOnStartNodeJoinValidationSelfTest;
@@ -65,7 +60,6 @@ public class IgniteCacheTestSuite5 extends TestSuite {
         suite.addTestSuite(IgniteCachePutStackOverflowSelfTest.class);
 
         suite.addTestSuite(CacheLateAffinityAssignmentTest.class);
-        suite.addTestSuite(CacheLateAffinityAssignmentFairAffinityTest.class);
         suite.addTestSuite(CacheLateAffinityAssignmentNodeJoinValidationTest.class);
         suite.addTestSuite(IgniteActiveOnStartNodeJoinValidationSelfTest.class);
         suite.addTestSuite(EntryVersionConsistencyReadThroughTest.class);
@@ -81,10 +75,6 @@ public class IgniteCacheTestSuite5 extends TestSuite {
         suite.addTestSuite(CacheRebalancingSelfTest.class);
 
         // Affinity tests.
-        suite.addTestSuite(FairAffinityFunctionNodesSelfTest.class);
-        suite.addTestSuite(FairAffinityFunctionSelfTest.class);
-        suite.addTestSuite(FairAffinityDynamicCacheSelfTest.class);
-        suite.addTestSuite(FairAffinityNodesRestart.class);
         suite.addTestSuite(GridCacheAffinityBackupsSelfTest.class);
         suite.addTestSuite(IgniteCacheAffinitySelfTest.class);
         suite.addTestSuite(AffinityClientNodeSelfTest.class);


[47/57] [abbrv] ignite git commit: Fixed test config for C++

Posted by ag...@apache.org.
Fixed test config for C++


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

Branch: refs/heads/ignite-3477-debug
Commit: c9fd6b997ee8a7d4f542d71003c6e914adc19937
Parents: d69a594
Author: Igor Sapego <is...@gridgain.com>
Authored: Tue Apr 11 16:46:55 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Tue Apr 11 16:47:46 2017 +0300

----------------------------------------------------------------------
 modules/platforms/cpp/core-test/config/cache-test-default.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c9fd6b99/modules/platforms/cpp/core-test/config/cache-test-default.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/config/cache-test-default.xml b/modules/platforms/cpp/core-test/config/cache-test-default.xml
index 9a2bbd7..0ff6c4b 100644
--- a/modules/platforms/cpp/core-test/config/cache-test-default.xml
+++ b/modules/platforms/cpp/core-test/config/cache-test-default.xml
@@ -54,6 +54,7 @@
                     <property name="name" value="partitioned"/>
                     <property name="cacheMode" value="PARTITIONED"/>
                     <property name="atomicityMode" value="TRANSACTIONAL"/>
+                    <property name="onheapCacheEnabled" value="true"/>
                 </bean>
 				
                 <bean parent="cache-template">


[13/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
deleted file mode 100644
index 9c666a4..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAbstractSelfTest.java
+++ /dev/null
@@ -1,679 +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.apache.ignite.internal.processors.cache;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.locks.Lock;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.CachePeekMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.jetbrains.annotations.Nullable;
-import org.junit.Assert;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-
-/**
- *
- */
-public abstract class GridCacheOffHeapTieredAbstractSelfTest extends GridCacheAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 4;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    protected boolean binaryEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(PRIMARY);
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setOffHeapMaxMemory(1024 * 1024);
-
-        return ccfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTransform() throws Exception {
-        IgniteCache<Integer, Integer> cache = grid(0).cache(null);
-
-        checkTransform(primaryKey(cache));
-
-        checkTransform(backupKey(cache));
-
-        checkTransform(nearKey(cache));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkTransform(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNull("Unexpected value: " + val, val);
-
-                return null;
-            }
-        });
-
-        c.put(key, 1);
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer) 1, val);
-
-                e.setValue(val + 1);
-
-                return null;
-            }
-        });
-
-        assertEquals((Integer)2, c.get(key));
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer)2, val);
-
-                e.setValue(val);
-
-                return null;
-            }
-        });
-
-        assertEquals((Integer)2, c.get(key));
-
-        c.invoke(key, new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                assertNotNull("Unexpected value: " + val, val);
-
-                assertEquals((Integer)2, val);
-
-                e.remove();
-
-                return null;
-            }
-        });
-
-        assertNull(c.get(key));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemove() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemove(primaryKey(c));
-
-        checkPutGetRemove(backupKey(c));
-
-        checkPutGetRemove(nearKey(c));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveByteArray() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemoveByteArray(primaryKey(c));
-
-        checkPutGetRemoveByteArray(backupKey(c));
-
-        checkPutGetRemoveByteArray(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemove(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        assertNull(c.getAndPut(key, key));
-
-        checkValue(key, key);
-
-        assertEquals(key, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTx(key, PESSIMISTIC);
-
-            checkPutGetRemoveTx(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveByteArray(Integer key) throws Exception {
-        IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        byte[] val = new byte[] {key.byteValue()};
-
-        assertNull(c.getAndPut(key, val));
-
-        checkValue(key, val);
-
-        Assert.assertArrayEquals(val, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTxByteArray(key, PESSIMISTIC);
-
-            checkPutGetRemoveTxByteArray(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertNull(c.getAndPut(key, key));
-
-        tx.commit();
-
-        checkValue(key, key);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertEquals(key, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveTxByteArray(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, byte[]> c = grid(0).cache(null);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        byte[] val = new byte[] {key.byteValue()};
-
-        assertNull(c.getAndPut(key, val));
-
-        tx.commit();
-
-        checkValue(key, val);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        Assert.assertArrayEquals(val, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPromote() throws Exception {
-        // TODO: GG-11148 check if test makes sense.
-        if (true)
-            return;
-
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        TestValue val = new TestValue(new byte[100 * 1024]);
-
-        List<Integer> keys = primaryKeys(c, 200);
-
-        for (Integer key : keys)
-            c.put(key, val);
-
-        c.localPromote(new HashSet<>(keys));
-
-        for (Integer key : keys) {
-            TestValue val0 = c.get(key);
-
-            Assert.assertArrayEquals(val.val, val0.val);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllGetAllRemoveAll() throws Exception {
-        Map<Integer, Integer> map = new HashMap<>();
-
-        for (int i = 0; i < 100; i++)
-            map.put(i, i);
-
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        c.putAll(map);
-
-        map0 = c.getAll(map.keySet());
-
-        assertEquals(map, map0);
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue());
-
-        c.invokeAll(map.keySet(), new EntryProcessor<Integer, Integer, Void>() {
-            @Override public Void process(MutableEntry<Integer, Integer> e, Object... args) {
-                Integer val = e.getValue();
-
-                e.setValue(val + 1);
-
-                return null;
-            }
-        });
-
-        map0 = c.getAll(map.keySet());
-
-        for (Map.Entry<Integer, Integer> e : map0.entrySet())
-            assertEquals((Integer)(e.getKey() + 1), e.getValue());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue() + 1);
-
-        c.removeAll(map.keySet());
-
-        map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutAllGetAllRemoveAllTx(PESSIMISTIC);
-
-            checkPutAllGetAllRemoveAllTx(OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutAllGetAllRemoveAllTx(TransactionConcurrency txConcurrency) throws Exception {
-        Map<Integer, Integer> map = new HashMap<>();
-
-        for (int i = 0; i < 100; i++)
-            map.put(i, i);
-
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Map<Integer, Integer> map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
-            c.putAll(map);
-
-            tx.commit();
-        }
-
-        map0 = c.getAll(map.keySet());
-
-        assertEquals(map, map0);
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), e.getValue());
-
-        try (Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ)) {
-            c.removeAll(map.keySet());
-
-            tx.commit();
-        }
-
-        map0 = c.getAll(map.keySet());
-
-        assertTrue(map0.isEmpty());
-
-        for (Map.Entry<Integer, Integer> e : map.entrySet())
-            checkValue(e.getKey(), null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutGetRemoveObject() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkPutGetRemoveObject(primaryKey(c));
-
-        checkPutGetRemoveObject(backupKey(c));
-
-        checkPutGetRemoveObject(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveObject(Integer key) throws Exception {
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        checkValue(key, null);
-
-        TestValue val = new TestValue(new byte[10]);
-
-        assertNull(c.getAndPut(key, val));
-
-        checkValue(key, val);
-
-        TestValue val2 = new TestValue(new byte[10]);
-
-        if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
-            c.put(key, val);
-        else
-            assertEquals(val, c.getAndPut(key, val));
-
-        checkValue(key, val2);
-
-        if (binaryEnabled()) // TODO: IGNITE-608, check return value when fixed.
-            c.remove(key);
-        else
-            assertEquals(val2, c.getAndRemove(key));
-
-        checkValue(key, null);
-
-        if (atomicityMode() == TRANSACTIONAL) {
-            checkPutGetRemoveTx(key, PESSIMISTIC);
-
-            checkPutGetRemoveTx(key, OPTIMISTIC);
-        }
-    }
-
-    /**
-     * @param key Key,
-     * @param txConcurrency Transaction concurrency.
-     * @throws Exception If failed.
-     */
-    private void checkPutGetRemoveObjectTx(Integer key, TransactionConcurrency txConcurrency) throws Exception {
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        TestValue val = new TestValue(new byte[10]);
-
-        Transaction tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertNull(c.getAndPut(key, val));
-
-        tx.commit();
-
-        checkValue(key, val);
-
-        tx = grid(0).transactions().txStart(txConcurrency, REPEATABLE_READ);
-
-        assertEquals(val, c.getAndRemove(key));
-
-        tx.commit();
-
-        checkValue(key, null);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testLockUnlock() throws Exception {
-        if (atomicityMode() == ATOMIC)
-            return;
-
-        IgniteCache<Integer, TestValue> c = grid(0).cache(null);
-
-        checkLockUnlock(primaryKey(c));
-
-        checkLockUnlock(backupKey(c));
-
-        checkLockUnlock(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("UnnecessaryLocalVariable")
-    private void checkLockUnlock(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        Integer val = key;
-
-        c.put(key, val);
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        Lock lock = c.lock(key);
-
-        lock.lock();
-
-        assertTrue(c.isLocalLocked(key, false));
-
-        lock.unlock();
-
-        assertFalse(c.isLocalLocked(key, false));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        checkValue(key, val);
-    }
-
-    /**
-     * @param key Key.
-     * @param val Value.
-     * @throws Exception If failed.
-     */
-    private void checkValue(Object key, @Nullable Object val) throws Exception {
-        for (int i = 0; i < gridCount(); i++) {
-            if (val != null && val.getClass() == byte[].class) {
-                Assert.assertArrayEquals("Unexpected value for grid: " + i,
-                    (byte[])val,
-                    (byte[])grid(i).cache(null).get(key));
-            }
-            else
-                assertEquals("Unexpected value for grid: " + i, val, grid(i).cache(null).get(key));
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testUnswap() throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        checkUnswap(primaryKey(c));
-
-        checkUnswap(backupKey(c));
-
-        checkUnswap(nearKey(c));
-    }
-
-    /**
-     * @param key Key.
-     * @throws Exception If failed.
-     */
-    private void checkUnswap(Integer key) throws Exception {
-        IgniteCache<Integer, Integer> c = grid(0).cache(null);
-
-        for (int i = 0; i < gridCount(); i++) {
-            assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
-            assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
-        }
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        c.put(key, key);
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        assertEquals(key, c.get(key));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        assertTrue(c.remove(key));
-
-        assertNull(c.localPeek(key, CachePeekMode.ONHEAP));
-
-        for (int i = 0; i < gridCount(); i++) {
-            assertEquals("Unexpected entries for grid: " + i, 0, grid(i).cache(null).localSize(CachePeekMode.OFFHEAP));
-
-            assertEquals("Unexpected offheap size for grid: " + i, 0, internalCache(i).offHeapAllocatedSize());
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestEntryPredicate implements IgnitePredicate<Cache.Entry<Integer, Integer>> {
-        /** */
-        private Integer expVal;
-
-        /**
-         * @param expVal Expected value.
-         */
-        TestEntryPredicate(Integer expVal) {
-            this.expVal = expVal;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean apply(Cache.Entry<Integer, Integer> e) {
-            assertEquals(expVal, e.getValue());
-
-            return true;
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestValue {
-        /** */
-        @SuppressWarnings("PublicField")
-        public byte[] val;
-
-        /**
-         * Default constructor.
-         */
-        public TestValue() {
-            // No-op.
-        }
-
-        /**
-         * @param val Value.
-         */
-        public TestValue(byte[] val) {
-            this.val = val;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            if (this == o)
-                return true;
-
-            if (o == null || getClass() != o.getClass())
-                return false;
-
-            TestValue other = (TestValue)o;
-
-            return Arrays.equals(val, other.val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return Arrays.hashCode(val);
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "TestValue{" +
-                "val=" + Arrays.toString(val) +
-                '}';
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
deleted file mode 100644
index f296929..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredAtomicSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
deleted file mode 100644
index be6e59a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAbstractSelfTest.java
+++ /dev/null
@@ -1,364 +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.apache.ignite.internal.processors.cache;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import javax.cache.Cache;
-import javax.cache.processor.EntryProcessor;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.util.typedef.P1;
-import org.apache.ignite.internal.util.typedef.internal.SB;
-import org.apache.ignite.testframework.GridTestUtils;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests that offheap entry is not evicted while cache entry is in use.
- */
-public abstract class GridCacheOffHeapTieredEvictionAbstractSelfTest extends GridCacheAbstractSelfTest {
-    /** */
-    private static final int VALS = 100;
-
-    /** */
-    private static final int VAL_SIZE = 128;
-
-    /** */
-    private static final int KEYS = 100;
-
-    /** */
-    private List<TestValue> vals = new ArrayList<>(VALS);
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return 120 * 1000;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(PRIMARY);
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setNearConfiguration(null);
-        ccfg.setOffHeapMaxMemory(0);
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        super.beforeTest();
-
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        vals = new ArrayList<>(VALS);
-
-        for (int i = 0; i < VALS; i++) {
-            SB sb = new SB(VAL_SIZE);
-
-            char c = Character.forDigit(i, 10);
-
-            for (int j = 0; j < VAL_SIZE; j++)
-                sb.a(c);
-
-            vals.add(new TestValue(sb.toString()));
-        }
-
-        for (int i = 0; i < KEYS; i++)
-            cache.put(i, vals.get(i % vals.size()));
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        super.afterTest();
-
-        vals = null;
-    }
-
-    /**
-     * @return Number of iterations per thread.
-     */
-    private int iterations() {
-        return atomicityMode() == ATOMIC ? 100_000 : 50_000;
-    }
-
-
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPut() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    cache.put(key, val);
-
-                    if (i % 20_000 == 0 && i > 0)
-                        info("Done " + i + " out of " + iterations());
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testRemove() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null);
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    if (rnd.nextBoolean())
-                        cache.remove(key);
-                    else
-                        cache.put(key, val);
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTransform() throws Exception {
-        final IgniteCache<Integer, Object> cache = grid(0).cache(null).withKeepBinary();
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < iterations(); i++) {
-                    int key = rnd.nextInt(KEYS);
-
-                    final TestValue val = vals.get(key % VAL_SIZE);
-
-                    TestProcessor c = testClosure(val.val, false);
-
-                    cache.invoke(key, c);
-                }
-
-                return null;
-            }
-        }, 16, "test");
-    }
-
-    /**
-     * @param expVal Expected cache value.
-     * @param acceptNull If {@code true} value can be null;
-     * @return Predicate.
-     */
-    protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
-        return new TestValuePredicate(expVal, acceptNull);
-    }
-
-    /**
-     * @param expVal Expected cache value.
-     * @param acceptNull If {@code true} value can be null;
-     * @return Predicate.
-     */
-    protected TestProcessor testClosure(String expVal, boolean acceptNull) {
-        return new TestValueClosure(expVal, acceptNull);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class TestValue {
-        /** */
-        @SuppressWarnings("PublicField")
-        public String val;
-
-        /**
-         *
-         */
-        public TestValue() {
-            // No-op.
-        }
-
-        /**
-         * @param val Value.
-         */
-        public TestValue(String val) {
-            this.val = val;
-        }
-    }
-
-    /**
-     *
-     */
-    protected abstract static class TestPredicate implements P1<Cache.Entry<Integer, Object>> {
-        /** */
-        protected String expVal;
-
-        /** */
-        protected boolean acceptNull;
-
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        protected TestPredicate(String expVal, boolean acceptNull) {
-            this.expVal = expVal;
-            this.acceptNull = acceptNull;
-        }
-
-        /** {@inheritDoc} */
-        @Override public final boolean apply(Cache.Entry<Integer, Object> e) {
-            assertNotNull(e);
-
-            Object val = e.getValue();
-
-            if (val == null) {
-                if (!acceptNull)
-                    assertNotNull(val);
-
-                return true;
-            }
-
-            checkValue(val);
-
-            return true;
-        }
-
-        /**
-         * @param val Value.
-         */
-        public abstract void checkValue(Object val);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class TestValuePredicate extends TestPredicate {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        TestValuePredicate(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            TestValue obj = (TestValue)val;
-
-            assertEquals(expVal, obj.val);
-        }
-    }
-
-    /**
-     *
-     */
-    protected abstract static class TestProcessor implements EntryProcessor<Integer, Object, Void>, Serializable {
-        /** */
-        protected String expVal;
-
-        /** */
-        protected boolean acceptNull;
-
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        protected TestProcessor(String expVal, boolean acceptNull) {
-            this.expVal = expVal;
-            this.acceptNull = acceptNull;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Void process(MutableEntry<Integer, Object> e, Object... args) {
-            Object val = e.getValue();
-
-            if (val == null) {
-                if (!acceptNull)
-                    assertNotNull(val);
-
-                e.setValue(true);
-
-                return null;
-            }
-
-            checkValue(val);
-
-            e.setValue(val);
-
-            return null;
-        }
-
-        /**
-         * @param val Value.
-         */
-        public abstract void checkValue(Object val);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class TestValueClosure extends TestProcessor {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        TestValueClosure(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            TestValue obj = (TestValue)val;
-
-            assertEquals(expVal, obj.val);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
deleted file mode 100644
index 1e3c0c2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionAtomicSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionAtomicSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
deleted file mode 100644
index d4e1df0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredEvictionSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- * Test with TRANSACTIONAL cache.
- */
-public class GridCacheOffHeapTieredEvictionSelfTest extends GridCacheOffHeapTieredEvictionAbstractSelfTest {
-    /** {@inheritDoc} */
-    @SuppressWarnings("RedundantMethodOverride")
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
deleted file mode 100644
index 67c27a9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTieredSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredSelfTest extends GridCacheOffHeapTieredAbstractSelfTest {
-    /** {@inheritDoc} */
-    @SuppressWarnings("RedundantMethodOverride")
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
index 4a6633b..2b82407 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapUpdateSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -48,8 +47,6 @@ public class GridCacheOffheapUpdateSelfTest extends GridCommonAbstractTest {
         ccfg.setCacheMode(CacheMode.PARTITIONED);
         ccfg.setNearConfiguration(null);
         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
-        ccfg.setOffHeapMaxMemory(0);
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
 
         cfg.setCacheConfiguration(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
index fab05df..81f22d1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedGetSelfTest.java
@@ -90,7 +90,6 @@ public class GridCachePartitionedGetSelfTest extends GridCommonAbstractTest {
         cc.setBackups(1);
         cc.setRebalanceMode(SYNC);
         cc.setWriteSynchronizationMode(FULL_SYNC);
-        cc.setEvictSynchronized(false);
         cc.setNearConfiguration(null);
 
         return cc;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
deleted file mode 100644
index 8f29158..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedOffHeapLocalStoreSelfTest.java
+++ /dev/null
@@ -1,44 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- *
- */
-public class GridCachePartitionedOffHeapLocalStoreSelfTest extends GridCacheAbstractLocalStoreSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode getAtomicMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheMode getCacheMode() {
-        return PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean isOffHeapTieredMode() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
index c46f6bf..82d9b41 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePreloadingEvictionsSelfTest.java
@@ -81,10 +81,7 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
         partCacheCfg.setAffinity(new GridCacheModuloAffinityFunction(1, 1));
         partCacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         partCacheCfg.setNearConfiguration(null);
-        partCacheCfg.setEvictSynchronized(true);
         partCacheCfg.setEvictionPolicy(null);
-        partCacheCfg.setEvictSynchronizedKeyBufferSize(25);
-        partCacheCfg.setEvictMaxOverflowRatio(0.99f);
         partCacheCfg.setRebalanceMode(ASYNC);
         partCacheCfg.setAtomicityMode(TRANSACTIONAL);
 
@@ -199,8 +196,8 @@ public class GridCachePreloadingEvictionsSelfTest extends GridCommonAbstractTest
 
         assertTrue(GridTestUtils.waitForCondition(new PA() {
             @Override public boolean apply() {
-                int size1 = ignite1.cache(null).localSize(CachePeekMode.ALL);
-                return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ALL);
+                int size1 = ignite1.cache(null).localSize(CachePeekMode.ONHEAP);
+                return size1 != oldSize && size1 == ignite2.cache(null).localSize(CachePeekMode.ONHEAP);
             }
         }, getTestTimeout()));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
index d700856..2505c68 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePutAllFailoverSelfTest.java
@@ -102,9 +102,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
     /** Backups count. */
     private int backups;
 
-    /** */
-    private GridTestUtils.TestMemoryMode memMode = GridTestUtils.TestMemoryMode.HEAP;
-
     /** Filter to include only worker nodes. */
     private static final IgnitePredicate<ClusterNode> workerNodesFilter = new PN() {
         @SuppressWarnings("unchecked")
@@ -206,60 +203,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
         checkPutAllFailoverColocated(false, 5, 2);
     }
 
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedTwoBackupsSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.SWAP;
-
-        checkPutAllFailoverColocated(false, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTiered() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_TIERED_SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvict() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapEvictSwap() throws Exception {
-        memMode = GridTestUtils.TestMemoryMode.OFFHEAP_EVICT_SWAP;
-
-        checkPutAllFailoverColocated(true, 5, 2);
-    }
-
     /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
         return super.getTestTimeout() * 5;
@@ -748,7 +691,6 @@ public class GridCachePutAllFailoverSelfTest extends GridCommonAbstractTest {
 
             cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
 
-            GridTestUtils.setMemoryMode(cfg, cacheCfg, memMode, 1000, 10 * 1024);
 
             cfg.setCacheConfiguration(cacheCfg);
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
index 8814aa5..50bed2a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheReloadSelfTest.java
@@ -21,6 +21,7 @@ import java.util.Collections;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
@@ -82,6 +83,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(MAX_CACHE_ENTRIES);
 
         cacheCfg.setEvictionPolicy(plc);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
 
         final CacheStore store = new CacheStoreAdapter<Integer, Integer>() {
@@ -172,7 +174,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
             for (int i = 0; i < N_ENTRIES; i++)
                 load(cache, i, true);
 
-            assertEquals(MAX_CACHE_ENTRIES, cache.size());
+            assertEquals(MAX_CACHE_ENTRIES, cache.size(CachePeekMode.ONHEAP));
         }
         finally {
             stopGrid();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
index 610392a..6979859 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheSwapPreloadSelfTest.java
@@ -73,7 +73,6 @@ public class GridCacheSwapPreloadSelfTest extends GridCommonAbstractTest {
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setCacheMode(cacheMode);
         cacheCfg.setRebalanceMode(SYNC);
-        cacheCfg.setEvictSynchronized(false);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
 
         if (cacheMode == PARTITIONED)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
index 8daf4ca..29ffe87 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerEvictionSelfTest.java
@@ -21,10 +21,9 @@ import java.util.concurrent.TimeUnit;
 import javax.cache.expiry.CreatedExpiryPolicy;
 import javax.cache.expiry.Duration;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteException;
 import org.apache.ignite.Ignition;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -50,9 +49,6 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
     /** Cache mode. */
     private volatile CacheMode cacheMode;
 
-    /** Cache memory mode. */
-    private volatile CacheMemoryMode cacheMemoryMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -66,9 +62,9 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(cacheMemoryMode);
         ccfg.setEagerTtl(true);
         ccfg.setEvictionPolicy(new FifoEvictionPolicy(ENTRIES_LIMIT, 100));
+        ccfg.setOnheapCacheEnabled(true);
         ccfg.setExpiryPolicyFactory(CreatedExpiryPolicy.factoryOf(new Duration(TimeUnit.HOURS, 12)));
 
         cfg.setCacheConfiguration(ccfg);
@@ -80,24 +76,21 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     public void testLocalEviction() throws Exception {
-        checkEviction(CacheMode.LOCAL, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.LOCAL, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.LOCAL);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionedEviction() throws Exception {
-        checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.PARTITIONED, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.PARTITIONED);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicatedEviction() throws Exception {
-        checkEviction(CacheMode.REPLICATED, CacheMemoryMode.ONHEAP_TIERED);
-        checkEviction(CacheMode.REPLICATED, CacheMemoryMode.OFFHEAP_TIERED);
+        checkEviction(CacheMode.REPLICATED);
     }
 
     /**
@@ -105,9 +98,8 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
      * @throws Exception If failed.
      */
     @SuppressWarnings("ConstantConditions")
-    private void checkEviction(CacheMode mode, CacheMemoryMode memoryMode) throws Exception {
+    private void checkEviction(CacheMode mode) throws Exception {
         cacheMode = mode;
-        cacheMemoryMode = memoryMode;
 
         final IgniteKernal g = (IgniteKernal)startGrid(0);
 
@@ -126,12 +118,12 @@ public class GridCacheTtlManagerEvictionSelfTest extends GridCommonAbstractTest
             if (log.isTraceEnabled())
                 cctx.ttl().printMemoryStats();
 
-            final String firstKey = "Some test entry key#0";
+            final String firstKey = "Some test entry key#1";
             final String lastKey = "Some test entry key#" + ENTRIES_TO_PUT;
 
-            assertFalse("first key should be evicted", cache.containsKey(firstKey));
+            assertNull("first key should be evicted", cache.localPeek(firstKey, CachePeekMode.ONHEAP));
 
-            assertTrue("last key should NOT be evicted", cache.containsKey(lastKey));
+            assertNotNull("last key should NOT be evicted", cache.localPeek(lastKey, CachePeekMode.ONHEAP));
 
             assertEquals("Ttl Manager should NOT track evicted entries", ENTRIES_LIMIT, cctx.ttl().pendingSize());
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
index e95cb85..44adc84 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueBytesPreloadingSelfTest.java
@@ -18,17 +18,12 @@
 package org.apache.ignite.internal.processors.cache;
 
 import java.util.Arrays;
-import java.util.Collections;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -36,9 +31,6 @@ import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
  *
  */
 public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTest {
-    /** Memory mode. */
-    private CacheMemoryMode memMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -61,8 +53,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
         ccfg.setAtomicityMode(ATOMIC);
         ccfg.setNearConfiguration(null);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
-        ccfg.setMemoryMode(memMode);
-        ccfg.setOffHeapMaxMemory(1024 * 1024 * 1024);
         ccfg.setRebalanceMode(CacheRebalanceMode.SYNC);
 
         return ccfg;
@@ -72,40 +62,6 @@ public class GridCacheValueBytesPreloadingSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testOnHeapTiered() throws Exception {
-        memMode = ONHEAP_TIERED;
-
-        startGrids(1);
-
-        try {
-            checkByteArrays();
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffHeapTiered() throws Exception {
-        memMode = OFFHEAP_TIERED;
-
-        startGrids(1);
-
-        try {
-            checkByteArrays();
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOffHeapValuesOnly() throws Exception {
-        memMode = OFFHEAP_VALUES;
-
         startGrids(1);
 
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
index 4b1268a..a43e85b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractTest.java
@@ -156,6 +156,8 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
         if (cacheMode() == PARTITIONED)
             cfg.setBackups(1);
 
+        cfg.setOnheapCacheEnabled(onheapCacheEnabled());
+
         return cfg;
     }
 
@@ -210,9 +212,9 @@ public abstract class IgniteCacheAbstractTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @return {@code true} if swap should be enabled.
+     * @return {@code True} if on-heap cache is enabled.
      */
-    protected boolean swapEnabled() {
+    protected boolean onheapCacheEnabled() {
         return false;
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
index 3f9fc5c..1feafe4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAtomicPutAllFailoverSelfTest.java
@@ -29,9 +29,4 @@ public class IgniteCacheAtomicPutAllFailoverSelfTest extends GridCachePutAllFail
     @Override protected CacheAtomicityMode atomicityMode() {
         return ATOMIC;
     }
-
-    /** {@inheritDoc} */
-    @Override public void testPutAllFailoverColocatedNearEnabledTwoBackupsOffheapTieredSwap(){
-        fail("https://issues.apache.org/jira/browse/IGNITE-1584");
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
index 122e2ec..a9098e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheConfigVariationsFullApiTest.java
@@ -94,12 +94,10 @@ import org.jetbrains.annotations.Nullable;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CachePeekMode.ALL;
-import static org.apache.ignite.cache.CachePeekMode.BACKUP;
 import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
 import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
 import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
@@ -3214,7 +3212,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
      * @throws Exception If failed.
      */
     public void _testDeletedEntriesFlag() throws Exception {
-        if (cacheMode() != LOCAL && cacheMode() != REPLICATED && memoryMode() != OFFHEAP_TIERED) {
+        if (cacheMode() != LOCAL && cacheMode() != REPLICATED) {
             final int cnt = 3;
 
             IgniteCache<String, Integer> cache = jcache();
@@ -4231,9 +4229,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
         if (true)
             return;
 
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         int ttl = 1000;
 
         final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl));
@@ -4513,177 +4508,12 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testUnswap() throws Exception {
-        if (swapEnabled() && !offheapEnabled()) {
-            IgniteCache<String, Integer> cache = jcache();
-
-            List<String> keys = primaryKeysForCache(3);
-
-            String k1 = keys.get(0);
-            String k2 = keys.get(1);
-            String k3 = keys.get(2);
-
-            cache.getAndPut(k1, 1);
-            cache.getAndPut(k2, 2);
-            cache.getAndPut(k3, 3);
-
-            final AtomicInteger swapEvts = new AtomicInteger(0);
-            final AtomicInteger unswapEvts = new AtomicInteger(0);
-
-            Collection<String> locKeys = new HashSet<>();
-
-            if (grid(0).context().cache().cache(cacheName()).context().affinityNode()) {
-                Iterable<Cache.Entry<String, Integer>> entries = cache.localEntries(PRIMARY, BACKUP);
-
-                for (Cache.Entry<String, Integer> entry : entries)
-                    locKeys.add(entry.getKey());
-
-                info("Local keys (primary + backup): " + locKeys);
-            }
-
-            for (int i = 0; i < gridCount(); i++)
-                grid(i).events().localListen(
-                    new SwapEvtsLocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
-            cache.localEvict(F.asList(k2, k3));
-
-            if (memoryMode() == OFFHEAP_TIERED) {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-            else {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-
-            int cnt = 0;
-
-            if (locKeys.contains(k2) && swapEnabled()) {
-                assertNull(cache.localPeek(k2, ONHEAP));
-
-                cache.localPromote(Collections.singleton(k2));
-
-                assertEquals((Integer)2, cache.localPeek(k2, ONHEAP));
-
-                if (swapAfterLocalEvict())
-                    cnt++;
-            }
-            else {
-                cache.localPromote(Collections.singleton(k2));
-
-                assertNull(cache.localPeek(k2, ONHEAP));
-            }
-
-            if (locKeys.contains(k3) && swapEnabled()) {
-                assertNull(cache.localPeek(k3, ONHEAP));
-
-                cache.localPromote(Collections.singleton(k3));
-
-                assertEquals((Integer)3, cache.localPeek(k3, ONHEAP));
-
-                if (swapAfterLocalEvict())
-                    cnt++;
-            }
-            else {
-                cache.localPromote(Collections.singleton(k3));
-
-                assertNull(cache.localPeek(k3, ONHEAP));
-            }
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-
-            cache.localEvict(Collections.singleton(k1));
-
-            assertEquals((Integer)1, cache.get(k1));
-
-            if (locKeys.contains(k1) && swapAfterLocalEvict())
-                cnt++;
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-
-            cache.clear();
-
-            // Check with multiple arguments.
-            cache.getAndPut(k1, 1);
-            cache.getAndPut(k2, 2);
-            cache.getAndPut(k3, 3);
-
-            swapEvts.set(0);
-            unswapEvts.set(0);
-
-            cache.localEvict(Collections.singleton(k2));
-            cache.localEvict(Collections.singleton(k3));
-
-            if (memoryMode() == OFFHEAP_TIERED) {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNotNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-            else {
-                assertNotNull(cache.localPeek(k1, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k2, ONHEAP, OFFHEAP));
-                assertNull(cache.localPeek(k3, ONHEAP, OFFHEAP));
-            }
-
-            cache.localPromote(F.asSet(k2, k3));
-
-            cnt = 0;
-
-            if (locKeys.contains(k2) && swapAfterLocalEvict())
-                cnt++;
-
-            if (locKeys.contains(k3) && swapAfterLocalEvict())
-                cnt++;
-
-            assertEquals(cnt, swapEvts.get());
-            assertEquals(cnt, unswapEvts.get());
-        }
-    }
-
-    /**
-     * @param cache Cache.
-     * @param k Key,
-     */
-    private void checkKeyAfterPut(IgniteCache<String, Integer> cache, String k) {
-        if (memoryMode() == OFFHEAP_TIERED) {
-            assertNotNull(cache.localPeek(k, OFFHEAP));
-            assertNull(cache.localPeek(k, ONHEAP));
-        }
-        else {
-            assertNotNull(cache.localPeek(k, ONHEAP));
-            assertNull(cache.localPeek(k, OFFHEAP));
-        }
-    }
-
-    /**
      * @param cache Cache.
      * @param k Key.
      */
     private void checkKeyAfterLocalEvict(IgniteCache<String, Integer> cache, String k) {
-        switch (memoryMode()) {
-            case ONHEAP_TIERED:
-                assertNull(cache.localPeek(k, ONHEAP));
-                assertEquals(offheapEnabled(), cache.localPeek(k, OFFHEAP) != null);
-
-                break;
-            case OFFHEAP_TIERED:
-                assertNull(cache.localPeek(k, ONHEAP));
-                assertNotNull(cache.localPeek(k, OFFHEAP));
-
-                break;
-            case OFFHEAP_VALUES:
-                assertNull(cache.localPeek(k, ONHEAP, OFFHEAP));
-
-                break;
-            default:
-                fail("Unexpected memory mode: " + memoryMode());
-        }
+        assertNull(cache.localPeek(k, ONHEAP));
+        assertNotNull(cache.localPeek(k, OFFHEAP));
     }
 
     /**
@@ -4817,12 +4647,7 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
                     for (int i = 0; i < cnt; i++) {
                         boolean removed = cache.remove("key" + i);
 
-                        // TODO: delete the following check when IGNITE-2590 will be fixed.
-                        boolean bug2590 = cacheMode() == LOCAL && memoryMode() == OFFHEAP_TIERED
-                            && concurrency == OPTIMISTIC && isolation == REPEATABLE_READ;
-
-                        if (!bug2590)
-                            assertTrue(removed);
+                        assertTrue(removed);
                     }
                 }
             });
@@ -4900,9 +4725,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
     public void testToMap() throws Exception {
         IgniteCache<String, Integer> cache = jcache();
 
-        if (offheapTiered(cache))
-            return;
-
         cache.put("key1", 1);
         cache.put("key2", 2);
 
@@ -4921,9 +4743,6 @@ public class IgniteCacheConfigVariationsFullApiTest extends IgniteCacheConfigVar
      * @throws Exception If failed.
      */
     protected void checkSize(final Collection<String> keys) throws Exception {
-        if (memoryMode() == OFFHEAP_TIERED)
-            return;
-
         if (nearEnabled())
             assertEquals(keys.size(), jcache().localSize(CachePeekMode.ALL));
         else {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
index dd27d72..e0e2771 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAbstractTest.java
@@ -58,7 +58,6 @@ import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.IgniteInternalFuture;
@@ -76,7 +75,6 @@ import static javax.cache.event.EventType.CREATED;
 import static javax.cache.event.EventType.EXPIRED;
 import static javax.cache.event.EventType.REMOVED;
 import static javax.cache.event.EventType.UPDATED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -116,8 +114,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
 
         cfg.setEagerTtl(eagerTtl());
 
-        cfg.setMemoryMode(memoryMode());
-
         return cfg;
     }
 
@@ -133,13 +129,6 @@ public abstract class IgniteCacheEntryListenerAbstractTest extends IgniteCacheAb
         return cfg;
     }
 
-    /**
-     * @return Cache memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return ONHEAP_TIERED;
-    }
-
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
         super.afterTest();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
deleted file mode 100644
index 69efb84..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapTieredTest extends IgniteCacheEntryListenerAtomicTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
deleted file mode 100644
index 23b1bc0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerAtomicOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerAtomicOffheapValuesTest extends IgniteCacheEntryListenerAtomicTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
index f430b5b..b0be14e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerExpiredEventsTest.java
@@ -28,7 +28,6 @@ import javax.cache.expiry.Duration;
 import javax.cache.expiry.ModifiedExpiryPolicy;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -44,8 +43,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -86,28 +83,14 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
      * @throws Exception If failed.
      */
     public void testExpiredEventAtomic() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExpiredEventAtomicOffheap() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED));
+        checkExpiredEvents(cacheConfiguration(PARTITIONED, ATOMIC));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testExpiredEventTx() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExpiredEventTxOffheap() throws Exception {
-        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED));
+        checkExpiredEvents(cacheConfiguration(PARTITIONED, TRANSACTIONAL));
     }
 
     /**
@@ -158,18 +141,15 @@ public class IgniteCacheEntryListenerExpiredEventsTest extends GridCommonAbstrac
      *
      * @param cacheMode Cache mode.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
deleted file mode 100644
index d552195..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapTieredTest extends IgniteCacheEntryListenerTxTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
deleted file mode 100644
index 32555c8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheEntryListenerTxOffheapValuesTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class IgniteCacheEntryListenerTxOffheapValuesTest extends IgniteCacheEntryListenerTxTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}


[07/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
deleted file mode 100644
index c118457..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxOffheapExpiryPolicyTest extends IgniteCacheTxExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
deleted file mode 100644
index 1ee7c3c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxReplicatedOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxReplicatedOffheapExpiryPolicyTest extends IgniteCacheTxReplicatedExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
deleted file mode 100644
index 5ffd052..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheTxWithStoreOffheapExpiryPolicyTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.expiry;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteCacheTxWithStoreOffheapExpiryPolicyTest extends IgniteCacheTxWithStoreExpiryPolicyTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
deleted file mode 100644
index cfb0f85..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,42 +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.apache.ignite.internal.processors.cache.local;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests local cache in atomic mode with values being stored offheap.
- */
-public class GridCacheLocalAtomicOffHeapFullApiSelfTest extends GridCacheLocalOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean txEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean lockingEnabled() {
-        return false;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index e7096b1..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests local cache in atomic mode with off-heap tiered mode.
- */
-public class GridCacheLocalAtomicOffHeapTieredFullApiSelfTest extends GridCacheLocalAtomicOffHeapFullApiSelfTest{
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
index 11e717d..1ad8d75 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalByteArrayValuesSelfTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
@@ -48,33 +47,20 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
     /** Regular cache. */
     private static IgniteCache<Integer, Object> cache;
 
-    /** Offheap cache. */
-    private static IgniteCache<Integer, Object> cacheOffheap;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
 
         c.getTransactionConfiguration().setTxSerializableEnabled(true);
 
-        CacheConfiguration cc1 = new CacheConfiguration();
-
-        cc1.setName(CACHE_REGULAR);
-        cc1.setAtomicityMode(TRANSACTIONAL);
-        cc1.setCacheMode(LOCAL);
-        cc1.setWriteSynchronizationMode(FULL_SYNC);
-        cc1.setEvictSynchronized(false);
+        CacheConfiguration ccfg = new CacheConfiguration();
 
-        CacheConfiguration cc2 = new CacheConfiguration();
+        ccfg.setName(CACHE_REGULAR);
+        ccfg.setAtomicityMode(TRANSACTIONAL);
+        ccfg.setCacheMode(LOCAL);
+        ccfg.setWriteSynchronizationMode(FULL_SYNC);
 
-        cc2.setName(CACHE_OFFHEAP);
-        cc2.setAtomicityMode(TRANSACTIONAL);
-        cc2.setCacheMode(LOCAL);
-        cc2.setWriteSynchronizationMode(FULL_SYNC);
-        cc2.setMemoryMode(OFFHEAP_VALUES);
-        cc2.setOffHeapMaxMemory(100 * 1024 * 1024);
-
-        c.setCacheConfiguration(cc1, cc2);
+        c.setCacheConfiguration(ccfg);
 
         return c;
     }
@@ -84,7 +70,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
         ignite = startGrid(1);
 
         cache = ignite.cache(CACHE_REGULAR);
-        cacheOffheap = ignite.cache(CACHE_OFFHEAP);
     }
 
     /** {@inheritDoc} */
@@ -92,7 +77,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
         super.afterTestsStopped();
 
         cache = null;
-        cacheOffheap = null;
 
         ignite = null;
     }
@@ -116,24 +100,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
     }
 
     /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheap() throws Exception {
-        testTransaction(cacheOffheap, PESSIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheapMixed() throws Exception {
-        testTransactionMixed(cacheOffheap, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
      * Check whether cache with byte array entry works correctly in OPTIMISTIC transaction.
      *
      * @throws Exception If failed.
@@ -152,24 +118,6 @@ public class GridCacheLocalByteArrayValuesSelfTest extends GridCacheAbstractByte
     }
 
     /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheap() throws Exception {
-        testTransaction(cacheOffheap, OPTIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheapMixed() throws Exception {
-        testTransactionMixed(cacheOffheap, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
      * Test byte array entry swapping.
      *
      * @throws Exception If failed.

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
deleted file mode 100644
index 22b3a03..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- * Tests local cache with values being stored offheap.
- */
-public class GridCacheLocalOffHeapFullApiSelfTest extends GridCacheLocalFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index c6ce9da..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/GridCacheLocalOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.local;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests local cache with off-heap tired memory mode.
- */
-public class GridCacheLocalOffHeapTieredFullApiSelfTest extends GridCacheLocalOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
deleted file mode 100644
index a9fd6cb..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/local/LocalCacheOffHeapAndSwapMetricsSelfTest.java
+++ /dev/null
@@ -1,463 +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.apache.ignite.internal.processors.cache.local;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- *
- */
-public class LocalCacheOffHeapAndSwapMetricsSelfTest extends GridCommonAbstractTest {
-    /** Grid count. */
-    private static final int GRID_CNT = 1;
-
-    /** Keys count. */
-    private static final int KEYS_CNT = 1000;
-
-    /** Max size. */
-    private static final int MAX_SIZE = 100;
-
-    /** Entry size. */
-    private static final int ENTRY_SIZE = 86; // Calculated as allocated size divided on entries count.
-
-    /** Offheap max count. */
-    private static final int OFFHEAP_MAX_CNT = KEYS_CNT / 2;
-
-    /** Offheap max size. */
-    private static final int OFFHEAP_MAX_SIZE = ENTRY_SIZE * OFFHEAP_MAX_CNT;
-
-    /** Cache. */
-    private IgniteCache<Integer, Integer> cache;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        return cfg;
-    }
-
-    /**
-     * @param memoryMode Cache memory mode.
-     * @param offHeapSize Max off-heap size.
-     * @param swapEnabled Swap enabled.
-     */
-    private void createCache(CacheMemoryMode memoryMode, int offHeapSize, boolean swapEnabled) {
-        CacheConfiguration ccfg = defaultCacheConfiguration();
-
-        ccfg.setStatisticsEnabled(true);
-
-        ccfg.setCacheMode(CacheMode.LOCAL);
-        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        ccfg.setMemoryMode(memoryMode);
-
-        ccfg.setOffHeapMaxMemory(offHeapSize);
-
-        ccfg.setEvictionPolicy(new FifoEvictionPolicy(MAX_SIZE));
-
-        cache = grid(0).getOrCreateCache(ccfg);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        startGrids(GRID_CNT);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        if (cache != null)
-            cache.destroy();
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testOffHeapMetrics() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
-        createCache(CacheMemoryMode.ONHEAP_TIERED, 0, false);
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.put(i, i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
-        assertEquals(0, cache.localMetrics().getOffHeapHits());
-        assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapHits());
-        assertEquals(100 / 3.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100 - (100 / 3.0), cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT - MAX_SIZE, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.remove(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapHits());
-        assertEquals(100 * (KEYS_CNT * 2.0 - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2 - MAX_SIZE, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testOffHeapAndSwapMetrics() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
-        createCache(CacheMemoryMode.ONHEAP_TIERED, OFFHEAP_MAX_SIZE, true);
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.put(i, i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapGets());
-        assertEquals(0, cache.localMetrics().getOffHeapHits());
-        assertEquals(0f, cache.localMetrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100f, cache.localMetrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(KEYS_CNT - MAX_SIZE - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapGets());
-        assertEquals(0, cache.localMetrics().getOffHeapHits());
-        assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapGets());
-        assertEquals(0, cache.localMetrics().getOffHeapHits());
-        assertEquals(0.0, cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 3, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100.0, cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.remove(i);
-
-        printStat();
-
-        assertEquals(cache.localMetrics().getCacheEvictions(), cache.localMetrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 4 - MAX_SIZE, cache.localMetrics().getOffHeapGets());
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapHits());
-        assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.localMetrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE, cache.localMetrics().getOffHeapMisses());
-        assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT - MAX_SIZE) / (KEYS_CNT * 4.0 - MAX_SIZE),
-            cache.localMetrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapRemovals());
-
-        assertEquals(cache.localMetrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.localMetrics().getOffHeapEvictions());
-        assertEquals(0, cache.localMetrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.localMetrics().getOffHeapBackupEntriesCount());
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testOffHeapMetricsInOffHeapTiered() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
-        createCache(CacheMemoryMode.OFFHEAP_TIERED, 0, false);
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.put(i, i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapEntriesCount());
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100 * KEYS_CNT / (KEYS_CNT * 2.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapHits());
-        assertEquals(100 / 3.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
-        assertEquals(100 - (100 / 3.0), cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.remove(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 4, cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapHits());
-        assertEquals(100 * (KEYS_CNT * 2.0) / (KEYS_CNT * 4.0),
-            cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
-        assertEquals(100 * KEYS_CNT * 2.0 / (KEYS_CNT * 4.0),
-            cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(0, cache.metrics().getOffHeapEvictions());
-        assertEquals(0, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-    }
-
-    /**
-     * @throws Exception if failed.
-     */
-    public void testOffHeapAndSwapMetricsInOffHeapTiered() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-4536");
-
-        createCache(CacheMemoryMode.OFFHEAP_TIERED, OFFHEAP_MAX_SIZE, true);
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.put(i, i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0f, cache.metrics().getOffHeapHitPercentage());
-        assertEquals(KEYS_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100f, cache.metrics().getOffHeapMissPercentage());
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(KEYS_CNT - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapPuts());
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 2, cache.metrics().getOffHeapMisses());
-        assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = KEYS_CNT; i < KEYS_CNT * 2; i++)
-            cache.get(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapGets());
-        assertEquals(0, cache.metrics().getOffHeapHits());
-        assertEquals(0.0, cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 3, cache.metrics().getOffHeapMisses());
-        assertEquals(100.0, cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(0, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT - KEYS_CNT,
-            cache.metrics().getOffHeapEvictions());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-
-        for (int i = 0; i < KEYS_CNT; i++)
-            cache.remove(i);
-
-        printStat();
-
-        assertEquals(cache.metrics().getCacheEvictions(), cache.metrics().getOffHeapGets());
-        assertEquals(KEYS_CNT * 4, cache.metrics().getOffHeapGets());
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapHits());
-        assertEquals(100 * OFFHEAP_MAX_CNT / (KEYS_CNT * 4.0),
-            cache.metrics().getOffHeapHitPercentage(), 0.1);
-        assertEquals(KEYS_CNT * 4 - OFFHEAP_MAX_CNT, cache.metrics().getOffHeapMisses());
-        assertEquals(100 * (KEYS_CNT * 4 - OFFHEAP_MAX_CNT) / (KEYS_CNT * 4.0),
-            cache.metrics().getOffHeapMissPercentage(), 0.1);
-        assertEquals(OFFHEAP_MAX_CNT, cache.metrics().getOffHeapRemovals());
-
-        assertEquals(cache.metrics().getCacheEvictions() - OFFHEAP_MAX_CNT - 2 * KEYS_CNT, cache.metrics().getOffHeapEvictions());
-        assertEquals(0, cache.metrics().getOffHeapEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapPrimaryEntriesCount());
-        assertEquals(0, cache.metrics().getOffHeapBackupEntriesCount());
-    }
-
-    /**
-     * Prints stats.
-     */
-    protected void printStat() {
-        System.out.println("!!! -------------------------------------------------------");
-        System.out.println("!!! Puts: cache = " + cache.localMetrics().getCachePuts() +
-            ", offheap = " + cache.localMetrics().getOffHeapPuts());
-        System.out.println("!!! Gets: cache = " + cache.localMetrics().getCacheGets() +
-            ", offheap = " + cache.localMetrics().getOffHeapGets());
-        System.out.println("!!! Removes: cache = " + cache.localMetrics().getCacheRemovals() +
-            ", offheap = " + cache.localMetrics().getOffHeapRemovals());
-        System.out.println("!!! Evictions: cache = " + cache.localMetrics().getCacheEvictions() +
-            ", offheap = " + cache.localMetrics().getOffHeapEvictions() +
-            ", swap = none" );
-        System.out.println("!!! Hits: cache = " + cache.localMetrics().getCacheHits() +
-            ", offheap = " + cache.localMetrics().getOffHeapHits());
-        System.out.println("!!! Hit(%): cache = " + cache.localMetrics().getCacheHitPercentage() +
-            ", offheap = " + cache.localMetrics().getOffHeapHitPercentage());
-        System.out.println("!!! Misses: cache = " + cache.localMetrics().getCacheMisses() +
-            ", offheap = " + cache.localMetrics().getOffHeapMisses());
-        System.out.println("!!! Miss(%): cache = " + cache.localMetrics().getCacheMissPercentage() +
-            ", offheap = " + cache.localMetrics().getOffHeapMissPercentage());
-        System.out.println("!!! Entries: cache = " + cache.localMetrics().getSize() +
-            ", offheap = " + cache.localMetrics().getOffHeapEntriesCount());
-        System.out.println("!!! Size: cache = none" +
-            ", offheap = " + cache.localMetrics().getOffHeapAllocatedSize());
-        System.out.println();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 6b23991..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicOffHeapMultiJvmFullApiSelfTest extends
-    GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index bae0fa0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..2a5c2da
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheAtomicOnheapMultiJvmFullApiSelfTest extends GridCacheAtomicOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean isMultiJvm() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..af69e66
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest extends GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return CacheAtomicWriteOrderMode.PRIMARY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 2222ada..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest extends
-    GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 0bfdfea..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index f5603a2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-    
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..0ce6ada
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean isMultiJvm() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 121d453..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest extends
-    GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index fbe6098..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..e2d716f
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean isMultiJvm() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 73abe6d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedOffHeapMultiJvmFullApiSelfTest extends
-    GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 7b7d64f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..bdde212
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCachePartitionedOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest;
+
+public class GridCachePartitionedOnheapMultiJvmFullApiSelfTest extends GridCachePartitionedOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean isMultiJvm() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 81d7e9b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest extends
-    GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
deleted file mode 100644
index 6ecf12b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.multijvm;
-
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest;
-
-/**
- * Multi-JVM tests.
- */
-public class GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest
-    extends GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    protected boolean isMultiJvm() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void testLocalClearKeys() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1107");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
new file mode 100644
index 0000000..c609ce7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/multijvm/GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.multijvm;
+
+import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOnheapMultiNodeFullApiSelfTest;
+
+public class GridCacheReplicatedOnheapMultiJvmFullApiSelfTest extends GridCacheReplicatedOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean isMultiJvm() {
+        return true;
+    }
+}


[52/57] [abbrv] ignite git commit: Merge remote-tracking branch 'gg-fork-origin/ignite-3477-master' into ignite-3477-master-ggfork

Posted by ag...@apache.org.
Merge remote-tracking branch 'gg-fork-origin/ignite-3477-master' into ignite-3477-master-ggfork


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

Branch: refs/heads/ignite-3477-debug
Commit: face0c7b8190aaf4849ee5048849c2bc1f7aae62
Parents: 0390391 391d8d0
Author: Ivan Rakov <iv...@gmail.com>
Authored: Tue Apr 11 19:07:25 2017 +0300
Committer: Ivan Rakov <iv...@gmail.com>
Committed: Tue Apr 11 19:07:25 2017 +0300

----------------------------------------------------------------------
 modules/core/src/test/config/spring-multicache.xml  | 16 ++++++++++++++++
 .../cpp/core-test/config/cache-test-default.xml     |  1 +
 2 files changed, 17 insertions(+)
----------------------------------------------------------------------



[02/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
deleted file mode 100644
index bfdcd24..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapAtomicPartitionedSelfTest  extends CacheTtlOffheapAtomicAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 2;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
deleted file mode 100644
index dd09624..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapTransactionalAbstractSelfTest extends CacheTtlOffheapAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return CacheAtomicityMode.TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
deleted file mode 100644
index 5184188..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalLocalSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapTransactionalLocalSelfTest extends CacheTtlOffheapTransactionalAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
deleted file mode 100644
index 6eb52f8..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapTransactionalPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapTransactionalPartitionedSelfTest extends CacheTtlOffheapTransactionalAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 2;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
deleted file mode 100644
index 7bce6d9..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapAbstractSelfTest extends CacheTtlAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
deleted file mode 100644
index 9365b8e..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapAtomicAbstractSelfTest extends CacheTtlOnheapAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return CacheAtomicityMode.ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
deleted file mode 100644
index 7c4fe7a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicLocalSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapAtomicLocalSelfTest extends CacheTtlOnheapAtomicAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
deleted file mode 100644
index dc2dc95..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapAtomicPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapAtomicPartitionedSelfTest extends CacheTtlOnheapAtomicAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 2;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
deleted file mode 100644
index 2948b1b..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOnheapTransactionalAbstractSelfTest extends CacheTtlOnheapAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return CacheAtomicityMode.TRANSACTIONAL;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
deleted file mode 100644
index 4283e7a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalLocalSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapTransactionalLocalSelfTest extends CacheTtlOnheapTransactionalAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
deleted file mode 100644
index 70fbb72..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOnheapTransactionalPartitionedSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOnheapTransactionalPartitionedSelfTest extends CacheTtlOnheapTransactionalAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.PARTITIONED;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 2;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
new file mode 100644
index 0000000..847ab34
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalAbstractSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ * TTL test with offheap.
+ */
+public abstract class CacheTtlTransactionalAbstractSelfTest extends CacheTtlAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.TRANSACTIONAL;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
new file mode 100644
index 0000000..4a8ea52
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalLocalSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlTransactionalLocalSelfTest extends CacheTtlTransactionalAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return CacheMode.LOCAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
new file mode 100644
index 0000000..f31b823
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlTransactionalPartitionedSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlTransactionalPartitionedSelfTest extends CacheTtlTransactionalAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 2;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
index 47cd98b..8408ad0 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSegmentedIndexSelfTest.java
@@ -112,8 +112,7 @@ public class IgniteSqlSegmentedIndexSelfTest extends GridCommonAbstractTest {
         startGridsMultiThreaded(1, true);
 
         final IgniteCache<Object, Object> cache = ignite(0).createCache(cacheConfig("org", true, Integer.class, Organization.class)
-            .setOffHeapMaxMemory(-1)
-            .setEvictionPolicy(new FifoEvictionPolicy(10)));
+            .setEvictionPolicy(new FifoEvictionPolicy(10)).setOnheapCacheEnabled(true));
 
         for (int i = 0; i < 20; i++)
             cache.put(i, new Organization("org-" + i));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
index 2ce4072..2d3ee0d 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite.java
@@ -26,7 +26,7 @@ import org.apache.ignite.internal.processors.cache.CachePartitionedQueryDetailMe
 import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
 import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheQueryNewClientSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheQueryOffheapEvictDataLostTest;
+import org.apache.ignite.internal.processors.cache.CacheQueryEvictDataLostTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsDistributedSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryDetailMetricsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
@@ -39,8 +39,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheQueryInternalKeysSel
 import org.apache.ignite.internal.processors.cache.GridCacheQuerySerializationSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectLocalQueryArgumentsTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsOffheapLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsOffheapTest;
 import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectQueryArgumentsTest;
 import org.apache.ignite.internal.processors.cache.IgniteBinaryWrappedObjectFieldsQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheCollocatedQuerySelfTest;
@@ -87,7 +85,6 @@ import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalFieldsQ
 import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQueryCancelOrTimeoutSelfTest;
 import org.apache.ignite.internal.processors.cache.local.IgniteCacheLocalQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.query.GridCacheQueryTransformerSelfTest;
-import org.apache.ignite.internal.processors.cache.query.GridCacheSwapScanQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.query.IgniteCacheQueryCacheDestroySelfTest;
 import org.apache.ignite.internal.processors.cache.query.IndexingSpiQuerySelfTest;
 import org.apache.ignite.internal.processors.cache.query.IndexingSpiQueryTxSelfTest;
@@ -177,8 +174,6 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheDeleteSqlQuerySelfTest.class);
 
         suite.addTestSuite(IgniteBinaryObjectQueryArgumentsTest.class);
-        suite.addTestSuite(IgniteBinaryObjectQueryArgumentsOffheapTest.class);
-        suite.addTestSuite(IgniteBinaryObjectQueryArgumentsOffheapLocalTest.class);
         suite.addTestSuite(IgniteBinaryObjectLocalQueryArgumentsTest.class);
 
         suite.addTestSuite(IndexingSpiQuerySelfTest.class);
@@ -200,11 +195,9 @@ public class IgniteCacheQuerySelfTestSuite extends TestSuite {
 
         suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
 
-        suite.addTestSuite(GridCacheSwapScanQuerySelfTest.class);
-
         suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
 
-        suite.addTestSuite(CacheQueryOffheapEvictDataLostTest.class);
+        suite.addTestSuite(CacheQueryEvictDataLostTest.class);
 
         // Ignite cache and H2 comparison.
         suite.addTestSuite(BaseH2CompareQueryTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
index 5b05aba..416f150 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite2.java
@@ -21,13 +21,9 @@ import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.CacheScanPartitionQueryFallbackSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheCrossCacheJoinRandomTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheObjectKeyIndexingSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheSqlQueryMultiThreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheClientQueryReplicatedNodeRestartSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.IgniteCacheDistributedQueryStopOnCancelOrTimeoutSelfTest;
@@ -48,12 +44,9 @@ public class IgniteCacheQuerySelfTestSuite2 extends TestSuite {
         TestSuite suite = new IgniteTestSuite("Ignite Cache Queries Test Suite 2");
 
         suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
-        suite.addTestSuite(IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.class);
-        suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
-        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
-        // TODO GG-11140.
-        // suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
-        // suite.addTestSuite(IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.class);
+
+        suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
+
         suite.addTestSuite(IgniteCacheCrossCacheJoinRandomTest.class);
         suite.addTestSuite(IgniteCacheClientQueryReplicatedNodeRestartSelfTest.class);
         suite.addTestSuite(IgniteCacheQueryNodeFailTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
index e4ca29f..8dd273a 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite3.java
@@ -37,8 +37,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.ClientReconn
 import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryPeerClassLoadingTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.ContinuousQueryRemoteFilterMissingInClassPathSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicOffheapValuesTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryConcurrentTest;
@@ -56,8 +54,6 @@ import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheCon
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedP2PDisabledSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedTxOneNodeTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxOffheapValuesTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryTxSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryBackupQueueTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.IgniteCacheContinuousQueryClientReconnectTest;
@@ -87,13 +83,9 @@ public class IgniteCacheQuerySelfTestSuite3 extends TestSuite {
         suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryPartitionedP2PDisabledSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryTxSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryTxOffheapTieredTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryTxOffheapValuesTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
         suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryAtomicOffheapTieredTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryAtomicOffheapValuesTest.class);
         suite.addTestSuite(GridCacheContinuousQueryReplicatedTxOneNodeTest.class);
         suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicOneNodeTest.class);
         suite.addTestSuite(GridCacheContinuousQueryPartitionTxOneNodeTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
index c4fcdac..052174e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheQuerySelfTestSuite4.java
@@ -21,10 +21,8 @@ import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverAtomicPrimaryWriteOrderSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryAsyncFailoverTxSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverAtomicReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxOffheapTieredTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxReplicatedSelfTest;
 import org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFailoverTxSelfTest;
 
@@ -44,8 +42,6 @@ public class IgniteCacheQuerySelfTestSuite4 extends TestSuite {
         suite.addTestSuite(CacheContinuousQueryFailoverAtomicReplicatedSelfTest.class);
         suite.addTestSuite(CacheContinuousQueryFailoverTxSelfTest.class);
         suite.addTestSuite(CacheContinuousQueryFailoverTxReplicatedSelfTest.class);
-        suite.addTestSuite(CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.class);
-        suite.addTestSuite(CacheContinuousQueryFailoverTxOffheapTieredTest.class);
 
         suite.addTestSuite(CacheContinuousQueryAsyncFailoverAtomicPrimaryWriteOrderSelfTest.class);
         suite.addTestSuite(CacheContinuousQueryAsyncFailoverTxReplicatedSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
index 025db65..0f4a418 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteCacheWithIndexingTestSuite.java
@@ -21,7 +21,6 @@ import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.CacheBinaryKeyConcurrentQueryTest;
 import org.apache.ignite.internal.processors.cache.CacheConfigurationP2PTest;
 import org.apache.ignite.internal.processors.cache.CacheIndexStreamerTest;
-import org.apache.ignite.internal.processors.cache.CacheIndexingOffheapCleanupTest;
 import org.apache.ignite.internal.processors.cache.CacheOperationsWithExpirationTest;
 import org.apache.ignite.internal.processors.cache.CacheQueryFilterExpiredTest;
 import org.apache.ignite.internal.processors.cache.CacheRandomOperationsMultithreadedTest;
@@ -33,14 +32,10 @@ import org.apache.ignite.internal.processors.cache.GridIndexingWithNoopSwapSelfT
 import org.apache.ignite.internal.processors.cache.IgniteCacheConfigurationPrimitiveTypesSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheStarvationOnRebalanceTest;
 import org.apache.ignite.internal.processors.cache.IgniteClientReconnectQueriesTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapAtomicPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapTransactionalLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOffheapTransactionalPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapAtomicPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapTransactionalLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.ttl.CacheTtlOnheapTransactionalPartitionedSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlAtomicLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlAtomicPartitionedSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlTransactionalLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.ttl.CacheTtlTransactionalPartitionedSelfTest;
 
 /**
  * Cache tests using indexing.
@@ -56,14 +51,10 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
         suite.addTestSuite(GridIndexingWithNoopSwapSelfTest.class);
         suite.addTestSuite(GridCacheOffHeapSelfTest.class);
 
-        suite.addTestSuite(CacheTtlOffheapAtomicLocalSelfTest.class);
-        suite.addTestSuite(CacheTtlOffheapAtomicPartitionedSelfTest.class);
-        suite.addTestSuite(CacheTtlOffheapTransactionalLocalSelfTest.class);
-        suite.addTestSuite(CacheTtlOffheapTransactionalPartitionedSelfTest.class);
-        suite.addTestSuite(CacheTtlOnheapTransactionalLocalSelfTest.class);
-        suite.addTestSuite(CacheTtlOnheapTransactionalPartitionedSelfTest.class);
-        suite.addTestSuite(CacheTtlOnheapAtomicLocalSelfTest.class);
-        suite.addTestSuite(CacheTtlOnheapAtomicPartitionedSelfTest.class);
+        suite.addTestSuite(CacheTtlTransactionalLocalSelfTest.class);
+        suite.addTestSuite(CacheTtlTransactionalPartitionedSelfTest.class);
+        suite.addTestSuite(CacheTtlAtomicLocalSelfTest.class);
+        suite.addTestSuite(CacheTtlAtomicPartitionedSelfTest.class);
 
         suite.addTestSuite(GridCacheOffheapIndexGetSelfTest.class);
         suite.addTestSuite(GridCacheOffheapIndexEntryEvictTest.class);
@@ -77,7 +68,6 @@ public class IgniteCacheWithIndexingTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheStarvationOnRebalanceTest.class);
         suite.addTestSuite(CacheOperationsWithExpirationTest.class);
         suite.addTestSuite(CacheBinaryKeyConcurrentQueryTest.class);
-        suite.addTestSuite(CacheIndexingOffheapCleanupTest.class);
         suite.addTestSuite(CacheQueryFilterExpiredTest.class);
 
         suite.addTestSuite(ClientReconnectAfterClusterRestartTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index 9ef1005..250177d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -29,7 +29,6 @@ namespace Apache.Ignite.Core.Tests.Cache
     using Apache.Ignite.Core.Cache.Expiry;
     using Apache.Ignite.Core.Cache.Store;
     using Apache.Ignite.Core.Common;
-    using Apache.Ignite.Core.Impl.Cache.Affinity;
     using Apache.Ignite.Core.Tests.Plugin.Cache;
     using NUnit.Framework;
 
@@ -198,13 +197,11 @@ namespace Apache.Ignite.Core.Tests.Cache
             Assert.AreEqual(CacheConfiguration.DefaultLongQueryWarningTimeout, cfg.LongQueryWarningTimeout);
             Assert.AreEqual(CacheConfiguration.DefaultMaxConcurrentAsyncOperations, cfg.MaxConcurrentAsyncOperations);
             Assert.AreEqual(CacheConfiguration.DefaultMaxEvictionOverflowRatio, cfg.MaxEvictionOverflowRatio);
-            Assert.AreEqual(CacheConfiguration.DefaultOffHeapMaxMemory, cfg.OffHeapMaxMemory);
             Assert.AreEqual(CacheConfiguration.DefaultReadFromBackup, cfg.ReadFromBackup);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceBatchSize, cfg.RebalanceBatchSize);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceMode, cfg.RebalanceMode);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceThrottle, cfg.RebalanceThrottle);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceTimeout, cfg.RebalanceTimeout);
-            Assert.AreEqual(CacheConfiguration.DefaultSqlOnheapRowCacheSize, cfg.SqlOnheapRowCacheSize);
             Assert.AreEqual(CacheConfiguration.DefaultStartSize, cfg.StartSize);
             Assert.AreEqual(CacheConfiguration.DefaultStartSize, cfg.StartSize);
             Assert.AreEqual(CacheConfiguration.DefaultWriteBehindBatchSize, cfg.WriteBehindBatchSize);
@@ -235,13 +232,11 @@ namespace Apache.Ignite.Core.Tests.Cache
             Assert.AreEqual(x.LongQueryWarningTimeout, y.LongQueryWarningTimeout);
             Assert.AreEqual(x.MaxConcurrentAsyncOperations, y.MaxConcurrentAsyncOperations);
             Assert.AreEqual(x.MaxEvictionOverflowRatio, y.MaxEvictionOverflowRatio);
-            Assert.AreEqual(x.OffHeapMaxMemory, y.OffHeapMaxMemory);
             Assert.AreEqual(x.ReadFromBackup, y.ReadFromBackup);
             Assert.AreEqual(x.RebalanceBatchSize, y.RebalanceBatchSize);
             Assert.AreEqual(x.RebalanceMode, y.RebalanceMode);
             Assert.AreEqual(x.RebalanceThrottle, y.RebalanceThrottle);
             Assert.AreEqual(x.RebalanceTimeout, y.RebalanceTimeout);
-            Assert.AreEqual(x.SqlOnheapRowCacheSize, y.SqlOnheapRowCacheSize);
             Assert.AreEqual(x.StartSize, y.StartSize);
             Assert.AreEqual(x.StartSize, y.StartSize);
             Assert.AreEqual(x.WriteBehindBatchSize, y.WriteBehindBatchSize);
@@ -487,7 +482,6 @@ namespace Apache.Ignite.Core.Tests.Cache
             return new CacheConfiguration
             {
                 Name = name ?? CacheName,
-                OffHeapMaxMemory = 1,
                 StartSize = 2,
                 MaxConcurrentAsyncOperations = 3,
                 WriteBehindFlushThreadCount = 4,
@@ -516,7 +510,6 @@ namespace Apache.Ignite.Core.Tests.Cache
                 RebalanceThrottle = TimeSpan.FromSeconds(15),
                 RebalanceTimeout = TimeSpan.FromSeconds(16),
                 SqlEscapeAll = true,
-                SqlOnheapRowCacheSize = 17,
                 WriteBehindBatchSize = 18,
                 WriteBehindEnabled = false,
                 WriteSynchronizationMode = CacheWriteSynchronizationMode.PrimarySync,
@@ -581,7 +574,6 @@ namespace Apache.Ignite.Core.Tests.Cache
             return new CacheConfiguration
             {
                 Name = name ?? CacheName2,
-                OffHeapMaxMemory = 1,
                 StartSize = 2,
                 MaxConcurrentAsyncOperations = 3,
                 WriteBehindFlushThreadCount = 4,
@@ -610,7 +602,6 @@ namespace Apache.Ignite.Core.Tests.Cache
                 RebalanceThrottle = TimeSpan.FromSeconds(15),
                 RebalanceTimeout = TimeSpan.FromSeconds(16),
                 SqlEscapeAll = true,
-                SqlOnheapRowCacheSize = 17,
                 WriteBehindBatchSize = 18,
                 WriteBehindEnabled = false,
                 WriteSynchronizationMode = CacheWriteSynchronizationMode.PrimarySync,

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 532f6d5..58fda7c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -621,7 +621,6 @@ namespace Apache.Ignite.Core.Tests
                         LongQueryWarningTimeout = TimeSpan.FromSeconds(99),
                         MaxConcurrentAsyncOperations = 24,
                         MaxEvictionOverflowRatio = 5.6F,
-                        OffHeapMaxMemory = 567,
                         QueryEntities = new[]
                         {
                             new QueryEntity
@@ -650,7 +649,6 @@ namespace Apache.Ignite.Core.Tests
                         RebalanceThrottle = TimeSpan.FromHours(44),
                         RebalanceTimeout = TimeSpan.FromMinutes(8),
                         SqlEscapeAll = true,
-                        SqlOnheapRowCacheSize = 679,
                         StartSize = 1023,
                         WriteBehindBatchSize = 45,
                         WriteBehindEnabled = true,

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
index 9ae3f6c..a5b9712 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
@@ -182,13 +182,11 @@ namespace Apache.Ignite.Core.Cache.Configuration
             LongQueryWarningTimeout = DefaultLongQueryWarningTimeout;
             MaxConcurrentAsyncOperations = DefaultMaxConcurrentAsyncOperations;
             MaxEvictionOverflowRatio = DefaultMaxEvictionOverflowRatio;
-            OffHeapMaxMemory = DefaultOffHeapMaxMemory;
             ReadFromBackup = DefaultReadFromBackup;
             RebalanceBatchSize = DefaultRebalanceBatchSize;
             RebalanceMode = DefaultRebalanceMode;
             RebalanceThrottle = DefaultRebalanceThrottle;
             RebalanceTimeout = DefaultRebalanceTimeout;
-            SqlOnheapRowCacheSize = DefaultSqlOnheapRowCacheSize;
             StartSize = DefaultStartSize;
             WriteBehindBatchSize = DefaultWriteBehindBatchSize;
             WriteBehindEnabled = DefaultWriteBehindEnabled;
@@ -248,7 +246,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
             MaxConcurrentAsyncOperations = reader.ReadInt();
             MaxEvictionOverflowRatio = reader.ReadFloat();
             Name = reader.ReadString();
-            OffHeapMaxMemory = reader.ReadLong();
             ReadFromBackup = reader.ReadBoolean();
             RebalanceBatchSize = reader.ReadInt();
             RebalanceDelay = reader.ReadLongAsTimespan();
@@ -256,7 +253,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
             RebalanceThrottle = reader.ReadLongAsTimespan();
             RebalanceTimeout = reader.ReadLongAsTimespan();
             SqlEscapeAll = reader.ReadBoolean();
-            SqlOnheapRowCacheSize = reader.ReadInt();
             StartSize = reader.ReadInt();
             WriteBehindBatchSize = reader.ReadInt();
             WriteBehindEnabled = reader.ReadBoolean();
@@ -311,7 +307,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
             writer.WriteInt(MaxConcurrentAsyncOperations);
             writer.WriteFloat(MaxEvictionOverflowRatio);
             writer.WriteString(Name);
-            writer.WriteLong(OffHeapMaxMemory);
             writer.WriteBoolean(ReadFromBackup);
             writer.WriteInt(RebalanceBatchSize);
             writer.WriteLong((long) RebalanceDelay.TotalMilliseconds);
@@ -319,7 +314,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
             writer.WriteLong((long) RebalanceThrottle.TotalMilliseconds);
             writer.WriteLong((long) RebalanceTimeout.TotalMilliseconds);
             writer.WriteBoolean(SqlEscapeAll);
-            writer.WriteInt(SqlOnheapRowCacheSize);
             writer.WriteInt(StartSize);
             writer.WriteInt(WriteBehindBatchSize);
             writer.WriteBoolean(WriteBehindEnabled);
@@ -621,16 +615,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
         public TimeSpan RebalanceThrottle { get; set; }
 
         /// <summary>
-        /// Gets or sets maximum amount of memory available to off-heap storage. Possible values are
-        /// -1 means that off-heap storage is disabled. 0 means that Ignite will not limit off-heap storage 
-        /// (it's up to user to properly add and remove entries from cache to ensure that off-heap storage 
-        /// does not grow indefinitely.
-        /// Any positive value specifies the limit of off-heap storage in bytes.
-        /// </summary>
-        [DefaultValue(DefaultOffHeapMaxMemory)]
-        public long OffHeapMaxMemory { get; set; }
-
-        /// <summary>
         /// Gets or sets flag indicating whether data can be read from backup.
         /// </summary>
         [DefaultValue(DefaultReadFromBackup)]
@@ -657,13 +641,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
         public bool SqlEscapeAll { get; set; }
 
         /// <summary>
-        /// Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
-        /// This setting only makes sense when offheap is enabled for this cache.
-        /// </summary>
-        [DefaultValue(DefaultSqlOnheapRowCacheSize)]
-        public int SqlOnheapRowCacheSize { get; set; }
-
-        /// <summary>
         /// Gets or sets the factory for underlying persistent storage for read-through and write-through operations.
         /// <para />
         /// See <see cref="ReadThrough"/> and <see cref="WriteThrough"/> properties to enable read-through and 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
index ce77ffe..6d49a3b 100755
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/cache/VisorCacheCommand.scala
@@ -869,11 +869,6 @@ object VisorCacheCommand {
         cacheT += ("Eviction Policy", safe(evictCfg.policy()))
         cacheT += ("Eviction Policy Max Size", safe(evictCfg.policyMaxSize()))
         cacheT += ("Eviction Filter", safe(evictCfg.filter()))
-        cacheT += ("Eviction Key Buffer Size", evictCfg.synchronizedKeyBufferSize())
-        cacheT += ("Eviction Synchronized", bool2Str(evictCfg.evictSynchronized()))
-        cacheT += ("Eviction Overflow Ratio", evictCfg.maxOverflowRatio())
-        cacheT += ("Synchronous Eviction Timeout", evictCfg.synchronizedTimeout())
-        cacheT += ("Synchronous Eviction Concurrency Level", evictCfg.synchronizedConcurrencyLevel())
 
         cacheT += ("Near Cache Enabled", bool2Str(nearCfg.nearEnabled()))
         cacheT += ("Near Start Size", nearCfg.nearStartSize())

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/README.txt
----------------------------------------------------------------------
diff --git a/modules/yardstick/README.txt b/modules/yardstick/README.txt
index 5903fd4..c21ed2a 100644
--- a/modules/yardstick/README.txt
+++ b/modules/yardstick/README.txt
@@ -120,8 +120,6 @@ would behave like a `servers`.
 * `-nn <num>` or `--nodeNumber <num>` - Number of nodes (automatically set in `benchmark.properties`), used to wait for
     the specified number of nodes to start
 * `-sm <mode>` or `-syncMode <mode>` - Synchronization mode (defined in `CacheWriteSynchronizationMode`)
-* `-ot` or `--offheapTiered` - Flag indicating whether tiered off-heap mode is on
-* `-ov` or `--offheapValuesOnly` - Flag indicating whether off-heap mode is on and only cache values are stored off-heap
 * `-r <num>` or `--range` - Range of keys that are randomly generated for cache operations
 * `-rd or --restartdelay` - Restart delay in seconds
 * `-rs or --restartsleep` - Restart sleep in seconds

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-atomic-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic-win.properties b/modules/yardstick/config/benchmark-atomic-win.properties
index 202306e..be13d77 100644
--- a/modules/yardstick/config/benchmark-atomic-win.properties
+++ b/modules/yardstick/config/benchmark-atomic-win.properties
@@ -54,11 +54,5 @@ set DRIVER_HOSTS=localhost
 :: Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 set CONFIGS=^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetBenchmark -sn IgniteNode -ds atomic-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds atomic-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-get-offheap-val-1-backup,^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetBenchmark -sn IgniteNode -ds atomic-put-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds atomic-put-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-get-offheap-val-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds atomic-put-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds atomic-put-offheap-val-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutBenchmark -sn IgniteNode -ds atomic-put-1-backup

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-atomic.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-atomic.properties b/modules/yardstick/config/benchmark-atomic.properties
index f296041..8e2413b 100644
--- a/modules/yardstick/config/benchmark-atomic.properties
+++ b/modules/yardstick/config/benchmark-atomic.properties
@@ -75,12 +75,6 @@ sm=PRIMARY_SYNC
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetBenchmark -sn IgniteNode -ds ${ver}atomic-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-get-offheap-val-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutBenchmark -sn IgniteNode -ds ${ver}atomic-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-client-mode.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-client-mode.properties b/modules/yardstick/config/benchmark-client-mode.properties
index ad501f1..923c96a 100644
--- a/modules/yardstick/config/benchmark-client-mode.properties
+++ b/modules/yardstick/config/benchmark-client-mode.properties
@@ -95,13 +95,4 @@ CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} --client -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-multicast.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-multicast.properties b/modules/yardstick/config/benchmark-multicast.properties
index 2b4d99b..5071a11 100644
--- a/modules/yardstick/config/benchmark-multicast.properties
+++ b/modules/yardstick/config/benchmark-multicast.properties
@@ -100,15 +100,6 @@ CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-optimistic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-optimistic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}tx-putAll-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-multicast-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -bs 100 -dn IgnitePutAllSerializableTxBenchmark -sn IgniteNode -ds ${ver}tx-putAllSerializable-${b}-backup,\

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-query-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query-win.properties b/modules/yardstick/config/benchmark-query-win.properties
index 6bd8fb9..0c410e3 100644
--- a/modules/yardstick/config/benchmark-query-win.properties
+++ b/modules/yardstick/config/benchmark-query-win.properties
@@ -54,8 +54,5 @@ set DRIVER_HOSTS=localhost
 :: Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 set CONFIGS=^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds sql-query-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds sql-query-offheap-1-backup,^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds sql-query-join-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds sql-query-join-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds sql-query-put-offheap-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds sql-query-put-1-backup

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-query.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-query.properties b/modules/yardstick/config/benchmark-query.properties
index c364cfd..2612ec9 100644
--- a/modules/yardstick/config/benchmark-query.properties
+++ b/modules/yardstick/config/benchmark-query.properties
@@ -75,11 +75,8 @@ sm=PRIMARY_SYNC
 # Note that each benchmark is set to run for 300 seconds (5 min) with warm-up set to 60 seconds (1 minute).
 CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinBenchmark -sn IgniteNode -ds ${ver}sql-query-join-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutBenchmark -sn IgniteNode -ds ${ver}sql-query-put-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite://127.0.0.1/query -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -jdbc jdbc:ignite:cfg://cache=query@config/ignite-jdbc-config.xml -t ${t} -sm ${sm} -dn IgniteJdbcSqlQueryBenchmark -sn IgniteNode -ds ${ver}sql-query-jdbc-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-tx-win.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx-win.properties b/modules/yardstick/config/benchmark-tx-win.properties
index 490b9d7..ad9cc41 100644
--- a/modules/yardstick/config/benchmark-tx-win.properties
+++ b/modules/yardstick/config/benchmark-tx-win.properties
@@ -56,8 +56,4 @@ set CONFIGS=^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxBenchmark -sn IgniteNode -ds tx-put-1-backup,^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds tx-getAndPut-1-backup,^
 -cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds tx-invoke-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds tx-put-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-offheap-val-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds tx-put-get-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds tx-put-get-offheap-1-backup,^
--cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds tx-put-get-offheap-val-1-backup
+-cfg %SCRIPT_DIR%\..\config\ignite-localhost-config.xml -b 1 -w 60 -d 300 -t 64 -sm PRIMARY_SYNC -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds tx-put-get-1-backup

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark-tx.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark-tx.properties b/modules/yardstick/config/benchmark-tx.properties
index 8a75bf5..8926578 100644
--- a/modules/yardstick/config/benchmark-tx.properties
+++ b/modules/yardstick/config/benchmark-tx.properties
@@ -77,9 +77,5 @@ CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxBenchmark -sn IgniteNode -ds ${ver}tx-put-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteGetAndPutTxBenchmark -sn IgniteNode -ds ${ver}tx-getAndPut-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteInvokeTxBenchmark -sn IgniteNode -ds ${ver}tx-invoke-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxBenchmark -sn IgniteNode -ds ${ver}tx-put-get-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-get-offheap-val-${b}-backup\
 "

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/benchmark.properties
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/benchmark.properties b/modules/yardstick/config/benchmark.properties
index cccbf2a..2dd51eb 100644
--- a/modules/yardstick/config/benchmark.properties
+++ b/modules/yardstick/config/benchmark.properties
@@ -95,16 +95,7 @@ CONFIGS="\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteApplyBenchmark -sn IgniteNode -ds ${ver}apply-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteBroadcastBenchmark -sn IgniteNode -ds ${ver}broad-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteExecuteBenchmark -sn IgniteNode -ds ${ver}exec-compute-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutGetOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-get-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}atomic-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgnitePutTxOffHeapValuesBenchmark -sn IgniteNode -ds ${ver}tx-put-offheap-val-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryJoinOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-join-offheap-${b}-backup,\
--cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -dn IgniteSqlQueryPutOffHeapBenchmark -sn IgniteNode -ds ${ver}sql-query-put-offheap-${b}-backup,\
+-cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -sm ${sm} -j ${j} -dn IgniteRunBenchmark -sn IgniteNode -ds ${ver}run-compute-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -sm PRIMARY_SYNC -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -col -sm PRIMARY_SYNC -dn IgnitePutAllBenchmark -sn IgniteNode -ds ${ver}atomic-collocated-putAll-${b}-backup,\
 -cfg ${SCRIPT_DIR}/../config/ignite-localhost-config.xml -nn ${nodesNum} -b ${b} -w ${w} -d ${d} -t ${t} -bs 1000 -sm PRIMARY_SYNC -dn IgnitePutAllTxBenchmark -sn IgniteNode -ds ${ver}atomic-putAll-tx-${b}-backup,\

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/yardstick/config/ignite-base-config.xml
----------------------------------------------------------------------
diff --git a/modules/yardstick/config/ignite-base-config.xml b/modules/yardstick/config/ignite-base-config.xml
index 4416657..57380d0 100644
--- a/modules/yardstick/config/ignite-base-config.xml
+++ b/modules/yardstick/config/ignite-base-config.xml
@@ -40,27 +40,6 @@
                 </bean>
 
                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="atomic-offheap"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="ATOMIC"/>
-
-                    <property name="memoryMode" value="OFFHEAP_TIERED"/>
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="atomic-offheap-values"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="ATOMIC"/>
-
-                    <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                     <property name="name" value="tx"/>
 
                     <property name="cacheMode" value="PARTITIONED"/>
@@ -70,28 +49,6 @@
                 </bean>
 
                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="tx-offheap"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-
-                    <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="tx-offheap-values"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="TRANSACTIONAL"/>
-
-                    <property name="memoryMode" value="OFFHEAP_VALUES"/>
-
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                     <property name="name" value="atomic-index"/>
 
                     <property name="cacheMode" value="PARTITIONED"/>
@@ -188,26 +145,6 @@
                 </bean>
 
                 <bean class="org.apache.ignite.configuration.CacheConfiguration">
-                    <property name="name" value="query-offheap"/>
-
-                    <property name="cacheMode" value="PARTITIONED"/>
-
-                    <property name="atomicityMode" value="ATOMIC"/>
-
-                    <property name="memoryMode" value="OFFHEAP_TIERED"/>
-
-                    <property name="indexedTypes">
-                        <list>
-                            <value>java.lang.Integer</value>
-                            <value>org.apache.ignite.yardstick.cache.model.Organization</value>
-
-                            <value>java.lang.Integer</value>
-                            <value>org.apache.ignite.yardstick.cache.model.Person</value>
-                        </list>
-                    </property>
-                </bean>
-
-                <bean class="org.apache.ignite.configuration.CacheConfiguration">
                     <property name="name" value="compute"/>
 
                     <property name="cacheMode" value="PARTITIONED"/>


[41/57] [abbrv] ignite git commit: HashIDX on client is allowed in case if client is affinity node

Posted by ag...@apache.org.
HashIDX on client is allowed in case if client is affinity node


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

Branch: refs/heads/ignite-3477-debug
Commit: 3e86c511b0aef0d4edc75e411be98c8b56b6b0a4
Parents: 085c612
Author: Sergey Chugunov <se...@gmail.com>
Authored: Thu Apr 6 19:21:07 2017 +0300
Committer: Sergey Chugunov <se...@gmail.com>
Committed: Tue Apr 11 14:38:26 2017 +0300

----------------------------------------------------------------------
 .../processors/query/h2/IgniteH2Indexing.java        | 15 +++++++++------
 .../processors/query/h2/opt/GridH2Table.java         | 15 ++++++++++++---
 2 files changed, 21 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3e86c511/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
index 725e742..5f2d8c0 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/IgniteH2Indexing.java
@@ -2868,11 +2868,14 @@ public class IgniteH2Indexing implements GridQueryIndexing {
 
             int cacheId = CU.cacheId(schema.ccfg.getName());
 
-            idxs.add(createHashIndex(
-                cacheId,
-                "_key_PK_hash",
-                tbl,
-                treeIndexColumns(new ArrayList<IndexColumn>(2), keyCol, affCol)));
+            Index hashIdx = createHashIndex(
+                    cacheId,
+                    "_key_PK_hash",
+                    tbl,
+                    treeIndexColumns(new ArrayList<IndexColumn>(2), keyCol, affCol));
+
+            if (hashIdx != null)
+                idxs.add(hashIdx);
 
             // Add primary key index.
             idxs.add(createSortedIndex(
@@ -3002,7 +3005,7 @@ public class IgniteH2Indexing implements GridQueryIndexing {
                 return pkHashIdx;
             }
 
-            return new GridH2TreeIndex(name, tbl, true, cols);
+            return null;
         }
 
         /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/3e86c511/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index 89a010d..94c8843 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -149,10 +149,13 @@ public class GridH2Table extends TableBase {
         idxs = idxsFactory.createIndexes(this);
 
         assert idxs != null;
-        assert idxs.size() >= 2;
 
         // Add scan index at 0 which is required by H2.
-        idxs.add(0, new ScanIndex(index(1), index(0)));
+        if (idxs.size() >= 2
+                && index(0).getIndexType().isHash())
+            idxs.add(0, new ScanIndex(index(1), index(0)));
+        else
+            idxs.add(0, new ScanIndex(index(0), null));
 
         snapshotEnabled = desc == null || desc.snapshotableIndex();
 
@@ -927,7 +930,13 @@ public class GridH2Table extends TableBase {
          *
          */
         @Override protected GridH2IndexBase delegate() {
-            return rebuildFromHashInProgress ? hashIdx : super.delegate();
+            if (hashIdx != null)
+                return rebuildFromHashInProgress ? hashIdx : super.delegate();
+            else {
+                assert !rebuildFromHashInProgress;
+
+                return super.delegate();
+            }
         }
 
         /** {@inheritDoc} */


[25/57] [abbrv] ignite git commit: Fixing .NET examples compilation

Posted by ag...@apache.org.
Fixing .NET examples compilation


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

Branch: refs/heads/ignite-3477-debug
Commit: be7296c525a1a9b9e974415365b535e28c5716f7
Parents: ff5b3e1
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Apr 10 20:42:29 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 20:42:29 2017 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs     | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/be7296c5/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
index 567f1b9..c40814c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/MultiTieredCacheExample.cs
@@ -69,8 +69,6 @@ namespace Apache.Ignite.Examples.Datagrid
                     {
                         MaxSize = 10 // Maximum number of entries that will be stored in Java heap. 
                     },
-                    // Limit off-heap to roughly 10 entries. Actual entry count will be lower due to metadata overhead.
-                    OffHeapMaxMemory = EntrySize * 10,
                 };
 
                 ICache<int, byte[]> cache = ignite.GetOrCreateCache<int, byte[]>(cacheCfg);


[50/57] [abbrv] ignite git commit: .NET: Fix cache metrics

Posted by ag...@apache.org.
.NET: Fix cache metrics


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

Branch: refs/heads/ignite-3477-debug
Commit: 570354702b27cd30f028430297648649d76a84fb
Parents: e319697
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 18:11:23 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 18:11:23 2017 +0300

----------------------------------------------------------------------
 .../Cache/CacheMetricsTest.cs                   | 86 +++++++++-----------
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   | 80 ------------------
 .../Impl/Cache/CacheMetricsImpl.cs              | 60 --------------
 3 files changed, 38 insertions(+), 188 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
index 9c29fbf..d1d6c7b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheMetricsTest.cs
@@ -154,56 +154,46 @@ namespace Apache.Ignite.Core.Tests.Cache
                 Assert.AreEqual(14, metrics.CacheTxCommits);
                 Assert.AreEqual(15, metrics.CacheTxRollbacks);
                 Assert.AreEqual("myCache", metrics.CacheName);
-                Assert.AreEqual(16, metrics.OverflowSize);
-                Assert.AreEqual(17, metrics.OffHeapGets);
-                Assert.AreEqual(18, metrics.OffHeapPuts);
-                Assert.AreEqual(19, metrics.OffHeapRemovals);
-                Assert.AreEqual(20, metrics.OffHeapEvictions);
-                Assert.AreEqual(21, metrics.OffHeapHits);
-                Assert.AreEqual(22, metrics.OffHeapHitPercentage);
-                Assert.AreEqual(23, metrics.OffHeapMisses);
-                Assert.AreEqual(24, metrics.OffHeapMissPercentage);
-                Assert.AreEqual(25, metrics.OffHeapEntriesCount);
-                Assert.AreEqual(26, metrics.OffHeapPrimaryEntriesCount);
-                Assert.AreEqual(27, metrics.OffHeapBackupEntriesCount);
-                Assert.AreEqual(28, metrics.OffHeapAllocatedSize);
-                Assert.AreEqual(29, metrics.OffHeapMaxSize);
-                Assert.AreEqual(30, metrics.SwapGets);
-                Assert.AreEqual(31, metrics.SwapPuts);
-                Assert.AreEqual(32, metrics.SwapRemovals);
-                Assert.AreEqual(33, metrics.SwapHits);
-                Assert.AreEqual(34, metrics.SwapMisses);
-                Assert.AreEqual(35, metrics.SwapEntriesCount);
-                Assert.AreEqual(36, metrics.SwapSize);
-                Assert.AreEqual(37, metrics.SwapHitPercentage);
-                Assert.AreEqual(38, metrics.SwapMissPercentage);
-                Assert.AreEqual(39, metrics.Size);
-                Assert.AreEqual(40, metrics.KeySize);
+                Assert.AreEqual(16, metrics.OffHeapGets);
+                Assert.AreEqual(17, metrics.OffHeapPuts);
+                Assert.AreEqual(18, metrics.OffHeapRemovals);
+                Assert.AreEqual(19, metrics.OffHeapEvictions);
+                Assert.AreEqual(20, metrics.OffHeapHits);
+                Assert.AreEqual(21, metrics.OffHeapHitPercentage);
+                Assert.AreEqual(22, metrics.OffHeapMisses);
+                Assert.AreEqual(23, metrics.OffHeapMissPercentage);
+                Assert.AreEqual(24, metrics.OffHeapEntriesCount);
+                Assert.AreEqual(25, metrics.OffHeapPrimaryEntriesCount);
+                Assert.AreEqual(26, metrics.OffHeapBackupEntriesCount);
+                Assert.AreEqual(27, metrics.OffHeapAllocatedSize);
+                Assert.AreEqual(28, metrics.OffHeapMaxSize);
+                Assert.AreEqual(29, metrics.Size);
+                Assert.AreEqual(30, metrics.KeySize);
                 Assert.AreEqual(true, metrics.IsEmpty);
-                Assert.AreEqual(41, metrics.DhtEvictQueueCurrentSize);
-                Assert.AreEqual(42, metrics.TxThreadMapSize);
-                Assert.AreEqual(43, metrics.TxXidMapSize);
-                Assert.AreEqual(44, metrics.TxCommitQueueSize);
-                Assert.AreEqual(45, metrics.TxPrepareQueueSize);
-                Assert.AreEqual(46, metrics.TxStartVersionCountsSize);
-                Assert.AreEqual(47, metrics.TxCommittedVersionsSize);
-                Assert.AreEqual(48, metrics.TxRolledbackVersionsSize);
-                Assert.AreEqual(49, metrics.TxDhtThreadMapSize);
-                Assert.AreEqual(50, metrics.TxDhtXidMapSize);
-                Assert.AreEqual(51, metrics.TxDhtCommitQueueSize);
-                Assert.AreEqual(52, metrics.TxDhtPrepareQueueSize);
-                Assert.AreEqual(53, metrics.TxDhtStartVersionCountsSize);
-                Assert.AreEqual(54, metrics.TxDhtCommittedVersionsSize);
-                Assert.AreEqual(55, metrics.TxDhtRolledbackVersionsSize);
+                Assert.AreEqual(31, metrics.DhtEvictQueueCurrentSize);
+                Assert.AreEqual(32, metrics.TxThreadMapSize);
+                Assert.AreEqual(33, metrics.TxXidMapSize);
+                Assert.AreEqual(34, metrics.TxCommitQueueSize);
+                Assert.AreEqual(35, metrics.TxPrepareQueueSize);
+                Assert.AreEqual(36, metrics.TxStartVersionCountsSize);
+                Assert.AreEqual(37, metrics.TxCommittedVersionsSize);
+                Assert.AreEqual(38, metrics.TxRolledbackVersionsSize);
+                Assert.AreEqual(39, metrics.TxDhtThreadMapSize);
+                Assert.AreEqual(40, metrics.TxDhtXidMapSize);
+                Assert.AreEqual(41, metrics.TxDhtCommitQueueSize);
+                Assert.AreEqual(42, metrics.TxDhtPrepareQueueSize);
+                Assert.AreEqual(43, metrics.TxDhtStartVersionCountsSize);
+                Assert.AreEqual(44, metrics.TxDhtCommittedVersionsSize);
+                Assert.AreEqual(45, metrics.TxDhtRolledbackVersionsSize);
                 Assert.AreEqual(true, metrics.IsWriteBehindEnabled);
-                Assert.AreEqual(56, metrics.WriteBehindFlushSize);
-                Assert.AreEqual(57, metrics.WriteBehindFlushThreadCount);
-                Assert.AreEqual(58, metrics.WriteBehindFlushFrequency);
-                Assert.AreEqual(59, metrics.WriteBehindStoreBatchSize);
-                Assert.AreEqual(60, metrics.WriteBehindTotalCriticalOverflowCount);
-                Assert.AreEqual(61, metrics.WriteBehindCriticalOverflowCount);
-                Assert.AreEqual(62, metrics.WriteBehindErrorRetryCount);
-                Assert.AreEqual(63, metrics.WriteBehindBufferSize);
+                Assert.AreEqual(46, metrics.WriteBehindFlushSize);
+                Assert.AreEqual(47, metrics.WriteBehindFlushThreadCount);
+                Assert.AreEqual(48, metrics.WriteBehindFlushFrequency);
+                Assert.AreEqual(49, metrics.WriteBehindStoreBatchSize);
+                Assert.AreEqual(50, metrics.WriteBehindTotalCriticalOverflowCount);
+                Assert.AreEqual(51, metrics.WriteBehindCriticalOverflowCount);
+                Assert.AreEqual(52, metrics.WriteBehindErrorRetryCount);
+                Assert.AreEqual(53, metrics.WriteBehindBufferSize);
                 Assert.AreEqual("foo", metrics.KeyType);
                 Assert.AreEqual("bar", metrics.ValueType);
                 Assert.AreEqual(true, metrics.IsStoreByValue);

http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
index 9117bf8..596322b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/ICacheMetrics.cs
@@ -153,14 +153,6 @@ namespace Apache.Ignite.Core.Cache
         string CacheName { get; }
 
         /// <summary>
-        /// Gets number of entries that was swapped to disk.
-        /// </summary>
-        /// <returns>
-        /// Number of entries that was swapped to disk.
-        /// </returns>
-        long OverflowSize { get; }
-
-        /// <summary>
         /// The total number of get requests to the off-heap memory.
         /// </summary>
         /// <returns>
@@ -265,78 +257,6 @@ namespace Apache.Ignite.Core.Cache
         long OffHeapMaxSize { get; }
 
         /// <summary>
-        /// The total number of get requests to the swap.
-        /// </summary>
-        /// <returns>
-        /// The number of gets from the swap.
-        /// </returns>
-        long SwapGets { get; }
-
-        /// <summary>
-        /// The total number of put requests to the swap.
-        /// </summary>
-        /// <returns>
-        /// The number of puts to the swap.
-        /// </returns>
-        long SwapPuts { get; }
-
-        /// <summary>
-        /// The total number of removals from the swap.
-        /// </summary>
-        /// <returns>
-        /// The number of removals from the swap.
-        /// </returns>
-        long SwapRemovals { get; }
-
-        /// <summary>
-        /// The number of get requests that were satisfied by the swap.
-        /// </summary>
-        /// <returns>
-        /// The swap hits number.
-        /// </returns>
-        long SwapHits { get; }
-
-        /// <summary>
-        /// A number of get requests to that were not satisfied by the swap.
-        /// </summary>
-        /// <returns>
-        /// The swap misses number.
-        /// </returns>
-        long SwapMisses { get; }
-
-        /// <summary>
-        /// Gets number of entries stored in swap.
-        /// </summary>
-        /// <returns>
-        /// Number of entries stored in swap.
-        /// </returns>
-        long SwapEntriesCount { get; }
-
-        /// <summary>
-        /// Gets size of swap, in bytes.
-        /// </summary>
-        /// <returns>
-        /// Size of swap, in bytes.
-        /// </returns>
-        long SwapSize { get; }
-
-        /// <summary>
-        /// Gets the percentage of hits on swap.
-        /// </summary>
-        /// <returns>
-        /// The percentage of hits on swap.
-        /// </returns>
-        float SwapHitPercentage { get; }
-
-        /// <summary>
-        /// Gets the percentage of misses on swap.
-        /// </summary>
-        /// <returns>
-        /// The percentage of misses on swap.
-        /// </returns>
-        float SwapMissPercentage { get; }
-
-        /// <summary>
         /// Gets number of non-null values in the cache.
         /// </summary>
         /// <returns>

http://git-wip-us.apache.org/repos/asf/ignite/blob/57035470/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
index a2f0417..53ff810 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
@@ -74,9 +74,6 @@ namespace Apache.Ignite.Core.Impl.Cache
         private readonly string _cacheName;
 
         /** */
-        private readonly long _overflowSize;
-
-        /** */
         private readonly long _offHeapGets;
 
         /** */
@@ -116,33 +113,6 @@ namespace Apache.Ignite.Core.Impl.Cache
         private readonly long _offHeapMaxSize;
 
         /** */
-        private readonly long _swapGets;
-
-        /** */
-        private readonly long _swapPuts;
-
-        /** */
-        private readonly long _swapRemovals;
-
-        /** */
-        private readonly long _swapHits;
-
-        /** */
-        private readonly long _swapMisses;
-
-        /** */
-        private readonly long _swapEntriesCount;
-
-        /** */
-        private readonly long _swapSize;
-
-        /** */
-        private readonly float _swapHitPercentage;
-
-        /** */
-        private readonly float _swapMissPercentage;
-
-        /** */
         private readonly int _size;
 
         /** */
@@ -364,9 +334,6 @@ namespace Apache.Ignite.Core.Impl.Cache
         public string CacheName { get { return _cacheName; } }
 
         /** <inheritDoc /> */
-        public long OverflowSize { get { return _overflowSize; } }
-
-        /** <inheritDoc /> */
         public long OffHeapGets { get { return _offHeapGets; } }
 
         /** <inheritDoc /> */
@@ -406,33 +373,6 @@ namespace Apache.Ignite.Core.Impl.Cache
         public long OffHeapMaxSize { get { return _offHeapMaxSize; } }
 
         /** <inheritDoc /> */
-        public long SwapGets { get { return _swapGets; } }
-
-        /** <inheritDoc /> */
-        public long SwapPuts { get { return _swapPuts; } }
-
-        /** <inheritDoc /> */
-        public long SwapRemovals { get { return _swapRemovals; } }
-
-        /** <inheritDoc /> */
-        public long SwapHits { get { return _swapHits; } }
-
-        /** <inheritDoc /> */
-        public long SwapMisses { get { return _swapMisses; } }
-
-        /** <inheritDoc /> */
-        public long SwapEntriesCount { get { return _swapEntriesCount; } }
-
-        /** <inheritDoc /> */
-        public long SwapSize { get { return _swapSize; } }
-
-        /** <inheritDoc /> */
-        public float SwapHitPercentage { get { return _swapHitPercentage; } }
-
-        /** <inheritDoc /> */
-        public float SwapMissPercentage { get { return _swapMissPercentage; } }
-
-        /** <inheritDoc /> */
         public int Size { get { return _size; } }
 
         /** <inheritDoc /> */


[29/57] [abbrv] ignite git commit: IGNITE-4941: Removed old GridDhtPartitionSupplyMessage.

Posted by ag...@apache.org.
IGNITE-4941: Removed old GridDhtPartitionSupplyMessage.


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

Branch: refs/heads/ignite-3477-debug
Commit: aeacad6b87ac95dd2f5da525573d6fa58f4e51db
Parents: edfa353
Author: devozerov <vo...@gridgain.com>
Authored: Tue Apr 11 12:18:52 2017 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Tue Apr 11 12:18:52 2017 +0300

----------------------------------------------------------------------
 .../communication/GridIoMessageFactory.java     |   8 +-
 .../GridCachePartitionExchangeManager.java      |   7 +-
 .../processors/cache/GridCachePreloader.java    |   4 +-
 .../cache/GridCachePreloaderAdapter.java        |   4 +-
 .../dht/preloader/GridDhtPartitionDemander.java |   2 +-
 .../dht/preloader/GridDhtPartitionSupplier.java | 310 +--------------
 .../GridDhtPartitionSupplyMessage.java          |  99 ++---
 .../GridDhtPartitionSupplyMessageV2.java        | 384 -------------------
 .../dht/preloader/GridDhtPreloader.java         |   3 +-
 .../resources/META-INF/classnames.properties    |   1 -
 .../CacheLateAffinityAssignmentTest.java        |   6 +-
 .../IgniteCacheReadFromBackupTest.java          |   6 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |   3 +-
 13 files changed, 60 insertions(+), 777 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index 737d047..8aac56d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -86,7 +86,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleRequest;
@@ -498,11 +497,6 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
-            case 45:
-                msg = new GridDhtPartitionSupplyMessage();
-
-                break;
-
             case 46:
                 msg = new GridDhtPartitionsFullMessage();
 
@@ -824,7 +818,7 @@ public class GridIoMessageFactory implements MessageFactory {
                 break;
 
             case 114:
-                msg = new GridDhtPartitionSupplyMessageV2();
+                msg = new GridDhtPartitionSupplyMessage();
 
                 break;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
index 231dff8..885106d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePartitionExchangeManager.java
@@ -67,8 +67,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.Gri
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionExchangeId;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionFullMap;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionMap;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage;
@@ -394,9 +393,9 @@ public class GridCachePartitionExchangeManager<K, V> extends GridCacheSharedMana
                             GridCacheContext cacheCtx = cctx.cacheContext(m.cacheId);
 
                             if (cacheCtx != null) {
-                                if (m instanceof GridDhtPartitionSupplyMessageV2)
+                                if (m instanceof GridDhtPartitionSupplyMessage)
                                     cacheCtx.preloader().handleSupplyMessage(
-                                        idx, id, (GridDhtPartitionSupplyMessageV2)m);
+                                        idx, id, (GridDhtPartitionSupplyMessage)m);
                                 else if (m instanceof GridDhtPartitionDemandMessage)
                                     cacheCtx.preloader().handleDemandMessage(
                                         idx, id, (GridDhtPartitionDemandMessage)m);

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
index 0c28691..df0d71d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloader.java
@@ -25,7 +25,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloaderAssignments;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
@@ -168,7 +168,7 @@ public interface GridCachePreloader {
      * @param id Node Id.
      * @param s Supply message.
      */
-    public void handleSupplyMessage(int idx, UUID id, final GridDhtPartitionSupplyMessageV2 s);
+    public void handleSupplyMessage(int idx, UUID id, final GridDhtPartitionSupplyMessage s);
 
     /**
      * Handles Demand message.

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
index d7ec288..ac3b6cc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCachePreloaderAdapter.java
@@ -27,7 +27,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridNearAtomicAbstractUpdateRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemandMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloaderAssignments;
 import org.apache.ignite.internal.util.future.GridFinishedFuture;
@@ -134,7 +134,7 @@ public class GridCachePreloaderAdapter implements GridCachePreloader {
     }
 
     /** {@inheritDoc} */
-    @Override public void handleSupplyMessage(int idx, UUID id, GridDhtPartitionSupplyMessageV2 s) {
+    @Override public void handleSupplyMessage(int idx, UUID id, GridDhtPartitionSupplyMessage s) {
         // No-op.
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
index d5f2246..f8114cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionDemander.java
@@ -541,7 +541,7 @@ public class GridDhtPartitionDemander {
     public void handleSupplyMessage(
         int idx,
         final UUID id,
-        final GridDhtPartitionSupplyMessageV2 supply
+        final GridDhtPartitionSupplyMessage supply
     ) {
         AffinityTopologyVersion topVer = supply.topologyVersion();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
index 9942423..7c2599a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplier.java
@@ -38,7 +38,6 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalP
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionTopology;
 import org.apache.ignite.internal.util.lang.GridCloseableIterator;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.CI2;
 import org.apache.ignite.internal.util.typedef.T3;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -87,13 +86,6 @@ class GridDhtPartitionSupplier {
     /**
      *
      */
-    void start() {
-        startOldListeners();
-    }
-
-    /**
-     *
-     */
     void stop() {
         synchronized (scMap) {
             Iterator<T3<UUID, Integer, AffinityTopologyVersion>> it = scMap.keySet().iterator();
@@ -106,8 +98,6 @@ class GridDhtPartitionSupplier {
                 it.remove();
             }
         }
-
-        stopOldListeners();
     }
 
     /**
@@ -146,6 +136,7 @@ class GridDhtPartitionSupplier {
      *
      * @param topVer Topology version.
      */
+    @SuppressWarnings("ConstantConditions")
     public void onTopologyChanged(AffinityTopologyVersion topVer) {
         synchronized (scMap) {
             Iterator<T3<UUID, Integer, AffinityTopologyVersion>> it = scMap.keySet().iterator();
@@ -179,6 +170,7 @@ class GridDhtPartitionSupplier {
      * @param idx Index.
      * @param id Node uuid.
      */
+    @SuppressWarnings("unchecked")
     public void handleDemandMessage(int idx, UUID id, GridDhtPartitionDemandMessage d) {
         assert d != null;
         assert id != null;
@@ -208,7 +200,7 @@ class GridDhtPartitionSupplier {
             log.debug("Demand request accepted [current=" + cutTop + ", demanded=" + demTop +
                 ", from=" + id + ", idx=" + idx + "]");
 
-        GridDhtPartitionSupplyMessageV2 s = new GridDhtPartitionSupplyMessageV2(
+        GridDhtPartitionSupplyMessage s = new GridDhtPartitionSupplyMessage(
             d.updateSequence(), cctx.cacheId(), d.topologyVersion(), cctx.deploymentEnabled());
 
         ClusterNode node = cctx.discovery().node(id);
@@ -338,7 +330,7 @@ class GridDhtPartitionSupplier {
                                     if (!reply(node, d, s, scId))
                                         return;
 
-                                    s = new GridDhtPartitionSupplyMessageV2(d.updateSequence(),
+                                    s = new GridDhtPartitionSupplyMessage(d.updateSequence(),
                                         cctx.cacheId(), d.topologyVersion(), cctx.deploymentEnabled());
                                 }
                             }
@@ -424,7 +416,7 @@ class GridDhtPartitionSupplier {
                                         if (!reply(node, d, s, scId))
                                             return;
 
-                                        s = new GridDhtPartitionSupplyMessageV2(d.updateSequence(),
+                                        s = new GridDhtPartitionSupplyMessage(d.updateSequence(),
                                             cctx.cacheId(), d.topologyVersion(), cctx.deploymentEnabled());
                                     }
                                 }
@@ -545,7 +537,7 @@ class GridDhtPartitionSupplier {
                                     if (!reply(node, d, s, scId))
                                         return;
 
-                                    s = new GridDhtPartitionSupplyMessageV2(d.updateSequence(),
+                                    s = new GridDhtPartitionSupplyMessage(d.updateSequence(),
                                         cctx.cacheId(), d.topologyVersion(), cctx.deploymentEnabled());
                                 }
                             }
@@ -605,7 +597,7 @@ class GridDhtPartitionSupplier {
      */
     private boolean reply(ClusterNode n,
         GridDhtPartitionDemandMessage d,
-        GridDhtPartitionSupplyMessageV2 s,
+        GridDhtPartitionSupplyMessage s,
         T3<UUID, Integer, AffinityTopologyVersion> scId)
         throws IgniteCheckedException {
 
@@ -744,294 +736,6 @@ class GridDhtPartitionSupplier {
         }
     }
 
-    @Deprecated//Backward compatibility. To be removed in future.
-    public void startOldListeners() {
-        if (!cctx.kernalContext().clientNode() && cctx.rebalanceEnabled()) {
-            cctx.io().addHandler(cctx.cacheId(), GridDhtPartitionDemandMessage.class, new CI2<UUID, GridDhtPartitionDemandMessage>() {
-                @Override public void apply(UUID id, GridDhtPartitionDemandMessage m) {
-                    processOldDemandMessage(m, id);
-                }
-            });
-        }
-    }
-
-    @Deprecated//Backward compatibility. To be removed in future.
-    public void stopOldListeners() {
-        if (!cctx.kernalContext().clientNode() && cctx.rebalanceEnabled())
-            cctx.io().removeHandler(cctx.cacheId(), GridDhtPartitionDemandMessage.class);
-    }
-
-    /**
-     * @param d D.
-     * @param id Id.
-     */
-    @Deprecated//Backward compatibility. To be removed in future.
-    private void processOldDemandMessage(GridDhtPartitionDemandMessage d, UUID id) {
-        GridDhtPartitionSupplyMessage s = new GridDhtPartitionSupplyMessage(d.workerId(),
-            d.updateSequence(), cctx.cacheId(), cctx.deploymentEnabled());
-
-        ClusterNode node = cctx.node(id);
-
-        if (node == null)
-            return;
-
-        long preloadThrottle = cctx.config().getRebalanceThrottle();
-
-        boolean ack = false;
-
-        try {
-            for (int part : d.partitions()) {
-                GridDhtLocalPartition loc = top.localPartition(part, d.topologyVersion(), false);
-
-                if (loc == null || loc.state() != OWNING || !loc.reserve()) {
-                    // Reply with partition of "-1" to let sender know that
-                    // this node is no longer an owner.
-                    s.missed(part);
-
-                    if (log.isDebugEnabled())
-                        log.debug("Requested partition is not owned by local node [part=" + part +
-                            ", demander=" + id + ']');
-
-                    continue;
-                }
-
-                GridCacheEntryInfoCollectSwapListener swapLsnr = null;
-
-                try {
-                    if (cctx.isSwapOrOffheapEnabled()) {
-                        swapLsnr = new GridCacheEntryInfoCollectSwapListener(log);
-
-                        cctx.swap().addOffHeapListener(part, swapLsnr);
-                        cctx.swap().addSwapListener(part, swapLsnr);
-                    }
-
-                    boolean partMissing = false;
-
-                    for (GridCacheEntryEx e : loc.allEntries()) {
-                        if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
-                            // Demander no longer needs this partition, so we send '-1' partition and move on.
-                            s.missed(part);
-
-                            if (log.isDebugEnabled())
-                                log.debug("Demanding node does not need requested partition [part=" + part +
-                                    ", nodeId=" + id + ']');
-
-                            partMissing = true;
-
-                            break;
-                        }
-
-                        if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) {
-                            ack = true;
-
-                            if (!replyOld(node, d, s))
-                                return;
-
-                            // Throttle preloading.
-                            if (preloadThrottle > 0)
-                                U.sleep(preloadThrottle);
-
-                            s = new GridDhtPartitionSupplyMessage(d.workerId(), d.updateSequence(),
-                                cctx.cacheId(), cctx.deploymentEnabled());
-                        }
-
-                        GridCacheEntryInfo info = e.info();
-
-                        if (info != null && !info.isNew()) {
-                            if (preloadPred == null || preloadPred.apply(info))
-                                s.addEntry(part, info, cctx);
-                            else if (log.isDebugEnabled())
-                                log.debug("Rebalance predicate evaluated to false (will not sender cache entry): " +
-                                    info);
-                        }
-                    }
-
-                    if (partMissing)
-                        continue;
-
-                    if (cctx.isSwapOrOffheapEnabled()) {
-                        GridCloseableIterator<Map.Entry<byte[], GridCacheSwapEntry>> iter =
-                            cctx.swap().iterator(part);
-
-                        // Iterator may be null if space does not exist.
-                        if (iter != null) {
-                            try {
-                                boolean prepared = false;
-
-                                for (Map.Entry<byte[], GridCacheSwapEntry> e : iter) {
-                                    if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
-                                        // Demander no longer needs this partition,
-                                        // so we send '-1' partition and move on.
-                                        s.missed(part);
-
-                                        if (log.isDebugEnabled())
-                                            log.debug("Demanding node does not need requested partition " +
-                                                "[part=" + part + ", nodeId=" + id + ']');
-
-                                        partMissing = true;
-
-                                        break; // For.
-                                    }
-
-                                    if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) {
-                                        ack = true;
-
-                                        if (!replyOld(node, d, s))
-                                            return;
-
-                                        // Throttle preloading.
-                                        if (preloadThrottle > 0)
-                                            U.sleep(preloadThrottle);
-
-                                        s = new GridDhtPartitionSupplyMessage(d.workerId(),
-                                            d.updateSequence(), cctx.cacheId(), cctx.deploymentEnabled());
-                                    }
-
-                                    GridCacheSwapEntry swapEntry = e.getValue();
-
-                                    GridCacheEntryInfo info = new GridCacheEntryInfo();
-
-                                    info.keyBytes(e.getKey());
-                                    info.ttl(swapEntry.ttl());
-                                    info.expireTime(swapEntry.expireTime());
-                                    info.version(swapEntry.version());
-                                    info.value(swapEntry.value());
-
-                                    if (preloadPred == null || preloadPred.apply(info))
-                                        s.addEntry0(part, info, cctx);
-                                    else {
-                                        if (log.isDebugEnabled())
-                                            log.debug("Rebalance predicate evaluated to false (will not send " +
-                                                "cache entry): " + info);
-
-                                        continue;
-                                    }
-
-                                    // Need to manually prepare cache message.
-                                    if (depEnabled && !prepared) {
-                                        ClassLoader ldr = swapEntry.keyClassLoaderId() != null ?
-                                            cctx.deploy().getClassLoader(swapEntry.keyClassLoaderId()) :
-                                            swapEntry.valueClassLoaderId() != null ?
-                                                cctx.deploy().getClassLoader(swapEntry.valueClassLoaderId()) :
-                                                null;
-
-                                        if (ldr == null)
-                                            continue;
-
-                                        if (ldr instanceof GridDeploymentInfo) {
-                                            s.prepare((GridDeploymentInfo)ldr);
-
-                                            prepared = true;
-                                        }
-                                    }
-                                }
-
-                                if (partMissing)
-                                    continue;
-                            }
-                            finally {
-                                iter.close();
-                            }
-                        }
-                    }
-
-                    // Stop receiving promote notifications.
-                    if (swapLsnr != null) {
-                        cctx.swap().removeOffHeapListener(part, swapLsnr);
-                        cctx.swap().removeSwapListener(part, swapLsnr);
-                    }
-
-                    if (swapLsnr != null) {
-                        Collection<GridCacheEntryInfo> entries = swapLsnr.entries();
-
-                        swapLsnr = null;
-
-                        for (GridCacheEntryInfo info : entries) {
-                            if (!cctx.affinity().partitionBelongs(node, part, d.topologyVersion())) {
-                                // Demander no longer needs this partition,
-                                // so we send '-1' partition and move on.
-                                s.missed(part);
-
-                                if (log.isDebugEnabled())
-                                    log.debug("Demanding node does not need requested partition " +
-                                        "[part=" + part + ", nodeId=" + id + ']');
-
-                                // No need to continue iteration over swap entries.
-                                break;
-                            }
-
-                            if (s.messageSize() >= cctx.config().getRebalanceBatchSize()) {
-                                ack = true;
-
-                                if (!replyOld(node, d, s))
-                                    return;
-
-                                s = new GridDhtPartitionSupplyMessage(d.workerId(),
-                                    d.updateSequence(),
-                                    cctx.cacheId(),
-                                    cctx.deploymentEnabled());
-                            }
-
-                            if (preloadPred == null || preloadPred.apply(info))
-                                s.addEntry(part, info, cctx);
-                            else if (log.isDebugEnabled())
-                                log.debug("Rebalance predicate evaluated to false (will not sender cache entry): " +
-                                    info);
-                        }
-                    }
-
-                    // Mark as last supply message.
-                    s.last(part);
-
-                    if (ack) {
-                        s.markAck();
-
-                        break; // Partition for loop.
-                    }
-                }
-                finally {
-                    loc.release();
-
-                    if (swapLsnr != null) {
-                        cctx.swap().removeOffHeapListener(part, swapLsnr);
-                        cctx.swap().removeSwapListener(part, swapLsnr);
-                    }
-                }
-            }
-
-            replyOld(node, d, s);
-        }
-        catch (IgniteCheckedException e) {
-            U.error(log, "Failed to send partition supply message to node: " + node.id(), e);
-        }
-    }
-
-    /**
-     * @param n Node.
-     * @param d Demand message.
-     * @param s Supply message.
-     * @return {@code True} if message was sent, {@code false} if recipient left grid.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Deprecated//Backward compatibility. To be removed in future.
-    private boolean replyOld(ClusterNode n, GridDhtPartitionDemandMessage d, GridDhtPartitionSupplyMessage s)
-        throws IgniteCheckedException {
-        try {
-            if (log.isDebugEnabled())
-                log.debug("Replying to partition demand [node=" + n.id() + ", demand=" + d + ", supply=" + s + ']');
-
-            cctx.io().sendOrderedMessage(n, d.topic(), s, cctx.ioPolicy(), d.timeout());
-
-            return true;
-        }
-        catch (ClusterTopologyCheckedException ignore) {
-            if (log.isDebugEnabled())
-                log.debug("Failed to send partition supply message because node left grid: " + n.id());
-
-            return false;
-        }
-    }
-
     /**
      * Dumps debug information.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
index cc30321..a01be28 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessage.java
@@ -29,6 +29,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.GridDirectCollection;
 import org.apache.ignite.internal.GridDirectMap;
 import org.apache.ignite.internal.GridDirectTransient;
+import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.CacheEntryInfoCollection;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
@@ -48,14 +49,11 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
     /** */
     private static final long serialVersionUID = 0L;
 
-    /** Worker ID. */
-    private int workerId = -1;
-
     /** Update sequence. */
     private long updateSeq;
 
-    /** Acknowledgement flag. */
-    private boolean ack;
+    /** Topology version. */
+    private AffinityTopologyVersion topVer;
 
     /** Partitions that have been fully sent. */
     @GridDirectCollection(int.class)
@@ -68,27 +66,26 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
     /** Entries. */
     @GridDirectMap(keyType = int.class, valueType = CacheEntryInfoCollection.class)
-    private Map<Integer, CacheEntryInfoCollection> infos = new HashMap<>();
+    private Map<Integer, CacheEntryInfoCollection> infos;
 
     /** Message size. */
     @GridDirectTransient
     private int msgSize;
 
     /**
-     * @param workerId Worker ID.
      * @param updateSeq Update sequence for this node.
      * @param cacheId Cache ID.
+     * @param topVer Topology version.
      * @param addDepInfo Deployment info flag.
      */
-    GridDhtPartitionSupplyMessage(int workerId, long updateSeq, int cacheId, boolean addDepInfo) {
-        assert workerId >= 0;
-        assert updateSeq > 0;
-
+    GridDhtPartitionSupplyMessage(long updateSeq,
+        int cacheId,
+        AffinityTopologyVersion topVer,
+        boolean addDepInfo) {
         this.cacheId = cacheId;
         this.updateSeq = updateSeq;
-        this.workerId = workerId;
-        this.addDepInfo = addDepInfo;
-    }
+        this.topVer = topVer;
+        this.addDepInfo = addDepInfo;    }
 
     /**
      * Empty constructor required for {@link Externalizable}.
@@ -103,13 +100,6 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
     }
 
     /**
-     * @return Worker ID.
-     */
-    int workerId() {
-        return workerId;
-    }
-
-    /**
      * @return Update sequence.
      */
     long updateSequence() {
@@ -117,17 +107,10 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
     }
 
     /**
-     * Marks this message for acknowledgment.
+     * @return Topology version for which demand message is sent.
      */
-    void markAck() {
-        ack = true;
-    }
-
-    /**
-     * @return Acknowledgement flag.
-     */
-    boolean ack() {
-        return ack;
+    @Override public AffinityTopologyVersion topologyVersion() {
+        return topVer;
     }
 
     /**
@@ -148,12 +131,12 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
             msgSize += 4;
 
             // If partition is empty, we need to add it.
-            if (!infos.containsKey(p)) {
+            if (!infos().containsKey(p)) {
                 CacheEntryInfoCollection infoCol = new CacheEntryInfoCollection();
 
                 infoCol.init();
 
-                infos.put(p, infoCol);
+                infos().put(p, infoCol);
             }
         }
     }
@@ -180,6 +163,9 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
      * @return Entries.
      */
     Map<Integer, CacheEntryInfoCollection> infos() {
+        if (infos == null)
+            infos = new HashMap<>();
+
         return infos;
     }
 
@@ -203,12 +189,12 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
         msgSize += info.marshalledSize(ctx);
 
-        CacheEntryInfoCollection infoCol = infos.get(p);
+        CacheEntryInfoCollection infoCol = infos().get(p);
 
         if (infoCol == null) {
             msgSize += 4;
 
-            infos.put(p, infoCol = new CacheEntryInfoCollection());
+            infos().put(p, infoCol = new CacheEntryInfoCollection());
 
             infoCol.init();
         }
@@ -232,12 +218,12 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
         msgSize += info.marshalledSize(ctx);
 
-        CacheEntryInfoCollection infoCol = infos.get(p);
+        CacheEntryInfoCollection infoCol = infos().get(p);
 
         if (infoCol == null) {
             msgSize += 4;
 
-            infos.put(p, infoCol = new CacheEntryInfoCollection());
+            infos().put(p, infoCol = new CacheEntryInfoCollection());
 
             infoCol.init();
         }
@@ -253,7 +239,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
         GridCacheContext cacheCtx = ctx.cacheContext(cacheId);
 
         for (CacheEntryInfoCollection col : infos().values()) {
-            List<GridCacheEntryInfo>  entries = col.infos();
+            List<GridCacheEntryInfo> entries = col.infos();
 
             for (int i = 0; i < entries.size(); i++)
                 entries.get(i).unmarshal(cacheCtx, ldr);
@@ -269,7 +255,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
      * @return Number of entries in message.
      */
     public int size() {
-        return infos.size();
+        return infos().size();
     }
 
     /** {@inheritDoc} */
@@ -288,25 +274,25 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
         switch (writer.state()) {
             case 3:
-                if (!writer.writeBoolean("ack", ack))
+                if (!writer.writeMap("infos", infos, MessageCollectionItemType.INT, MessageCollectionItemType.MSG))
                     return false;
 
                 writer.incrementState();
 
             case 4:
-                if (!writer.writeMap("infos", infos, MessageCollectionItemType.INT, MessageCollectionItemType.MSG))
+                if (!writer.writeCollection("last", last, MessageCollectionItemType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 5:
-                if (!writer.writeCollection("last", last, MessageCollectionItemType.INT))
+                if (!writer.writeCollection("missed", missed, MessageCollectionItemType.INT))
                     return false;
 
                 writer.incrementState();
 
             case 6:
-                if (!writer.writeCollection("missed", missed, MessageCollectionItemType.INT))
+                if (!writer.writeMessage("topVer", topVer))
                     return false;
 
                 writer.incrementState();
@@ -317,12 +303,6 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
                 writer.incrementState();
 
-            case 8:
-                if (!writer.writeInt("workerId", workerId))
-                    return false;
-
-                writer.incrementState();
-
         }
 
         return true;
@@ -340,7 +320,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
         switch (reader.state()) {
             case 3:
-                ack = reader.readBoolean("ack");
+                infos = reader.readMap("infos", MessageCollectionItemType.INT, MessageCollectionItemType.MSG, false);
 
                 if (!reader.isLastRead())
                     return false;
@@ -348,7 +328,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
                 reader.incrementState();
 
             case 4:
-                infos = reader.readMap("infos", MessageCollectionItemType.INT, MessageCollectionItemType.MSG, false);
+                last = reader.readCollection("last", MessageCollectionItemType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -356,7 +336,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
                 reader.incrementState();
 
             case 5:
-                last = reader.readCollection("last", MessageCollectionItemType.INT);
+                missed = reader.readCollection("missed", MessageCollectionItemType.INT);
 
                 if (!reader.isLastRead())
                     return false;
@@ -364,7 +344,7 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
                 reader.incrementState();
 
             case 6:
-                missed = reader.readCollection("missed", MessageCollectionItemType.INT);
+                topVer = reader.readMessage("topVer");
 
                 if (!reader.isLastRead())
                     return false;
@@ -379,14 +359,6 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
                 reader.incrementState();
 
-            case 8:
-                workerId = reader.readInt("workerId");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
         }
 
         return reader.afterMessageRead(GridDhtPartitionSupplyMessage.class);
@@ -394,18 +366,19 @@ public class GridDhtPartitionSupplyMessage extends GridCacheMessage implements G
 
     /** {@inheritDoc} */
     @Override public short directType() {
-        return 45;
+        return 114;
     }
 
     /** {@inheritDoc} */
     @Override public byte fieldsCount() {
-        return 9;
+        return 8;
     }
 
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(GridDhtPartitionSupplyMessage.class, this,
             "size", size(),
+            "parts", infos().keySet(),
             "super", super.toString());
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessageV2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessageV2.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessageV2.java
deleted file mode 100644
index 2294582..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionSupplyMessageV2.java
+++ /dev/null
@@ -1,384 +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.apache.ignite.internal.processors.cache.distributed.dht.preloader;
-
-import java.io.Externalizable;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.GridDirectMap;
-import org.apache.ignite.internal.GridDirectTransient;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.CacheEntryInfoCollection;
-import org.apache.ignite.internal.processors.cache.GridCacheContext;
-import org.apache.ignite.internal.processors.cache.GridCacheDeployable;
-import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
-import org.apache.ignite.internal.processors.cache.GridCacheMessage;
-import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Partition supply message.
- */
-public class GridDhtPartitionSupplyMessageV2 extends GridCacheMessage implements GridCacheDeployable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Update sequence. */
-    private long updateSeq;
-
-    /** Topology version. */
-    private AffinityTopologyVersion topVer;
-
-    /** Partitions that have been fully sent. */
-    @GridDirectCollection(int.class)
-    private Collection<Integer> last;
-
-    /** Partitions which were not found. */
-    @GridToStringInclude
-    @GridDirectCollection(int.class)
-    private Collection<Integer> missed;
-
-    /** Entries. */
-    @GridDirectMap(keyType = int.class, valueType = CacheEntryInfoCollection.class)
-    private Map<Integer, CacheEntryInfoCollection> infos;
-
-    /** Message size. */
-    @GridDirectTransient
-    private int msgSize;
-
-    /**
-     * @param updateSeq Update sequence for this node.
-     * @param cacheId Cache ID.
-     * @param topVer Topology version.
-     * @param addDepInfo Deployment info flag.
-     */
-    GridDhtPartitionSupplyMessageV2(long updateSeq,
-        int cacheId,
-        AffinityTopologyVersion topVer,
-        boolean addDepInfo) {
-        this.cacheId = cacheId;
-        this.updateSeq = updateSeq;
-        this.topVer = topVer;
-        this.addDepInfo = addDepInfo;    }
-
-    /**
-     * Empty constructor required for {@link Externalizable}.
-     */
-    public GridDhtPartitionSupplyMessageV2() {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean ignoreClassErrors() {
-        return true;
-    }
-
-    /**
-     * @return Update sequence.
-     */
-    long updateSequence() {
-        return updateSeq;
-    }
-
-    /**
-     * @return Topology version for which demand message is sent.
-     */
-    @Override public AffinityTopologyVersion topologyVersion() {
-        return topVer;
-    }
-
-    /**
-     * @return Flag to indicate last message for partition.
-     */
-    Collection<Integer> last() {
-        return last == null ? Collections.<Integer>emptySet() : last;
-    }
-
-    /**
-     * @param p Partition which was fully sent.
-     */
-    void last(int p) {
-        if (last == null)
-            last = new HashSet<>();
-
-        if (last.add(p)) {
-            msgSize += 4;
-
-            // If partition is empty, we need to add it.
-            if (!infos().containsKey(p)) {
-                CacheEntryInfoCollection infoCol = new CacheEntryInfoCollection();
-
-                infoCol.init();
-
-                infos().put(p, infoCol);
-            }
-        }
-    }
-
-    /**
-     * @param p Missed partition.
-     */
-    void missed(int p) {
-        if (missed == null)
-            missed = new HashSet<>();
-
-        if (missed.add(p))
-            msgSize += 4;
-    }
-
-    /**
-     * @return Missed partitions.
-     */
-    Collection<Integer> missed() {
-        return missed == null ? Collections.<Integer>emptySet() : missed;
-    }
-
-    /**
-     * @return Entries.
-     */
-    Map<Integer, CacheEntryInfoCollection> infos() {
-        if (infos == null)
-            infos = new HashMap<>();
-
-        return infos;
-    }
-
-    /**
-     * @return Message size.
-     */
-    int messageSize() {
-        return msgSize;
-    }
-
-    /**
-     * @param p Partition.
-     * @param info Entry to add.
-     * @param ctx Cache context.
-     * @throws IgniteCheckedException If failed.
-     */
-    void addEntry(int p, GridCacheEntryInfo info, GridCacheContext ctx) throws IgniteCheckedException {
-        assert info != null;
-
-        marshalInfo(info, ctx);
-
-        msgSize += info.marshalledSize(ctx);
-
-        CacheEntryInfoCollection infoCol = infos().get(p);
-
-        if (infoCol == null) {
-            msgSize += 4;
-
-            infos().put(p, infoCol = new CacheEntryInfoCollection());
-
-            infoCol.init();
-        }
-
-        infoCol.add(info);
-    }
-
-    /**
-     * @param p Partition.
-     * @param info Entry to add.
-     * @param ctx Cache context.
-     * @throws IgniteCheckedException If failed.
-     */
-    void addEntry0(int p, GridCacheEntryInfo info, GridCacheContext ctx) throws IgniteCheckedException {
-        assert info != null;
-        assert (info.key() != null || info.keyBytes() != null);
-        assert info.value() != null;
-
-        // Need to call this method to initialize info properly.
-        marshalInfo(info, ctx);
-
-        msgSize += info.marshalledSize(ctx);
-
-        CacheEntryInfoCollection infoCol = infos().get(p);
-
-        if (infoCol == null) {
-            msgSize += 4;
-
-            infos().put(p, infoCol = new CacheEntryInfoCollection());
-
-            infoCol.init();
-        }
-
-        infoCol.add(info);
-    }
-
-    /** {@inheritDoc} */
-    @SuppressWarnings("ForLoopReplaceableByForEach")
-    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
-        super.finishUnmarshal(ctx, ldr);
-
-        GridCacheContext cacheCtx = ctx.cacheContext(cacheId);
-
-        for (CacheEntryInfoCollection col : infos().values()) {
-            List<GridCacheEntryInfo> entries = col.infos();
-
-            for (int i = 0; i < entries.size(); i++)
-                entries.get(i).unmarshal(cacheCtx, ldr);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean addDeploymentInfo() {
-        return addDepInfo;
-    }
-
-    /**
-     * @return Number of entries in message.
-     */
-    public int size() {
-        return infos().size();
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
-        writer.setBuffer(buf);
-
-        if (!super.writeTo(buf, writer))
-            return false;
-
-        if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(directType(), fieldsCount()))
-                return false;
-
-            writer.onHeaderWritten();
-        }
-
-        switch (writer.state()) {
-            case 3:
-                if (!writer.writeMap("infos", infos, MessageCollectionItemType.INT, MessageCollectionItemType.MSG))
-                    return false;
-
-                writer.incrementState();
-
-            case 4:
-                if (!writer.writeCollection("last", last, MessageCollectionItemType.INT))
-                    return false;
-
-                writer.incrementState();
-
-            case 5:
-                if (!writer.writeCollection("missed", missed, MessageCollectionItemType.INT))
-                    return false;
-
-                writer.incrementState();
-
-            case 6:
-                if (!writer.writeMessage("topVer", topVer))
-                    return false;
-
-                writer.incrementState();
-
-            case 7:
-                if (!writer.writeLong("updateSeq", updateSeq))
-                    return false;
-
-                writer.incrementState();
-
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!reader.beforeMessageRead())
-            return false;
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 3:
-                infos = reader.readMap("infos", MessageCollectionItemType.INT, MessageCollectionItemType.MSG, false);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 4:
-                last = reader.readCollection("last", MessageCollectionItemType.INT);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 5:
-                missed = reader.readCollection("missed", MessageCollectionItemType.INT);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 6:
-                topVer = reader.readMessage("topVer");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 7:
-                updateSeq = reader.readLong("updateSeq");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-        }
-
-        return reader.afterMessageRead(GridDhtPartitionSupplyMessageV2.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public short directType() {
-        return 114;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte fieldsCount() {
-        return 8;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridDhtPartitionSupplyMessageV2.class, this,
-            "size", size(),
-            "parts", infos().keySet(),
-            "super", super.toString());
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
index dc988bd..a5dcd8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPreloader.java
@@ -187,7 +187,6 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
         supplier = new GridDhtPartitionSupplier(cctx);
         demander = new GridDhtPartitionDemander(cctx);
 
-        supplier.start();
         demander.start();
 
         cctx.events().addListener(discoLsnr, EVT_NODE_JOINED, EVT_NODE_LEFT, EVT_NODE_FAILED);
@@ -380,7 +379,7 @@ public class GridDhtPreloader extends GridCachePreloaderAdapter {
     }
 
     /** {@inheritDoc} */
-    public void handleSupplyMessage(int idx, UUID id, final GridDhtPartitionSupplyMessageV2 s) {
+    public void handleSupplyMessage(int idx, UUID id, final GridDhtPartitionSupplyMessage s) {
         if (!enterBusy())
             return;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/main/resources/META-INF/classnames.properties
----------------------------------------------------------------------
diff --git a/modules/core/src/main/resources/META-INF/classnames.properties b/modules/core/src/main/resources/META-INF/classnames.properties
index 9cce826..8c5a72e 100644
--- a/modules/core/src/main/resources/META-INF/classnames.properties
+++ b/modules/core/src/main/resources/META-INF/classnames.properties
@@ -743,7 +743,6 @@ org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPar
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$1
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplier$SupplyContextPhase
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage
-org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsAbstractMessage
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$1
 org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture$2

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
index e482a93..5582fdd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java
@@ -65,7 +65,7 @@ import org.apache.ignite.internal.processors.cache.GridCacheContext;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysRequest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtForceKeysResponse;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsFullMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsSingleMessage;
@@ -2016,10 +2016,10 @@ public class CacheLateAffinityAssignmentTest extends GridCommonAbstractTest {
     private void blockSupplySend(TestRecordingCommunicationSpi spi, final String cacheName) {
         spi.blockMessages(new IgnitePredicate<GridIoMessage>() {
             @Override public boolean apply(GridIoMessage ioMsg) {
-                if (!ioMsg.message().getClass().equals(GridDhtPartitionSupplyMessageV2.class))
+                if (!ioMsg.message().getClass().equals(GridDhtPartitionSupplyMessage.class))
                     return false;
 
-                GridDhtPartitionSupplyMessageV2 msg = (GridDhtPartitionSupplyMessageV2)ioMsg.message();
+                GridDhtPartitionSupplyMessage msg = (GridDhtPartitionSupplyMessage)ioMsg.message();
 
                 return msg.cacheId() == CU.cacheId(cacheName);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
index 89fcf6b..29c2af6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/IgniteCacheReadFromBackupTest.java
@@ -38,7 +38,7 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.internal.TestRecordingCommunicationSpi;
 import org.apache.ignite.internal.managers.communication.GridIoMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
+import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearGetRequest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearSingleGetRequest;
 import org.apache.ignite.internal.util.typedef.internal.CU;
@@ -197,10 +197,10 @@ public class IgniteCacheReadFromBackupTest extends GridCommonAbstractTest {
 
                     spi.blockMessages(new IgnitePredicate<GridIoMessage>() {
                         @Override public boolean apply(GridIoMessage ioMsg) {
-                            if (!ioMsg.message().getClass().equals(GridDhtPartitionSupplyMessageV2.class))
+                            if (!ioMsg.message().getClass().equals(GridDhtPartitionSupplyMessage.class))
                                 return false;
 
-                            GridDhtPartitionSupplyMessageV2 msg = (GridDhtPartitionSupplyMessageV2)ioMsg.message();
+                            GridDhtPartitionSupplyMessage msg = (GridDhtPartitionSupplyMessage)ioMsg.message();
 
                             return msg.cacheId() == CU.cacheId(ccfg.getName());
                         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/aeacad6b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java
index eda030c..dfb3f65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/IgniteCacheAtomicProtocolTest.java
@@ -37,7 +37,6 @@ import org.apache.ignite.internal.TestRecordingCommunicationSpi;
 import org.apache.ignite.internal.managers.communication.GridIoMessage;
 import org.apache.ignite.internal.processors.cache.GridCacheMessage;
 import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessage;
-import org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionSupplyMessageV2;
 import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.internal.util.typedef.F;
 import org.apache.ignite.internal.util.typedef.G;
@@ -106,7 +105,7 @@ public class IgniteCacheAtomicProtocolTest extends GridCommonAbstractTest {
                 @Override public boolean apply(GridIoMessage msg) {
                     Object msg0 = msg.message();
 
-                    return (msg0 instanceof GridDhtPartitionSupplyMessage || msg0 instanceof GridDhtPartitionSupplyMessageV2)
+                    return (msg0 instanceof GridDhtPartitionSupplyMessage)
                         && ((GridCacheMessage)msg0).cacheId() == CU.cacheId(TEST_CACHE);
                 }
             });


[26/57] [abbrv] ignite git commit: Fix for C++

Posted by ag...@apache.org.
Fix for C++


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

Branch: refs/heads/ignite-3477-debug
Commit: 01b088fed55d3bcefad5d935f704d7d6f63e218d
Parents: be7296c
Author: Igor Sapego <is...@gridgain.com>
Authored: Mon Apr 10 21:06:53 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Mon Apr 10 21:06:53 2017 +0300

----------------------------------------------------------------------
 .../cpp/binary/include/ignite/impl/binary/binary_utils.h        | 1 -
 .../cpp/binary/include/ignite/impl/binary/binary_writer_impl.h  | 5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/01b088fe/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
index 268c2d8..3f2bc56 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_utils.h
@@ -28,7 +28,6 @@
 #include <ignite/time.h>
 
 #include <ignite/binary/binary_type.h>
-#include <ignite/impl/binary/binary_writer_impl.h>
 
 namespace ignite
 {

http://git-wip-us.apache.org/repos/asf/ignite/blob/01b088fe/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
index 5670193..52a3f64 100644
--- a/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
+++ b/modules/platforms/cpp/binary/include/ignite/impl/binary/binary_writer_impl.h
@@ -32,6 +32,7 @@
 #include "ignite/impl/binary/binary_utils.h"
 #include "ignite/impl/binary/binary_schema.h"
 #include "ignite/impl/binary/binary_type_manager.h"
+#include "ignite/impl/binary/binary_object_impl.h"
 #include "ignite/binary/binary_consts.h"
 #include "ignite/binary/binary_type.h"
 #include "ignite/guid.h"
@@ -718,9 +719,9 @@ namespace ignite
 
                         // We are using direct constructor here to avoid check-overhead, as we know
                         // at this point that underlying memory contains valid binary object.
-                        ignite::binary::BinaryObject binObj(*stream->GetMemory(), pos, &idRslvr, metaMgr);
+                        BinaryObjectImpl binObj(*stream->GetMemory(), pos, &idRslvr, metaMgr);
 
-                        int32_t hash = BinaryUtils::GetDataHashCode(binObj.impl.GetData(), binObj.impl.GetLength());
+                        int32_t hash = BinaryUtils::GetDataHashCode(binObj.GetData(), binObj.GetLength());
 
                         stream->WriteInt32(hashPos, hash);
                     }


[04/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
index 995c686..f2d1556 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
@@ -23,10 +23,6 @@ import org.apache.ignite.internal.binary.BinaryMarshaller;
 import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheMvccSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.CacheKeepBinaryWithInterceptorTest;
 import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest;
 import org.apache.ignite.internal.processors.cache.binary.GridBinaryCacheEntryMemorySizeSelfTest;
@@ -37,14 +33,8 @@ import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCa
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheMemoryModeBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredBinarySelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesNearPartitionedByteArrayValuesSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest;
-import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalOffheapExpiryPolicyTest;
 import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest;
 import org.apache.ignite.testframework.config.GridTestProperties;
 
@@ -65,13 +55,8 @@ public class IgniteBinaryCacheTestSuite extends TestSuite {
 
         // Tests below have a special version for Binary Marshaller
         ignoredTests.add(DataStreamProcessorSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredEvictionAtomicSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredEvictionSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredAtomicSelfTest.class);
         ignoredTests.add(GridCacheAffinityRoutingSelfTest.class);
         ignoredTests.add(IgniteCacheAtomicLocalExpiryPolicyTest.class);
-        ignoredTests.add(IgniteCacheAtomicLocalOffheapExpiryPolicyTest.class);
         ignoredTests.add(GridCacheEntryMemorySizeSelfTest.class);
 
         // Tests that are not ready to be used with BinaryMarshaller
@@ -81,13 +66,9 @@ public class IgniteBinaryCacheTestSuite extends TestSuite {
 
         // TODO GG-11148
         // suite.addTestSuite(GridCacheMemoryModeBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionBinarySelfTest.class);
 
         suite.addTestSuite(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class);
         suite.addTestSuite(GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredAtomicBinarySelfTest.class);
 
         suite.addTestSuite(GridDataStreamerImplSelfTest.class);
         suite.addTestSuite(DataStreamProcessorBinarySelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
index 7cc37e8..5cecfac 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
@@ -50,7 +50,6 @@ import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompac
 import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSimpleNameLowerCaseMappersSelfTest;
 import org.apache.ignite.internal.binary.streams.BinaryHeapStreamByteOrderSelfTest;
 import org.apache.ignite.internal.binary.streams.BinaryOffheapStreamByteOrderSelfTest;
-import org.apache.ignite.internal.processors.cache.BinaryObjectOffHeapUnswapTemporaryTest;
 import org.apache.ignite.internal.processors.cache.binary.BinaryMetadataUpdatesFlowTest;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryObjectMetadataExchangeMultinodeTest;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryObjectUserClassloaderSelfTest;
@@ -59,17 +58,12 @@ import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBi
 import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreObjectsSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
 import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicOffheapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.distributed.replicated.GridCacheBinaryObjectsReplicatedSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalOffheapTieredSelfTest;
 import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest;
 import org.apache.ignite.internal.processors.cache.portable.BinaryAtomicCacheLocalEntriesSelfTest;
@@ -130,13 +124,6 @@ public class IgniteBinaryObjectsTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class);
         suite.addTestSuite(GridCacheBinaryObjectsAtomicSelfTest.class);
         suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class);
-        suite.addTestSuite(BinaryObjectOffHeapUnswapTemporaryTest.class);
-
-        suite.addTestSuite(GridCacheBinaryObjectsLocalOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.class);
 
         suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class);
         suite.addTestSuite(GridCacheBinaryStoreBinariesDefaultMappersSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
index 980d550..84e7953 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheDataStructuresSelfTestSuite.java
@@ -24,10 +24,8 @@ import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDa
 import org.apache.ignite.internal.processors.cache.datastructures.IgniteClientDiscoveryDataStructuresTest;
 import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureUniqueNameTest;
 import org.apache.ignite.internal.processors.cache.datastructures.IgniteDataStructureWithJobTest;
-import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicOffheapSetSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicQueueApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalAtomicSetSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalOffheapQueueApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalQueueApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalSequenceApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.GridCacheLocalSetSelfTest;
@@ -35,9 +33,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLo
 import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalCountDownLatchSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalLockSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.local.IgniteLocalSemaphoreSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueApiSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest;
@@ -51,10 +46,6 @@ import org.apache.ignite.internal.processors.cache.datastructures.partitioned.Gr
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedAtomicStampedApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedDataStructuresFailoverSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedNodeRestartTxSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffHeapValuesQueueApiSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffHeapValuesSetSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffheapDataStructuresFailoverSelfTest;
-import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedOffheapSetFailoverSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueApiSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueCreateMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.datastructures.partitioned.GridCachePartitionedQueueEntryMoveSelfTest;
@@ -104,9 +95,7 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCacheLocalSequenceApiSelfTest.class));
         suite.addTest(new TestSuite(GridCacheLocalSetSelfTest.class));
         suite.addTest(new TestSuite(GridCacheLocalAtomicSetSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheLocalAtomicOffheapSetSelfTest.class));
         suite.addTest(new TestSuite(GridCacheLocalQueueApiSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheLocalOffheapQueueApiSelfTest.class));
         suite.addTest(new TestSuite(GridCacheLocalAtomicQueueApiSelfTest.class));
         suite.addTest(new TestSuite(IgniteLocalCountDownLatchSelfTest.class));
         suite.addTest(new TestSuite(IgniteLocalSemaphoreSelfTest.class));
@@ -127,18 +116,13 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCachePartitionedSequenceApiSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedSequenceMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedQueueApiSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedOffHeapValuesQueueApiSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueApiSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueApiSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedQueueMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueMultiNodeSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.class));
 
         suite.addTest(new TestSuite(GridCachePartitionedQueueCreateMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedSetSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedOffHeapValuesSetSelfTest.class));
         suite.addTest(new TestSuite(IgnitePartitionedSetNoBackupsSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicSetSelfTest.class));
         suite.addTest(new TestSuite(IgnitePartitionedCountDownLatchSelfTest.class));
@@ -150,7 +134,6 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
         // suite.addTest(new TestSuite(IgnitePartitionedLockSelfTest.class));
 
         suite.addTest(new TestSuite(GridCachePartitionedSetFailoverSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedOffheapSetFailoverSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedAtomicSetFailoverSelfTest.class));
 
         suite.addTest(new TestSuite(GridCachePartitionedQueueRotativeMultiNodeTest.class));
@@ -160,7 +143,6 @@ public class IgniteCacheDataStructuresSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCachePartitionedQueueEntryMoveSelfTest.class));
 
         suite.addTest(new TestSuite(GridCachePartitionedDataStructuresFailoverSelfTest.class));
-        suite.addTest(new TestSuite(GridCachePartitionedOffheapDataStructuresFailoverSelfTest.class));
         suite.addTest(new TestSuite(GridCacheQueueMultiNodeConsistencySelfTest.class));
 
         suite.addTest(new TestSuite(IgniteLocalAtomicLongApiSelfTest.class));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 1ad63ee..94e1447 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -18,21 +18,17 @@
 package org.apache.ignite.testsuites;
 
 import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.GridCacheMemoryModeSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCachePreloadingEvictionsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheBatchEvictUnswapSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheConcurrentEvictionConsistencySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheConcurrentEvictionsSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheDistributedEvictionsSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEmptyEntriesLocalSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEmptyEntriesPartitionedSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictableEntryEqualsSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionFilterSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionLockUnlockSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.GridCacheEvictionTouchSelfTest;
-import org.apache.ignite.internal.processors.cache.eviction.GridCacheSynchronousEvictionsFailoverSelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.fifo.FifoEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearEvictionPolicySelfTest;
@@ -61,14 +57,10 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCacheConcurrentEvictionsSelfTest.class));
         suite.addTest(new TestSuite(GridCacheConcurrentEvictionConsistencySelfTest.class));
         suite.addTest(new TestSuite(GridCacheEvictionTouchSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheDistributedEvictionsSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEvictionLockUnlockSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheBatchEvictUnswapSelfTest.class));
         suite.addTest(new TestSuite(GridCachePreloadingEvictionsSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEmptyEntriesPartitionedSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEmptyEntriesLocalSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheMemoryModeSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheSynchronousEvictionsFailoverSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEvictableEntryEqualsSelfTest.class));
 
         return suite;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
index b621ce5..896bb0e 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiMultiJvmSelfTestSuite.java
@@ -30,13 +30,11 @@ import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearE
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicOnheapMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheNearOnlyMultiJvmP2PDisabledFullApiSelfTest;
@@ -44,21 +42,18 @@ import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitioned
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledFairAffinityMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledMultiJvmP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCachePartitionedOnheapMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedAtomicMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedAtomicPrimaryWriteOrderMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedMultiJvmP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedNearOnlyMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.multijvm.GridCacheReplicatedOnheapMultiJvmFullApiSelfTest;
 
 /**
  * Multi-JVM test suite.
@@ -111,20 +106,12 @@ public class IgniteCacheFullApiMultiJvmSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheNearOnlyFairAffinityMultiJvmFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicClientOnlyFairAffinityMultiJvmFullApiSelfTest.class);
 
-        // Multi-node with off-heap values.
-        suite.addTestSuite(GridCacheReplicatedOffHeapMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapMultiJvmFullApiSelfTest.class);
-
-        // Multi-node with off-heap tiered mode.
-        suite.addTestSuite(GridCacheReplicatedOffHeapTieredMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapTieredMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapTieredMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiJvmFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicOnheapMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedOnheapMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCacheReplicatedOnheapMultiJvmFullApiSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapMultiJvmFullApiSelfTest.class);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
index 96a8a33..fa11f24 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheFullApiSelfTestSuite.java
@@ -22,20 +22,20 @@ import org.apache.ignite.internal.processors.cache.GridCacheClearSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicNearEnabledPrimaryWriteOrderFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicPrimaryWriteOrderReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedReloadAllSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedMultiNodeLongTxTimeoutFullApiTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.CachePartitionedNearEnabledMultiNodeLongTxTimeoutFullApiTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicClientOnlyFairAffinityMultiNodeFullApiSelfTest;
@@ -51,22 +51,18 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAto
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEnabledPrimaryWriteOrderMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderMultiNodeP2PDisabledFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearOnlyMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearReloadAllSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearTxMultiNodeSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedCopyOnReadDisabledMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedFilteredPutSelfTest;
@@ -77,10 +73,8 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapFullApiSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedOnheapMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedFairAffinityMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.CacheReplicatedRendezvousAffinityExcludeNeighborsMultiNodeFullApiSelfTest;
@@ -94,17 +88,9 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCa
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedNearOnlyMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicOffHeapTieredFullApiSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiMultithreadedSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalOffHeapFullApiSelfTest;
-import org.apache.ignite.internal.processors.cache.local.GridCacheLocalOffHeapTieredFullApiSelfTest;
 
 /**
  * Test suite for cache API.
@@ -129,30 +115,18 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheReplicatedAtomicFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicNearEnabledFullApiSelfTest.class);
         suite.addTestSuite(GridCacheAtomicNearEnabledPrimaryWriteOrderFullApiSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicOnheapFullApiSelfTest.class);;
+        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.class);;
+
+        suite.addTestSuite(GridCachePartitionedOnheapFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedAtomicOnheapFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledOnheapFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapFullApiSelfTest.class);
 
         // No primary.
         suite.addTestSuite(GridCachePartitionedClientOnlyNoPrimaryFullApiSelfTest.class);
         suite.addTestSuite(GridCachePartitionedNearOnlyNoPrimaryFullApiSelfTest.class);
 
-        // One node with off-heap values.
-        suite.addTestSuite(GridCacheLocalOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheLocalAtomicOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapFullApiSelfTest.class);
-
-        // One node with off-heap tiered mode.
-        suite.addTestSuite(GridCacheLocalOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheLocalAtomicOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredAtomicFullApiSelfTest.class);
-
         // Multi-node.
         suite.addTestSuite(GridCacheReplicatedMultiNodeFullApiSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedMultiNodeP2PDisabledFullApiSelfTest.class);
@@ -204,20 +178,12 @@ public class IgniteCacheFullApiSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheNearTxMultiNodeSelfTest.class);
         suite.addTestSuite(GridCachePartitionedMultiNodeCounterSelfTest.class);
 
-        // Multi-node with off-heap values.
-        suite.addTestSuite(GridCacheReplicatedOffHeapMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapMultiNodeFullApiSelfTest.class);
-
-        // Multi-node with off-heap tiered mode.
-        suite.addTestSuite(GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledOffHeapTieredMultiNodeFullApiSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOffHeapTieredMultiNodeFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedOnheapMultiNodeFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledOnheapMultiNodeFullApiSelfTest.class);
+        suite.addTestSuite(GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicOnheapMultiNodeFullApiSelfTest.class);;
+        suite.addTestSuite(GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.class);;
 
         // Old affinity assignment mode.
         suite.addTestSuite(GridCachePartitionedLateAffDisabledMultiNodeFullApiSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
index f3dd1c8..ebcf1df 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheMetricsSelfTestSuite.java
@@ -27,7 +27,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheAtomicReplicatedMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheReplicatedMetricsSelfTest;
-import org.apache.ignite.internal.processors.cache.local.LocalCacheOffHeapAndSwapMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMetricsNoStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalMetricsSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheAtomicLocalTckMetricsSelfTestImpl;
@@ -49,7 +48,6 @@ public class IgniteCacheMetricsSelfTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheReplicatedMetricsSelfTest.class);
         suite.addTestSuite(GridCachePartitionedMetricsSelfTest.class);
         suite.addTestSuite(GridCachePartitionedHitsAndMissesSelfTest.class);
-        suite.addTestSuite(LocalCacheOffHeapAndSwapMetricsSelfTest.class);
 
         // Atomic cache.
         suite.addTestSuite(GridCacheAtomicLocalMetricsSelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
index 8d668b9..5c1a879 100755
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite.java
@@ -19,8 +19,6 @@ package org.apache.ignite.testsuites;
 
 import java.util.Set;
 import junit.framework.TestSuite;
-import org.apache.ignite.GridCacheAffinityBackupsSelfTest;
-import org.apache.ignite.IgniteCacheAffinitySelfTest;
 import org.apache.ignite.cache.IgniteWarmupClosureSelfTest;
 import org.apache.ignite.cache.affinity.AffinityClientNodeSelfTest;
 import org.apache.ignite.cache.affinity.AffinityHistoryCleanupTest;
@@ -49,7 +47,6 @@ import org.apache.ignite.cache.store.jdbc.JdbcTypesDefaultTransformerTest;
 import org.apache.ignite.internal.processors.cache.CacheAffinityCallSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteQueueTest;
 import org.apache.ignite.internal.processors.cache.CacheDeferredDeleteSanitySelfTest;
-import org.apache.ignite.internal.processors.cache.CacheEntryProcessorCopySelfTest;
 import org.apache.ignite.internal.processors.cache.CacheFutureExceptionSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheNamesSelfTest;
 import org.apache.ignite.internal.processors.cache.CacheNamesWithSpecialCharactersTest;
@@ -76,20 +73,13 @@ import org.apache.ignite.internal.processors.cache.GridCacheNearTxStoreException
 import org.apache.ignite.internal.processors.cache.GridCacheObjectToStringSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheOffHeapAtomicMultiThreadedUpdateSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheOffHeapMultiThreadedUpdateSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheP2PUndeploySelfTest;
 import org.apache.ignite.internal.processors.cache.GridCachePartitionedLocalStoreSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCachePartitionedOffHeapLocalStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheReplicatedLocalStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheReplicatedTxStoreExceptionSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheStopSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheStorePutxSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheStoreValueBytesSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheSwapPreloadSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerEvictionSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheTtlManagerSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheTxPartitionedLocalStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicInvokeTest;
@@ -100,14 +90,10 @@ import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPrimaryWrite
 import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicPrimaryWriteOrderWithStoreInvokeTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheAtomicStopBusySelfTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicOffheapValuesTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicReplicatedTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerAtomicTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerEagerTtlDisabledTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxLocalTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxOffheapTieredTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxOffheapValuesTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxReplicatedTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryListenerTxTest;
 import org.apache.ignite.internal.processors.cache.IgniteCacheEntryProcessorCallTest;
@@ -185,13 +171,9 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheEntryListenerAtomicReplicatedTest.class);
         suite.addTestSuite(IgniteCacheEntryListenerAtomicLocalTest.class);
         suite.addTestSuite(IgniteCacheEntryListenerTxTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxOffheapTieredTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerTxOffheapValuesTest.class);
         suite.addTestSuite(IgniteCacheEntryListenerTxReplicatedTest.class);
         suite.addTestSuite(IgniteCacheEntryListenerTxLocalTest.class);
         suite.addTestSuite(IgniteCacheEntryListenerEagerTtlDisabledTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapTieredTest.class);
-        suite.addTestSuite(IgniteCacheEntryListenerAtomicOffheapValuesTest.class);
 
         suite.addTestSuite(IgniteClientAffinityAssignmentSelfTest.class);
 
@@ -276,8 +258,8 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(GridCacheAsyncOperationsLimitSelfTest.class);
         suite.addTestSuite(IgniteCacheManyAsyncOperationsTest.class);
         suite.addTestSuite(GridCacheTtlManagerSelfTest.class);
-        // TODO GG-11140.
-        // suite.addTestSuite(GridCacheTtlManagerEvictionSelfTest.class);
+        // TODO: ignite-4534
+//        suite.addTestSuite(GridCacheTtlManagerEvictionSelfTest.class);
         suite.addTestSuite(GridCacheLifecycleAwareSelfTest.class);
         suite.addTestSuite(IgniteCacheAtomicStopBusySelfTest.class);
         suite.addTestSuite(IgniteCacheTransactionalStopBusySelfTest.class);
@@ -302,14 +284,9 @@ public class IgniteCacheTestSuite extends TestSuite {
         suite.addTestSuite(IgniteCacheMessageRecoveryIdleConnectionTest.class);
         suite.addTestSuite(IgniteCacheConnectionRecoveryTest.class);
         suite.addTestSuite(IgniteCacheConnectionRecovery10ConnectionsTest.class);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionAtomicSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredEvictionSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredAtomicSelfTest.class, ignoredTests);
-        GridTestUtils.addTestIfNeeded(suite, GridCacheOffHeapTieredSelfTest.class, ignoredTests);
         suite.addTestSuite(GridCacheGlobalLoadTest.class);
         suite.addTestSuite(GridCachePartitionedLocalStoreSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedLocalStoreSelfTest.class);
-        suite.addTestSuite(GridCachePartitionedOffHeapLocalStoreSelfTest.class);
         suite.addTestSuite(GridCacheTxPartitionedLocalStoreSelfTest.class);
         suite.addTestSuite(IgniteCacheSystemTransactionsSelfTest.class);
         suite.addTestSuite(CacheDeferredDeleteSanitySelfTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
index a9df142..1c50908 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite2.java
@@ -50,7 +50,6 @@ import org.apache.ignite.internal.processors.cache.distributed.GridCachePartitio
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheTransformEventSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodeChangingTopologyTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheClientNodePartitionsExchangeTest;
-import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheNearOffheapGetSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.IgniteCacheServerNodeConcurrentStart;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedOptimisticTransactionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheColocatedPreloadRestartSelfTest;
@@ -63,7 +62,7 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtP
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadDelayedSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadDisabledSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadOffHeapSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadOnheapSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadPutGetSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheDhtPreloadStartStopSelfTest;
@@ -73,8 +72,10 @@ import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePart
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedTopologyChangeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridCachePartitionedUnloadEventsSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.dht.IgniteCachePartitionedBackupNodeFailureRecoveryTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAtomicNearReadersSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearJobExecutionSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearMultiGetSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheNearMultiNodeSelfTest;
@@ -108,7 +109,6 @@ import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePar
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedTxTimeoutSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheRendezvousAffinityClientSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearCacheStoreUpdateTest;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridNearOffheapCacheStoreUpdateTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridPartitionedBackupLoadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.NearCacheSyncUpdateTest;
 import org.apache.ignite.internal.processors.cache.distributed.near.NoneRebalanceModeSelfTest;
@@ -118,6 +118,7 @@ import org.apache.ignite.internal.processors.cache.local.GridCacheLocalAtomicGet
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalBasicApiSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalBasicStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalEventSelfTest;
+import org.apache.ignite.internal.processors.cache.local.GridCacheLocalEvictionEventSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalGetAndTransformStoreSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalIsolatedNodesSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheLocalLoadAllSelfTest;
@@ -151,8 +152,7 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTestSuite(GridCacheLocalTxSingleThreadedSelfTest.class);
         suite.addTestSuite(GridCacheLocalTxTimeoutSelfTest.class);
         suite.addTestSuite(GridCacheLocalEventSelfTest.class);
-        // TODO TODO GG-11140.
-        // suite.addTestSuite(GridCacheLocalEvictionEventSelfTest.class);
+        suite.addTestSuite(GridCacheLocalEvictionEventSelfTest.class);
         suite.addTestSuite(GridCacheVariableTopologySelfTest.class);
         suite.addTestSuite(GridCacheLocalTxMultiThreadedSelfTest.class);
         suite.addTestSuite(GridCacheTransformEventSelfTest.class);
@@ -199,7 +199,7 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCachePartitionedTxMultiThreadedSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedNearDisabledTxMultiThreadedSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadSelfTest.class));
-        suite.addTest(new TestSuite(GridCacheDhtPreloadOffHeapSelfTest.class));
+        suite.addTest(new TestSuite(GridCacheDhtPreloadOnheapSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadBigDataSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadPutGetSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtPreloadDisabledSelfTest.class));
@@ -219,13 +219,9 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCachePartitionedLoadCacheSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionNotLoadedEventSelfTest.class));
         suite.addTest(new TestSuite(GridCacheDhtEvictionsDisabledSelfTest.class));
-        // TODO GG-11140.
-        // suite.addTest(new TestSuite(GridCacheNearEvictionEventSelfTest.class));
-        // suite.addTest(new TestSuite(GridCacheAtomicNearEvictionEventSelfTest.class));
-        // suite.addTest(new TestSuite(GridCacheDhtEvictionSelfTest.class));
-        // suite.addTest(new TestSuite(GridCacheReplicatedEvictionSelfTest.class));
-        // suite.addTest(new TestSuite(GridCacheDhtEvictionNearReadersSelfTest.class));
-        // suite.addTest(new TestSuite(GridCacheDhtAtomicEvictionNearReadersSelfTest.class));
+        suite.addTest(new TestSuite(GridCacheNearEvictionEventSelfTest.class));
+        suite.addTest(new TestSuite(GridCacheAtomicNearEvictionEventSelfTest.class));
+
         suite.addTest(new TestSuite(GridCachePartitionedTopologyChangeSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedPreloadEventsSelfTest.class));
         suite.addTest(new TestSuite(GridCachePartitionedUnloadEventsSelfTest.class));
@@ -233,7 +229,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(GridCacheColocatedOptimisticTransactionSelfTest.class));
         suite.addTestSuite(GridCacheAtomicMessageCountSelfTest.class);
         suite.addTest(new TestSuite(GridCacheNearPartitionedClearSelfTest.class));
-        suite.addTest(new TestSuite(IgniteCacheNearOffheapGetSelfTest.class));
 
         suite.addTest(new TestSuite(GridCacheOffheapUpdateSelfTest.class));
 
@@ -266,7 +261,6 @@ public class IgniteCacheTestSuite2 extends TestSuite {
         suite.addTest(new TestSuite(CacheConcurrentReadThroughTest.class));
 
         suite.addTest(new TestSuite(GridNearCacheStoreUpdateTest.class));
-        suite.addTest(new TestSuite(GridNearOffheapCacheStoreUpdateTest.class));
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
index 4b5e2f6..caa18d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite3.java
@@ -21,9 +21,6 @@ import junit.framework.TestSuite;
 import org.apache.ignite.internal.processors.cache.CacheStartupInDeploymentModesTest;
 import org.apache.ignite.internal.processors.cache.GridCacheAtomicEntryProcessorDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheConditionalDeploymentSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentOffHeapValuesSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheDeploymentSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryVersionSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheOrderedPreloadingSelfTest;
 import org.apache.ignite.internal.processors.cache.GridCacheReferenceCleanupSelfTest;
@@ -80,7 +77,6 @@ import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCa
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridCacheSyncReplicatedPreloadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.GridReplicatedTxPreloadTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadLifecycleSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadOffHeapSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadSelfTest;
 import org.apache.ignite.internal.processors.cache.distributed.replicated.preloader.GridCacheReplicatedPreloadStartStopEventsSelfTest;
 import org.apache.ignite.internal.processors.cache.local.GridCacheDaemonNodeLocalSelfTest;
@@ -122,7 +118,6 @@ public class IgniteCacheTestSuite3 extends TestSuite {
         suite.addTestSuite(GridCacheReplicatedTxSingleThreadedSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedTxTimeoutSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedPreloadSelfTest.class);
-        suite.addTestSuite(GridCacheReplicatedPreloadOffHeapSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedPreloadLifecycleSelfTest.class);
         suite.addTestSuite(GridCacheSyncReplicatedPreloadSelfTest.class);
 
@@ -138,8 +133,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
 
         suite.addTestSuite(GridCachePutArrayValueSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedUnswapAdvancedSelfTest.class);
-        // TODO TODO GG-11140.
-        // suite.addTestSuite(GridCacheReplicatedEvictionEventSelfTest.class);
+        suite.addTestSuite(GridCacheReplicatedEvictionEventSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedTxMultiThreadedSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedPreloadEventsSelfTest.class);
         suite.addTestSuite(GridCacheReplicatedPreloadStartStopEventsSelfTest.class);
@@ -184,8 +178,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
 
         // Memory leak tests.
         suite.addTestSuite(GridCacheReferenceCleanupSelfTest.class);
-        // TODO GG-11140.
-        // suite.addTestSuite(GridCacheReloadSelfTest.class);
+        suite.addTestSuite(GridCacheReloadSelfTest.class);
 
         suite.addTestSuite(GridCacheMixedModeSelfTest.class);
 
@@ -196,8 +189,7 @@ public class IgniteCacheTestSuite3 extends TestSuite {
         suite.addTest(IgniteTopologyValidatorTestSuit.suite());
 
         // Eviction.
-        // TODO GG-11140.
-        // suite.addTest(IgniteCacheEvictionSelfTestSuite.suite());
+        suite.addTest(IgniteCacheEvictionSelfTestSuite.suite());
 
         // Iterators.
         suite.addTest(IgniteCacheIteratorsSelfTestSuite.suite());

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
index 3abbdab..bd26f03 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite4.java
@@ -41,7 +41,6 @@ import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynam
 import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeDynamicStartTxTest;
 import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartAtomicTest;
 import org.apache.ignite.internal.processors.cache.CacheStoreUsageMultinodeStaticStartTxTest;
-import org.apache.ignite.internal.processors.cache.CacheSwapUnswapGetTest;
 import org.apache.ignite.internal.processors.cache.CacheTxNotAllowReadFromBackupTest;
 import org.apache.ignite.internal.processors.cache.CrossCacheLockTest;
 import org.apache.ignite.internal.processors.cache.GridCacheMarshallingNodeJoinSelfTest;
@@ -131,13 +130,9 @@ import org.apache.ignite.internal.processors.cache.integration.IgniteCacheTxStor
 import org.apache.ignite.internal.processors.cache.integration.IgniteCacheTxStoreSessionWriteBehindTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalAtomicSwapDisabledSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryLocalTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicOffHeapSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryPartitionedTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicOffHeapSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest;
 import org.apache.ignite.internal.processors.cache.version.CacheVersionedEntryReplicatedTransactionalSelfTest;
 
 /**
@@ -290,12 +285,8 @@ public class IgniteCacheTestSuite4 extends TestSuite {
         suite.addTestSuite(CacheVersionedEntryLocalTransactionalSelfTest.class);
         suite.addTestSuite(CacheVersionedEntryPartitionedAtomicSelfTest.class);
         suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryPartitionedAtomicOffHeapSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryPartitionedTransactionalOffHeapSelfTest.class);
         suite.addTestSuite(CacheVersionedEntryReplicatedAtomicSelfTest.class);
         suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryReplicatedAtomicOffHeapSelfTest.class);
-        suite.addTestSuite(CacheVersionedEntryReplicatedTransactionalOffHeapSelfTest.class);
 
         // TODO GG-11148.
         // suite.addTestSuite(CacheSwapUnswapGetTest.class);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
index 76ed440..7efc7de 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteIgfsTestSuite.java
@@ -21,8 +21,6 @@ import junit.framework.TestSuite;
 import org.apache.ignite.igfs.IgfsFragmentizerSelfTest;
 import org.apache.ignite.igfs.IgfsFragmentizerTopologySelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimaryOffheapValuesSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsAtomicPrimarySelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsAttributesSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsBackupsDualAsyncSelfTest;
@@ -48,8 +46,6 @@ import org.apache.ignite.internal.processors.igfs.IgfsModeResolverSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsModesSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsPrimaryMultiNodeSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsOneClientNodeTest;
-import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOffheapValuesSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsPrimaryOptimziedMarshallerSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsPrimaryRelaxedConsistencyClientSelfTest;
 import org.apache.ignite.internal.processors.igfs.IgfsPrimaryRelaxedConsistencyMultiNodeSelfTest;
@@ -95,9 +91,6 @@ public class IgniteIgfsTestSuite extends TestSuite {
 
         suite.addTest(new TestSuite(IgfsPrimaryOptimziedMarshallerSelfTest.class));
 
-        suite.addTest(new TestSuite(IgfsPrimaryOffheapTieredSelfTest.class));
-        suite.addTest(new TestSuite(IgfsPrimaryOffheapValuesSelfTest.class));
-
         suite.addTest(new TestSuite(IgfsDualSyncSelfTest.class));
         suite.addTest(new TestSuite(IgfsDualAsyncSelfTest.class));
 
@@ -165,8 +158,6 @@ public class IgniteIgfsTestSuite extends TestSuite {
 
         suite.addTestSuite(IgfsAtomicPrimarySelfTest.class);
         suite.addTestSuite(IgfsAtomicPrimaryMultiNodeSelfTest.class);
-        suite.addTestSuite(IgfsAtomicPrimaryOffheapTieredSelfTest.class);
-        suite.addTestSuite(IgfsAtomicPrimaryOffheapValuesSelfTest.class);
 
         suite.addTestSuite(IgfsSecondaryFileSystemInjectionSelfTest.class);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
index 12e1257..4928e3d 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/HadoopAbstractMapReduceTest.java
@@ -376,7 +376,6 @@ public class HadoopAbstractMapReduceTest extends HadoopAbstractWordCountTest {
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
         dataCacheCfg.setBackups(0);
         dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
-        dataCacheCfg.setOffHeapMaxMemory(0);
 
         CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
index 2e3a2a3..6b5690c 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
@@ -235,7 +235,6 @@ public class HadoopFIleSystemFactorySelfTest extends IgfsCommonAbstractTest {
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
         dataCacheCfg.setBackups(0);
         dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
-        dataCacheCfg.setOffHeapMaxMemory(0);
 
         CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
index ad6a9f4..3ffdf23 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsDualAbstractSelfTest.java
@@ -169,7 +169,6 @@ public abstract class HadoopIgfsDualAbstractSelfTest extends IgfsCommonAbstractT
         dataCacheCfg.setAffinityMapper(new IgfsGroupDataBlocksKeyMapper(2));
         dataCacheCfg.setBackups(0);
         dataCacheCfg.setAtomicityMode(TRANSACTIONAL);
-        dataCacheCfg.setOffHeapMaxMemory(0);
 
         CacheConfiguration metaCacheCfg = defaultCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
index 7477341..d5065e1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexStreamerTest.java
@@ -36,7 +36,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
 /**
@@ -139,8 +138,6 @@ public class CacheIndexStreamerTest extends GridCommonAbstractTest {
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setOffHeapMaxMemory(0);
         ccfg.setBackups(1);
         ccfg.setIndexedTypes(Integer.class, String.class);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
deleted file mode 100644
index 70c0d49..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheIndexingOffheapCleanupTest.java
+++ /dev/null
@@ -1,157 +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.apache.ignite.internal.processors.cache;
-
-import java.util.Map;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.cache.query.annotations.QueryTextField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.internal.IgniteKernal;
-import org.apache.ignite.internal.util.offheap.unsafe.GridUnsafeMemory;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheIndexingOffheapCleanupTest extends GridCommonAbstractTest {
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        startGrid(0);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-
-        super.afterTest();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testCacheDestroy() throws Exception {
-        Ignite ignite = ignite(0);
-
-        for (int i = 0; i < 5; i++) {
-            log.info("Iteration: " + i);
-
-            IgniteCache cache = ignite.createCache(cacheConfiguration());
-
-            for (int k = 0; k < 100; k++)
-                cache.put(k, new TestType());
-
-            GridUnsafeMemory mem = schemaMemory(ignite, cache.getName());
-
-            assertTrue(mem.allocatedSize() > 0);
-
-            ignite.destroyCache(cache.getName());
-
-            assertEquals(0, mem.allocatedSize());
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStopNode() throws Exception {
-        Ignite ignite = ignite(0);
-
-        IgniteCache cache = ignite.createCache(cacheConfiguration());
-
-        for (int k = 0; k < 100; k++)
-            cache.put(k, new TestType());
-
-        GridUnsafeMemory mem = schemaMemory(ignite, cache.getName());
-
-        assertTrue(mem.allocatedSize() > 0);
-
-        stopGrid(0);
-
-        assertEquals(0, mem.allocatedSize());
-    }
-
-    /**
-     * @param ignite Node.
-     * @param cacheName Cache name.
-     * @return Memory.
-     */
-    private GridUnsafeMemory schemaMemory(Ignite ignite, String cacheName) {
-        Map<String, Object> schemas = GridTestUtils.getFieldValue(((IgniteKernal)ignite).context().query(),
-            "idx",
-            "schemas");
-
-        assertNotNull(schemas);
-
-        Object schema = schemas.get("\"" + cacheName + "\"");
-
-        assertNotNull(schema);
-
-        GridUnsafeMemory mem = GridTestUtils.getFieldValue(schema, "offheap");
-
-        assertNotNull(mem);
-
-        return mem;
-    }
-
-    /**
-     * @return Cache configuration.
-     */
-    private CacheConfiguration cacheConfiguration() {
-        CacheConfiguration ccfg = new CacheConfiguration();
-
-        ccfg.setName("cache");
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setIndexedTypes(Integer.class, TestType.class);
-
-        return ccfg;
-    }
-
-    /**
-     *
-     */
-    static class TestType {
-        /** */
-        @QuerySqlField(index = true)
-        private int v1;
-
-        /** */
-        @QuerySqlField(index = true)
-        private String v2;
-
-        /** */
-        @QueryTextField
-        private String v3;
-
-        /**
-         *
-         */
-        public TestType() {
-            int v = ThreadLocalRandom.current().nextInt();
-
-            v1 = v;
-            v2 = String.valueOf(v);
-            v3 = v2;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
index 1012f34..41b6c83 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingBaseTest.java
@@ -31,7 +31,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
 /**
@@ -87,17 +86,14 @@ public abstract class CacheOffheapBatchIndexingBaseTest extends GridCommonAbstra
     }
 
     /**
-     * @param onHeapRowCacheSize on heap row cache size.
      * @param indexedTypes indexed types for cache.
      * @return Cache configuration.
      */
-    protected CacheConfiguration<Object, Object> cacheConfiguration(int onHeapRowCacheSize, Class<?>[] indexedTypes) {
+    protected CacheConfiguration<Object, Object> cacheConfiguration(Class<?>[] indexedTypes) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(ATOMIC);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setSqlOnheapRowCacheSize(onHeapRowCacheSize);
         ccfg.setIndexedTypes(indexedTypes);
 
         return ccfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
index 602fc1c..87d10a1 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingMultiTypeTest.java
@@ -35,18 +35,6 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
         doStreamerBatchTest(50, 1_000, new Class<?>[] {
             Integer.class, CacheOffheapBatchIndexingBaseTest.Person.class,
             Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            1,
-            true);
-    }
-
-    /**
-     * Tests putAll with multiple indexed entities and streamer preloading with default off-heap cache size.
-     */
-    public void testPutAllMultupleEntitiesAndStreamerDfltOffHeapRowCacheSize() {
-        doStreamerBatchTest(50, 1_000, new Class<?>[] {
-            Integer.class, CacheOffheapBatchIndexingBaseTest.Person.class,
-            Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            CacheConfiguration.DFLT_SQL_ONHEAP_ROW_CACHE_SIZE,
             true);
     }
 
@@ -57,7 +45,6 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
         doStreamerBatchTest(50,
             1_000,
             new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            1,
             false);
     }
 
@@ -65,18 +52,16 @@ public class CacheOffheapBatchIndexingMultiTypeTest extends CacheOffheapBatchInd
      * @param iterations Number of iterations.
      * @param entitiesCnt Number of entities to put.
      * @param entityClasses Entity classes.
-     * @param onHeapRowCacheSize Cache size.
      * @param preloadInStreamer Data preload flag.
      */
     private void doStreamerBatchTest(int iterations,
         int entitiesCnt,
         Class<?>[] entityClasses,
-        int onHeapRowCacheSize,
         boolean preloadInStreamer) {
         Ignite ignite = grid(0);
 
         final IgniteCache<Object, Object> cache =
-            ignite.createCache(cacheConfiguration(onHeapRowCacheSize, entityClasses));
+            ignite.createCache(cacheConfiguration(entityClasses));
 
         try {
             if (preloadInStreamer)


[12/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
index 3b9f864..18570a6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheExpireAndUpdateConsistencyTest.java
@@ -33,7 +33,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteTransactions;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -53,8 +52,6 @@ import org.apache.ignite.transactions.Transaction;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -108,56 +105,42 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac
      * @throws Exception If failed.
      */
     public void testAtomic1() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0));
+        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 0));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAtomic2() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 1));
+        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 1));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAtomic3() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 2));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheap() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1));
+        updateAndEventConsistencyTest(cacheConfiguration(ATOMIC, 2));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testTx1() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 0));
+        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 0));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testTx2() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 1));
+        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 1));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testTx3() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, ONHEAP_TIERED, 2));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheap() throws Exception {
-        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1));
+        updateAndEventConsistencyTest(cacheConfiguration(TRANSACTIONAL, 2));
     }
 
     /**
@@ -347,18 +330,14 @@ public class IgniteCacheExpireAndUpdateConsistencyTest extends GridCommonAbstrac
 
     /**
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param backups Number of backups.
      * @return Cache configuration.
      */
-    private CacheConfiguration<TestKey, TestValue> cacheConfiguration(CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
-        int backups) {
+    private CacheConfiguration<TestKey, TestValue> cacheConfiguration(CacheAtomicityMode atomicityMode, int backups) {
         CacheConfiguration<TestKey, TestValue> ccfg = new CacheConfiguration<>();
 
         ccfg.setCacheMode(PARTITIONED);
         ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setBackups(backups);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
index 695d8b8..0549df7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInterceptorSelfTestSuite.java
@@ -62,8 +62,6 @@ public class IgniteCacheInterceptorSelfTestSuite extends TestSuite {
 
         suite.addTestSuite(GridCacheInterceptorAtomicRebalanceTest.class);
         suite.addTestSuite(GridCacheInterceptorTransactionalRebalanceTest.class);
-        suite.addTestSuite(GridCacheInterceptorAtomicOffheapRebalanceTest.class);
-        suite.addTestSuite(GridCacheInterceptorTransactionalOffheapRebalanceTest.class);
 
         return suite;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
index f37fb54..8d2db44 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughAbstractTest.java
@@ -28,7 +28,6 @@ import javax.cache.processor.MutableEntry;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cache.store.CacheStore;
@@ -322,7 +321,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo
     /**
      * @param cacheMode Cache mode.
      * @param atomicityMode Atomicity mode.
-     * @param memoryMode Memory mode.
      * @param backups Number of backups.
      * @param nearCache Near cache flag.
      * @return Cache configuration.
@@ -330,7 +328,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo
     @SuppressWarnings("unchecked")
     protected CacheConfiguration cacheConfiguration(CacheMode cacheMode,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         int backups,
         boolean nearCache) {
         CacheConfiguration ccfg = new CacheConfiguration();
@@ -343,7 +340,6 @@ public abstract class IgniteCacheInvokeReadThroughAbstractTest extends GridCommo
         ccfg.setCacheMode(cacheMode);
         ccfg.setAffinity(new RendezvousAffinityFunction(false, 32));
         ccfg.setAtomicWriteOrderMode(PRIMARY);
-        ccfg.setMemoryMode(memoryMode);
 
         if (nearCache)
             ccfg.setNearConfiguration(new NearCacheConfiguration());

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
index b451abf..406e5af 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughSingleNodeTest.java
@@ -19,8 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -38,69 +36,55 @@ public class IgniteCacheInvokeReadThroughSingleNodeTest extends IgniteCacheInvok
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomic() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomic_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 1, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomicNearCache() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, true));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomicReplicated() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomicLocal() throws Exception {
-        invokeReadThrough(cacheConfiguration(LOCAL, ATOMIC, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(LOCAL, ATOMIC, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTx() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTx_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 1, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTxNearCache() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, true));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTxReplicated() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTxLocal() throws Exception {
-        invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(LOCAL, TRANSACTIONAL, 0, false));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
index 9578227..8fd3758 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeReadThroughTest.java
@@ -19,8 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
@@ -41,139 +39,69 @@ public class IgniteCacheInvokeReadThroughTest extends IgniteCacheInvokeReadThrou
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomic0() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomic1() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomic2() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 2, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 2, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomicNearCache() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, ONHEAP_TIERED, 1, true));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, 1, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughAtomicReplicated() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, ONHEAP_TIERED, 0, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomic0_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 0, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomic1_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 1, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomic2_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 2, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomicNearCache_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, ATOMIC, OFFHEAP_TIERED, 1, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughAtomicReplicated_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, OFFHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(REPLICATED, ATOMIC, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTx0() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 0, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTx1() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTx2() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 2, false));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 2, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTxNearCache() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, ONHEAP_TIERED, 1, true));
+        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, 1, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeReadThroughTxReplicated() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, ONHEAP_TIERED, 0, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTx0_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTx1_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 1, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTx2_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 2, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTxNearCache_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(PARTITIONED, TRANSACTIONAL, OFFHEAP_TIERED, 1, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeReadThroughTxReplicated_Offheap() throws Exception {
-        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
+        invokeReadThrough(cacheConfiguration(REPLICATED, TRANSACTIONAL, 0, false));
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
index 007515b..3c50043 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheLoadRebalanceEvictionSelfTest.java
@@ -75,12 +75,11 @@ public class IgniteCacheLoadRebalanceEvictionSelfTest extends GridCommonAbstract
 
         CacheConfiguration<String, byte[]> cacheCfg = new CacheConfiguration<>();
         cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        cacheCfg.setEvictSynchronized(false);
         cacheCfg.setCacheMode(CacheMode.PARTITIONED);
         cacheCfg.setBackups(1);
         cacheCfg.setReadFromBackup(true);
         cacheCfg.setEvictionPolicy(evictionPolicy);
-        cacheCfg.setOffHeapMaxMemory(1024 * 1024 * 1024L);
+        cacheCfg.setOnheapCacheEnabled(true);
         cacheCfg.setStatisticsEnabled(true);
 
         cacheCfg.setWriteThrough(false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
index e020ae4..a4a831f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
@@ -35,10 +35,8 @@ public class IgniteCacheP2pUnmarshallingNearErrorTest extends IgniteCacheP2pUnma
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
         if (cfg.isClientMode() == null || !cfg.isClientMode()) {
-            cfg.getCacheConfiguration()[0].setEvictMaxOverflowRatio(0);
-            cfg.getCacheConfiguration()[0].setEvictSynchronized(true);
-            cfg.getCacheConfiguration()[0].setEvictSynchronizedKeyBufferSize(1);
             cfg.getCacheConfiguration()[0].setEvictionPolicy(new FifoEvictionPolicy(1));
+            cfg.getCacheConfiguration()[0].setOnheapCacheEnabled(true);
         }
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
index e55f676..8681be2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCachePeekModesAbstractTest.java
@@ -29,7 +29,6 @@ import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -53,7 +52,6 @@ import static org.apache.ignite.cache.CachePeekMode.NEAR;
 import static org.apache.ignite.cache.CachePeekMode.OFFHEAP;
 import static org.apache.ignite.cache.CachePeekMode.ONHEAP;
 import static org.apache.ignite.cache.CachePeekMode.PRIMARY;
-import static org.apache.ignite.cache.CachePeekMode.SWAP;
 
 /**
  * Tests for methods using {@link CachePeekMode}:
@@ -91,10 +89,6 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
     @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
         CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
 
-        ccfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
-
-        ccfg.setOffHeapMaxMemory(512);
-
         ccfg.setBackups(1);
 
         if (hasNearCache())
@@ -104,15 +98,11 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
         plc.setMaxSize(HEAP_ENTRIES);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
         return ccfg;
     }
 
-    /** {@inheritDoc} */
-    @Override protected boolean swapEnabled() {
-        return true;
-    }
-
     /**
      * @throws Exception If failed.
      */
@@ -315,20 +305,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             assertEquals(100, swapKeys.size() + offheapKeys.size() + heapKeys.size());
 
             for (Integer key : swapKeys) {
-                assertEquals(val, cache0.localPeek(key, SWAP));
-                assertEquals(val, cache0.localPeek(key, PRIMARY, SWAP));
-                assertEquals(val, cache0.localPeek(key, ONHEAP, SWAP));
-                assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP, SWAP));
-                assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, SWAP));
-                assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, OFFHEAP, SWAP));
+                assertEquals(val, cache0.localPeek(key));
+                assertEquals(val, cache0.localPeek(key, PRIMARY));
+                assertEquals(val, cache0.localPeek(key, ONHEAP));
+                assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
+                assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP));
+                assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP, OFFHEAP));
 
                 if (cacheMode() == LOCAL) {
-                    assertEquals(val, cache0.localPeek(key, SWAP, BACKUP));
-                    assertEquals(val, cache0.localPeek(key, SWAP, NEAR));
+                    assertEquals(val, cache0.localPeek(key, BACKUP));
+                    assertEquals(val, cache0.localPeek(key, NEAR));
                 }
                 else {
-                    assertNull(cache0.localPeek(key, SWAP, BACKUP));
-                    assertNull(cache0.localPeek(key, SWAP, NEAR));
+                    assertNull(cache0.localPeek(key, BACKUP));
+                    assertNull(cache0.localPeek(key, NEAR));
                 }
 
                 assertNull(cache0.localPeek(key, ONHEAP));
@@ -338,7 +328,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             for (Integer key : offheapKeys) {
                 assertEquals(val, cache0.localPeek(key, OFFHEAP));
                 assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
-                assertEquals(val, cache0.localPeek(key, ONHEAP, SWAP, OFFHEAP));
+                assertEquals(val, cache0.localPeek(key, ONHEAP, OFFHEAP));
                 assertEquals(val, cache0.localPeek(key, PRIMARY, OFFHEAP));
 
                 if (cacheMode() == LOCAL) {
@@ -351,13 +341,13 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 }
 
                 assertNull(cache0.localPeek(key, ONHEAP));
-                assertNull(cache0.localPeek(key, SWAP));
+                assertNull(cache0.localPeek(key));
             }
 
             for (Integer key : heapKeys) {
                 assertEquals(val, cache0.localPeek(key, ONHEAP));
-                assertEquals(val, cache0.localPeek(key, SWAP, ONHEAP));
-                assertEquals(val, cache0.localPeek(key, SWAP, OFFHEAP, ONHEAP));
+                assertEquals(val, cache0.localPeek(key, ONHEAP));
+                assertEquals(val, cache0.localPeek(key, OFFHEAP, ONHEAP));
                 assertEquals(val, cache0.localPeek(key, PRIMARY, ONHEAP));
 
                 if (cacheMode() == LOCAL) {
@@ -369,7 +359,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                     assertNull(cache0.localPeek(key, ONHEAP, NEAR));
                 }
 
-                assertNull(cache0.localPeek(key, SWAP));
+                assertNull(cache0.localPeek(key));
                 assertNull(cache0.localPeek(key, OFFHEAP));
             }
         }
@@ -582,19 +572,19 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             assertEquals(totalKeys, cache0.localSizeLong(part, ALL));
 
             assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP));
-            assertEquals(totalSwap, cache0.localSizeLong(part, SWAP));
+            assertEquals(totalSwap, cache0.localSizeLong(part));
             assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP));
 
             assertEquals(totalOffheap, cache0.sizeLong(part, OFFHEAP));
-            assertEquals(totalSwap, cache0.sizeLong(part, SWAP));
+            assertEquals(totalSwap, cache0.sizeLong(part));
             assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.sizeLong(part, ONHEAP));
 
             assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP, PRIMARY));
-            assertEquals(totalSwap, cache0.localSizeLong(part, SWAP, PRIMARY));
+            assertEquals(totalSwap, cache0.localSizeLong(part, PRIMARY));
             assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP, PRIMARY));
 
             assertEquals(totalOffheap, cache0.localSizeLong(part, OFFHEAP, BACKUP));
-            assertEquals(totalSwap, cache0.localSizeLong(part, SWAP, BACKUP));
+            assertEquals(totalSwap, cache0.localSizeLong(part, BACKUP));
             assertEquals(totalKeys - (totalSwap + totalOffheap), cache0.localSizeLong(part, ONHEAP, BACKUP));
         }
         finally {
@@ -918,9 +908,6 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             assertEquals(0, cache.size());
 
             for (CachePeekMode peekMode : CachePeekMode.values()) {
-                if (peekMode == SWAP)
-                    continue;
-
                 assertEquals(0, cache.localSize(peekMode));
 
                 assertEquals(0, cache.size(peekMode));
@@ -1093,20 +1080,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
             assertEquals(primaryKeys.size(), cache0.localSize());
             assertEquals(totalKeys, cache0.localSize(ALL));
             assertEquals(totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
-            assertEquals(totalSwap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP));
+            assertEquals(totalSwap, cache0.localSize(PRIMARY, BACKUP, NEAR));
             assertEquals(totalKeys - (totalOffheap + totalSwap), cache0.localSize(PRIMARY, BACKUP, NEAR, ONHEAP));
-            assertEquals(totalKeys, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP, ONHEAP));
+            assertEquals(totalKeys, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP, ONHEAP));
 
-            assertEquals(swapKeys.get1(), (Integer)cache0.localSize(SWAP, PRIMARY));
-            assertEquals(swapKeys.get2(), (Integer)cache0.localSize(SWAP, BACKUP));
+            assertEquals(swapKeys.get1(), (Integer)cache0.localSize(PRIMARY));
+            assertEquals(swapKeys.get2(), (Integer)cache0.localSize(BACKUP));
 
             assertEquals(offheapKeys.get1(), (Integer)cache0.localSize(OFFHEAP, PRIMARY));
             assertEquals(offheapKeys.get2(), (Integer)cache0.localSize(OFFHEAP, BACKUP));
 
-            assertEquals(swapKeys.get1() + offheapKeys.get1(), cache0.localSize(SWAP, OFFHEAP, PRIMARY));
-            assertEquals(swapKeys.get2() + offheapKeys.get2(), cache0.localSize(SWAP, OFFHEAP, BACKUP));
+            assertEquals(swapKeys.get1() + offheapKeys.get1(), cache0.localSize(OFFHEAP, PRIMARY));
+            assertEquals(swapKeys.get2() + offheapKeys.get2(), cache0.localSize(OFFHEAP, BACKUP));
 
-            assertEquals(totalSwap + totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
+            assertEquals(totalSwap + totalOffheap, cache0.localSize(PRIMARY, BACKUP, NEAR, OFFHEAP));
 
             int globalSwapPrimary = 0;
             int globalSwapBackup = 0;
@@ -1148,20 +1135,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
                 assertEquals(totalKeys, cache.size(PRIMARY));
                 assertEquals(globalTotal, cache.size(ALL));
-                assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP, SWAP));
-                assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP, PRIMARY, BACKUP));
+                assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP));
+                assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, PRIMARY, BACKUP));
 
-                assertEquals(globalTotalSwap, cache.size(PRIMARY, BACKUP, NEAR, SWAP));
-                assertEquals(globalSwapPrimary, cache.size(SWAP, PRIMARY));
-                assertEquals(globalSwapBackup, cache.size(SWAP, BACKUP));
+                assertEquals(globalTotalSwap, cache.size(PRIMARY, BACKUP, NEAR));
+                assertEquals(globalSwapPrimary, cache.size(PRIMARY));
+                assertEquals(globalSwapBackup, cache.size(BACKUP));
 
                 assertEquals(globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, OFFHEAP));
                 assertEquals(globalOffheapPrimary, cache.size(OFFHEAP, PRIMARY));
                 assertEquals(globalOffheapBackup, cache.size(OFFHEAP, BACKUP));
 
-                assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
-                assertEquals(globalSwapPrimary + globalOffheapPrimary, cache.size(SWAP, OFFHEAP, PRIMARY));
-                assertEquals(globalSwapBackup + globalOffheapBackup, cache.size(SWAP, OFFHEAP, BACKUP));
+                assertEquals(globalTotalSwap + globalTotalOffheap, cache.size(PRIMARY, BACKUP, NEAR, OFFHEAP));
+                assertEquals(globalSwapPrimary + globalOffheapPrimary, cache.size(OFFHEAP, PRIMARY));
+                assertEquals(globalSwapBackup + globalOffheapBackup, cache.size(OFFHEAP, BACKUP));
 
                 assertEquals(globalTotal - (globalTotalOffheap + globalTotalSwap), cache.size(PRIMARY, BACKUP, NEAR, ONHEAP));
             }
@@ -1247,20 +1234,20 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
                 assertEquals(totalKeys, cache.size(PRIMARY));
                 assertEquals(globalTotal, cache.size(ALL));
-                assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP, SWAP));
-                assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, SWAP, PRIMARY, BACKUP));
+                assertEquals(globalTotal, cache.size(PRIMARY, BACKUP, NEAR, ONHEAP, OFFHEAP));
+                assertEquals(globalTotal, cache.size(ONHEAP, OFFHEAP, PRIMARY, BACKUP));
 
-                assertEquals(globalPartTotalSwap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, SWAP));
-                assertEquals(globalParitionSwapPrimary, cache.sizeLong(part, SWAP, PRIMARY));
-                assertEquals(globalPartSwapBackup, cache.sizeLong(part, SWAP, BACKUP));
+                assertEquals(globalPartTotalSwap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR));
+                assertEquals(globalParitionSwapPrimary, cache.sizeLong(part, PRIMARY));
+                assertEquals(globalPartSwapBackup, cache.sizeLong(part, BACKUP));
 
                 assertEquals(globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, OFFHEAP));
                 assertEquals(globalPartOffheapPrimary, cache.sizeLong(part, OFFHEAP, PRIMARY));
                 assertEquals(globalPartOffheapBackup, cache.sizeLong(part, OFFHEAP, BACKUP));
 
-                assertEquals(globalPartTotalSwap + globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, SWAP, OFFHEAP));
-                assertEquals(globalParitionSwapPrimary + globalPartOffheapPrimary, cache.sizeLong(part, SWAP, OFFHEAP, PRIMARY));
-                assertEquals(globalPartSwapBackup + globalPartOffheapBackup, cache.sizeLong(part, SWAP, OFFHEAP, BACKUP));
+                assertEquals(globalPartTotalSwap + globalPartTotalOffheap, cache.sizeLong(part, PRIMARY, BACKUP, NEAR, OFFHEAP));
+                assertEquals(globalParitionSwapPrimary + globalPartOffheapPrimary, cache.sizeLong(part, OFFHEAP, PRIMARY));
+                assertEquals(globalPartSwapBackup + globalPartOffheapBackup, cache.sizeLong(part, OFFHEAP, BACKUP));
             }
         }
         finally {
@@ -1458,23 +1445,23 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
             checkLocalEntries(cache0.localEntries(), val, primaryKeys, backupKeys);
             checkLocalEntries(cache0.localEntries(ALL), val, primaryKeys, backupKeys);
-            checkLocalEntries(cache0.localEntries(ONHEAP, OFFHEAP, SWAP), val, primaryKeys, backupKeys);
+            checkLocalEntries(cache0.localEntries(ONHEAP, OFFHEAP), val, primaryKeys, backupKeys);
 
-            checkLocalEntries(cache0.localEntries(SWAP), val, swap);
+            checkLocalEntries(cache0.localEntries(), val, swap);
             checkLocalEntries(cache0.localEntries(OFFHEAP), val, offheap);
             checkLocalEntries(cache0.localEntries(ONHEAP), val, heap);
 
-            checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP), val, swap, offheap);
-            checkLocalEntries(cache0.localEntries(SWAP, ONHEAP), val, swap, heap);
+            checkLocalEntries(cache0.localEntries(OFFHEAP), val, swap, offheap);
+            checkLocalEntries(cache0.localEntries(ONHEAP), val, swap, heap);
 
-            checkLocalEntries(cache0.localEntries(SWAP, PRIMARY), val, swapKeys.get1());
-            checkLocalEntries(cache0.localEntries(SWAP, BACKUP), val, swapKeys.get2());
+            checkLocalEntries(cache0.localEntries(PRIMARY), val, swapKeys.get1());
+            checkLocalEntries(cache0.localEntries(BACKUP), val, swapKeys.get2());
             checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY), val, offheapKeys.get1());
             checkLocalEntries(cache0.localEntries(OFFHEAP, BACKUP), val, offheapKeys.get2());
 
-            checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, PRIMARY), val, swapKeys.get1(), offheapKeys.get1());
-            checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, BACKUP), val, swapKeys.get2(), offheapKeys.get2());
-            checkLocalEntries(cache0.localEntries(SWAP, OFFHEAP, PRIMARY, BACKUP), val, swap, offheap);
+            checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY), val, swapKeys.get1(), offheapKeys.get1());
+            checkLocalEntries(cache0.localEntries(OFFHEAP, BACKUP), val, swapKeys.get2(), offheapKeys.get2());
+            checkLocalEntries(cache0.localEntries(OFFHEAP, PRIMARY, BACKUP), val, swap, offheap);
         }
         finally {
             cache0.removeAll(new HashSet<>(primaryKeys));

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
index c1a2148..00431b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheReadThroughEvictionSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.internal.processors.cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -148,18 +147,15 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar
     }
 
     /**
-     * // TODO GG-11140: enable when eviction is implemented.
      * @throws Exception if failed.
      */
-    public void _testReadThroughEvictionPolicy() throws Exception {
+    public void testReadThroughEvictionPolicy() throws Exception {
         Ignite ig = testedGrid();
 
         CacheConfiguration<Object, Object> cc = variationConfig("eviction");
 
         cc.setEvictionPolicy(new FifoEvictionPolicy(1));
-
-        if (cc.getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            cc.setOffHeapMaxMemory(2 * 1024);
+        cc.setOnheapCacheEnabled(true);
 
         final IgniteCache<Object, Object> cache = ig.createCache(cc);
 
@@ -174,7 +170,7 @@ public class IgniteCacheReadThroughEvictionSelfTest extends IgniteCacheConfigVar
 
                     System.out.println("Cache [onHeap=" + size + ", offHeap=" + offheapSize + ']');
 
-                    return size <= testsCfg.gridCount() && offheapSize < KEYS;
+                    return size <= testsCfg.gridCount();
                 }
             }, 30_000));
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
index a6601b2..3a55f47 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheStoreValueAbstractTest.java
@@ -101,11 +101,6 @@ public abstract class IgniteCacheStoreValueAbstractTest extends IgniteCacheAbstr
     }
 
     /** {@inheritDoc} */
-    @Override protected boolean swapEnabled() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
     @Override protected long getTestTimeout() {
         return 3 * 60_000;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
index c32052b..aa4faaf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxNearPeekModesTest.java
@@ -28,6 +28,9 @@ public class IgniteCacheTxNearPeekModesTest extends IgniteCacheTxPeekModesTest {
 
     /** {@inheritDoc} */
     @Override public void testLocalPeek() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+        // TODO: uncomment and re-open ticket if fails.
+//        fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+
+        super.testLocalPeek();
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
index f399ca2..61839b5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPeekModesTest.java
@@ -51,6 +51,9 @@ public class IgniteCacheTxPeekModesTest extends IgniteCachePeekModesAbstractTest
 
     /** {@inheritDoc} */
     @Override public void testLocalPeek() throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-1839");
+        // TODO: uncomment and re-open ticket if fails.
+//        fail("https://issues.apache.org/jira/browse/IGNITE-1824");
+
+        super.testLocalPeek();
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
deleted file mode 100644
index 7f38bb2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffHeapTieredTransactionSelfTest.java
+++ /dev/null
@@ -1,134 +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.apache.ignite.internal.processors.cache;
-
-import java.util.LinkedHashMap;
-import java.util.Map;
-import org.apache.ignite.Ignite;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.IgniteTransactions;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.REPLICATED;
-import static org.apache.ignite.transactions.TransactionConcurrency.OPTIMISTIC;
-import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
-import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
-import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
-import static org.apache.ignite.transactions.TransactionIsolation.SERIALIZABLE;
-
-/**
- * Off-heap tiered test.
- */
-public class OffHeapTieredTransactionSelfTest extends GridCommonAbstractTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        CacheConfiguration ccfg = defaultCacheConfiguration();
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-        ccfg.setAtomicityMode(TRANSACTIONAL);
-        ccfg.setOffHeapMaxMemory(0);
-        ccfg.setCacheMode(REPLICATED);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        cfg.setCacheConfiguration(ccfg);
-
-        cfg.getTransactionConfiguration().setTxSerializableEnabled(true);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected long getTestTimeout() {
-        return 30_000;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTest() throws Exception {
-        startGrids(2);
-
-        awaitPartitionMapExchange();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTest() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception In case of error.
-     */
-    public void testPutAll() throws Exception {
-        IgniteCache<String, Integer> cache = grid(0).cache(null);
-
-        final int KEYS = 5;
-
-        Map<String, Integer> data = new LinkedHashMap<>();
-
-        for (int i = 0; i < KEYS; i++)
-            data.put("key_" + i, i);
-
-        checkPutAll(cache, data, OPTIMISTIC, READ_COMMITTED);
-
-        checkPutAll(cache, data, OPTIMISTIC, REPEATABLE_READ);
-
-        checkPutAll(cache, data, OPTIMISTIC, SERIALIZABLE);
-
-        checkPutAll(cache, data, PESSIMISTIC, READ_COMMITTED);
-
-        checkPutAll(cache, data, PESSIMISTIC, REPEATABLE_READ);
-
-        checkPutAll(cache, data, PESSIMISTIC, SERIALIZABLE);
-    }
-
-    /**
-     * @throws Exception In case of error.
-     */
-    private void checkPutAll(IgniteCache<String, Integer> cache, Map<String, Integer> data,
-        TransactionConcurrency txConcurrency, TransactionIsolation txIsolation) throws Exception {
-        IgniteTransactions txs = cache.unwrap(Ignite.class).transactions();
-
-        try (Transaction tx = txs.txStart(txConcurrency, txIsolation)) {
-            cache.putAll(data);
-
-            tx.commit();
-        }
-
-        for (Map.Entry<String, Integer> entry : data.entrySet())
-            assertEquals(entry.getValue(), cache.get(entry.getKey()));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
index 7896e3e..a3d3130 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/OffheapCacheMetricsForClusterGroupSelfTest.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
@@ -134,8 +133,6 @@ public class OffheapCacheMetricsForClusterGroupSelfTest extends GridCommonAbstra
 
         cfg.setBackups(1);
         cfg.setStatisticsEnabled(true);
-        cfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-        cfg.setOffHeapMaxMemory(1024 * 1024 * 1024);
         return cfg;
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
index 134ed68..a327dcb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryObjectsAbstractSelfTest.java
@@ -78,7 +78,6 @@ import org.apache.ignite.transactions.TransactionIsolation;
 import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
 import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
@@ -156,22 +155,11 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
         cacheCfg.setWriteThrough(true);
         cacheCfg.setLoadPreviousValue(true);
         cacheCfg.setBackups(1);
-
-        if (offheapTiered()) {
-            cacheCfg.setMemoryMode(OFFHEAP_TIERED);
-            cacheCfg.setOffHeapMaxMemory(0);
-        }
+        cacheCfg.setOnheapCacheEnabled(false);
 
         return cacheCfg;
     }
 
-    /**
-     * @return {@code True} if should use OFFHEAP_TIERED mode.
-     */
-    protected boolean offheapTiered() {
-        return false;
-    }
-
     /** {@inheritDoc} */
     @Override protected void beforeTestsStarted() throws Exception {
         startGridsMultiThreaded(gridCount());
@@ -204,11 +192,6 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
         for (int i = 0; i < ENTRY_CNT; i++)
             c.remove(i);
 
-        if (offheapTiered()) {
-            for (int k = 0; k < 100; k++)
-                c.remove(k);
-        }
-
         assertEquals(0, c.size());
     }
 
@@ -233,6 +216,13 @@ public abstract class GridCacheBinaryObjectsAbstractSelfTest extends GridCommonA
     protected abstract int gridCount();
 
     /**
+     * @return {@code True} if on-heap cache is enabled.
+     */
+    protected boolean onheapCacheEnabled() {
+        return false;
+    }
+
+    /**
      * @throws Exception If failed.
      */
     @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
deleted file mode 100644
index 39c35a2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest
-    extends GridCacheBinaryObjectsAtomicNearDisabledSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapTiered() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
new file mode 100644
index 0000000..9e690ae
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsAtomicNearDisabledSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
deleted file mode 100644
index e6ae410..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsAtomicOffheapTieredSelfTest extends GridCacheBinaryObjectsAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapTiered() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
new file mode 100644
index 0000000..ad264cb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsAtomicOnheapSelfTest extends GridCacheBinaryObjectsAtomicSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
deleted file mode 100644
index 8aa082e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest
-    extends GridCacheBinaryObjectsPartitionedNearDisabledSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapTiered() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
new file mode 100644
index 0000000..ad9bda8
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsPartitionedNearDisabledSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
deleted file mode 100644
index 7db608d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest
-    extends GridCacheBinaryObjectsPartitionedSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapTiered() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
new file mode 100644
index 0000000..af2afd0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
@@ -0,0 +1,8 @@
+package org.apache.ignite.internal.processors.cache.binary.distributed.dht;
+
+public class GridCacheBinaryObjectsPartitionedOnheapSelfTest extends GridCacheBinaryObjectsPartitionedSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
deleted file mode 100644
index 6427969..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheMemoryModeBinarySelfTest.java
+++ /dev/null
@@ -1,36 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheMemoryModeSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- * Memory models test.
- */
-public class GridCacheMemoryModeBinarySelfTest extends GridCacheMemoryModeSelfTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
deleted file mode 100644
index 14a9123..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredAtomicBinarySelfTest.java
+++ /dev/null
@@ -1,48 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredAtomicBinarySelfTest extends GridCacheOffHeapTieredAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean binaryEnabled() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        // Enable binary.
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
deleted file mode 100644
index 00a6b10..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredBinarySelfTest.java
+++ /dev/null
@@ -1,48 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredBinarySelfTest extends GridCacheOffHeapTieredSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean binaryEnabled() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        // Enable binary.
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
deleted file mode 100644
index 956300c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.java
+++ /dev/null
@@ -1,96 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionAtomicBinarySelfTest extends GridCacheOffHeapTieredEvictionAtomicSelfTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        // Enable binary.
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
-        return new BinaryValuePredicate(expVal, acceptNull);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TestProcessor testClosure(String expVal, boolean acceptNull) {
-        return new BinaryValueClosure(expVal, acceptNull);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class BinaryValuePredicate extends TestPredicate {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        BinaryValuePredicate(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            BinaryObject obj = (BinaryObject)val;
-
-            assertEquals(expVal, obj.field("val"));
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class BinaryValueClosure extends TestProcessor {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        BinaryValueClosure(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            BinaryObject obj = (BinaryObject)val;
-
-            assertEquals(expVal, obj.field("val"));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
deleted file mode 100644
index b0fc62c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheOffHeapTieredEvictionBinarySelfTest.java
+++ /dev/null
@@ -1,96 +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.apache.ignite.internal.processors.cache.binary.distributed.dht;
-
-import java.util.Arrays;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- *
- */
-public class GridCacheOffHeapTieredEvictionBinarySelfTest extends GridCacheOffHeapTieredEvictionSelfTest {
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        // Enable binary.
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setClassNames(Arrays.asList(TestValue.class.getName()));
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TestPredicate testPredicate(String expVal, boolean acceptNull) {
-        return new BinaryValuePredicate(expVal, acceptNull);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected TestProcessor testClosure(String expVal, boolean acceptNull) {
-        return new BinaryValueClosure(expVal, acceptNull);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class BinaryValuePredicate extends TestPredicate {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        BinaryValuePredicate(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            BinaryObject obj = (BinaryObject)val;
-
-            assertEquals(expVal, obj.field("val"));
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleInnerClass")
-    static class BinaryValueClosure extends TestProcessor {
-        /**
-         * @param expVal Expected value.
-         * @param acceptNull If {@code true} value can be null;
-         */
-        BinaryValueClosure(String expVal, boolean acceptNull) {
-            super(expVal, acceptNull);
-        }
-
-        /** {@inheritDoc} */
-        @Override public void checkValue(Object val) {
-            BinaryObject obj = (BinaryObject)val;
-
-            assertEquals(expVal, obj.field("val"));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
deleted file mode 100644
index d53da63..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOffheapTieredSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.binary.local;
-
-/**
- *
- */
-public class GridCacheBinaryObjectsLocalOffheapTieredSelfTest extends GridCacheBinaryObjectsLocalSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapTiered() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
new file mode 100644
index 0000000..bb44a4d
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/local/GridCacheBinaryObjectsLocalOnheapSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.binary.local;
+
+public class GridCacheBinaryObjectsLocalOnheapSelfTest extends GridCacheBinaryObjectsLocalSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
index e359ef3..725b226 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueCleanupSelfTest.java
@@ -23,7 +23,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CollectionConfiguration;
@@ -37,7 +36,6 @@ import org.apache.ignite.internal.util.typedef.PAX;
 import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -61,11 +59,6 @@ public class GridCacheQueueCleanupSelfTest extends IgniteCollectionAbstractTest
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }


[30/57] [abbrv] ignite git commit: IGNITE-3477 - Fixing unapproved licenses

Posted by ag...@apache.org.
IGNITE-3477 - Fixing unapproved licenses


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

Branch: refs/heads/ignite-3477-debug
Commit: a45dd888e86aab8fbbdde04308e62bf43427899e
Parents: da7093a
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 12:22:33 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 12:22:33 2017 +0300

----------------------------------------------------------------------
 .../internal/pagemem/impl/PageNoStoreImpl.java     |  0
 ...aryObjectsAtomicNearDisabledOnheapSelfTest.java | 17 +++++++++++++++++
 ...GridCacheBinaryObjectsAtomicOnheapSelfTest.java | 17 +++++++++++++++++
 ...jectsPartitionedNearDisabledOnheapSelfTest.java | 17 +++++++++++++++++
 ...acheBinaryObjectsPartitionedOnheapSelfTest.java | 17 +++++++++++++++++
 5 files changed, 68 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/a45dd888/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/ignite/blob/a45dd888/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
index 9e690ae..13d545c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.binary.distributed.dht;
 
 public class GridCacheBinaryObjectsAtomicNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsAtomicNearDisabledSelfTest {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a45dd888/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
index ad264cb..a58dbca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsAtomicOnheapSelfTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.binary.distributed.dht;
 
 public class GridCacheBinaryObjectsAtomicOnheapSelfTest extends GridCacheBinaryObjectsAtomicSelfTest {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a45dd888/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
index ad9bda8..2ac56f7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.binary.distributed.dht;
 
 public class GridCacheBinaryObjectsPartitionedNearDisabledOnheapSelfTest extends GridCacheBinaryObjectsPartitionedNearDisabledSelfTest {

http://git-wip-us.apache.org/repos/asf/ignite/blob/a45dd888/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
index af2afd0..6f4c609 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinaryObjectsPartitionedOnheapSelfTest.java
@@ -1,3 +1,20 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.binary.distributed.dht;
 
 public class GridCacheBinaryObjectsPartitionedOnheapSelfTest extends GridCacheBinaryObjectsPartitionedSelfTest {


[19/57] [abbrv] ignite git commit: Merge branches 'ignite-3477-master' and 'ignite-4851' of https://github.com/gridgain/apache-ignite into ignite-4851

Posted by ag...@apache.org.
Merge branches 'ignite-3477-master' and 'ignite-4851' of https://github.com/gridgain/apache-ignite into ignite-4851


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

Branch: refs/heads/ignite-3477-debug
Commit: 6e67866866ec834c62d98f62722cfdff6501e9e3
Parents: b4e6e4a f59a7f6
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 10 17:56:26 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Mon Apr 10 17:56:26 2017 +0300

----------------------------------------------------------------------
 assembly/dependencies-fabric.xml                |    1 +
 assembly/libs/README.txt                        |    1 +
 .../cache/IgniteCacheOffheapManagerImpl.java    |   45 +-
 .../MarshallerContextLockingSelfTest.java       |   33 +-
 .../near/GridCacheNearReadersSelfTest.java      |    6 +-
 .../hibernate/HibernateKeyTransformer.java      |    2 +-
 .../cache/hibernate/HibernateKeyWrapper.java    |   36 +-
 .../cache/hibernate/HibernateRegionFactory.java |    3 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |    2 +-
 modules/hibernate5/README.txt                   |   48 +
 modules/hibernate5/licenses/apache-2.0.txt      |  202 ++
 modules/hibernate5/pom.xml                      |  146 ++
 .../HibernateAbstractRegionAccessStrategy.java  |   99 +
 .../HibernateAccessStrategyAdapter.java         |  379 ++++
 .../cache/hibernate/HibernateCacheProxy.java    |  811 ++++++++
 .../hibernate/HibernateCollectionRegion.java    |  114 +
 .../cache/hibernate/HibernateEntityRegion.java  |  129 ++
 .../hibernate/HibernateGeneralDataRegion.java   |   72 +
 .../hibernate/HibernateKeyTransformer.java      |   28 +
 .../cache/hibernate/HibernateKeyWrapper.java    |  108 +
 .../hibernate/HibernateNaturalIdRegion.java     |  113 +
 .../HibernateNonStrictAccessStrategy.java       |  222 ++
 .../hibernate/HibernateQueryResultsRegion.java  |   70 +
 .../HibernateReadOnlyAccessStrategy.java        |  107 +
 .../HibernateReadWriteAccessStrategy.java       |  328 +++
 .../ignite/cache/hibernate/HibernateRegion.java |   99 +
 .../cache/hibernate/HibernateRegionFactory.java |  255 +++
 .../hibernate/HibernateTimestampsRegion.java    |   39 +
 .../HibernateTransactionalAccessStrategy.java   |  141 ++
 .../HibernateTransactionalDataRegion.java       |  107 +
 .../ignite/cache/hibernate/package-info.java    |   24 +
 .../hibernate/CacheHibernateBlobStore.java      |  542 +++++
 .../CacheHibernateBlobStoreEntry.hbm.xml        |   31 +
 .../hibernate/CacheHibernateBlobStoreEntry.java |   89 +
 .../CacheHibernateBlobStoreFactory.java         |  235 +++
 .../CacheHibernateStoreSessionListener.java     |  223 ++
 .../cache/store/hibernate/package-info.java     |   22 +
 .../src/test/config/factory-cache.xml           |   59 +
 .../src/test/config/factory-cache1.xml          |   61 +
 .../config/factory-incorrect-store-cache.xml    |   56 +
 .../HibernateL2CacheConfigurationSelfTest.java  |  409 ++++
 .../hibernate/HibernateL2CacheSelfTest.java     | 1948 ++++++++++++++++++
 .../HibernateL2CacheTransactionalSelfTest.java  |  154 ++
 ...nateL2CacheTransactionalUseSyncSelfTest.java |   31 +
 .../CacheHibernateBlobStoreNodeRestartTest.java |   54 +
 .../CacheHibernateBlobStoreSelfTest.java        |  113 +
 .../CacheHibernateStoreFactorySelfTest.java     |  326 +++
 ...heHibernateStoreSessionListenerSelfTest.java |  241 +++
 .../cache/store/hibernate/hibernate.cfg.xml     |   42 +
 .../cache/store/hibernate/package-info.java     |   22 +
 .../IgniteBinaryHibernate5TestSuite.java        |   37 +
 .../testsuites/IgniteHibernate5TestSuite.java   |   57 +
 .../query/h2/opt/GridH2TableSelfTest.java       |    2 +
 .../query/h2/sql/GridQueryParsingTest.java      |    6 +-
 pom.xml                                         |    1 +
 55 files changed, 8490 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6e678668/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/6e678668/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
----------------------------------------------------------------------


[57/57] [abbrv] ignite git commit: Debugging .NET

Posted by ag...@apache.org.
Debugging .NET


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

Branch: refs/heads/ignite-3477-debug
Commit: 0ff3e9a8dcf6f20a251e9a674c952468e880e6f9
Parents: 3c5f342
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Apr 12 10:33:39 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Apr 12 10:33:39 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/database/freelist/FreeListImpl.java    | 3 +++
 .../processors/cache/database/tree/io/DataPageIO.java       | 9 +++++++++
 2 files changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0ff3e9a8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
index cb68f7b..3ca5478 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
@@ -188,6 +188,9 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
             CacheDataRow row,
             int rowSize
         ) throws IgniteCheckedException {
+            U.debug("Adding row [pageAddr=" + U.hexLong(pageAddr) + ", row=" + row + ", rowSize=" + rowSize +
+                ", pageSize=" + pageSize() + ']');
+
             io.addRow(pageAddr, row, rowSize, pageSize());
 
             if (needWalDeltaRecord(pageId, page, null)) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/0ff3e9a8/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
index 9546890..5d82be6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
@@ -24,6 +24,7 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.configuration.MemoryConfiguration;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.PageUtils;
@@ -32,6 +33,7 @@ import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.tree.util.PageHandler;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
 import org.apache.ignite.internal.util.typedef.internal.SB;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -136,6 +138,11 @@ public class DataPageIO extends PageIO {
     private int getPageEntrySize(long pageAddr, int dataOff, int show) {
         int payloadLen = PageUtils.getShort(pageAddr, dataOff) & 0xFFFF;
 
+        if (payloadLen <=0) {
+            U.debug("!!!! Invalid payload len [pageAddr=" + U.hexLong(pageAddr) + ", dataOff=" + dataOff +
+                ", page=" + printPageLayout(pageAddr, MemoryConfiguration.DFLT_PAGE_SIZE));
+        }
+
         if ((payloadLen & FRAGMENTED_FLAG) != 0)
             payloadLen &= ~FRAGMENTED_FLAG; // We are fragmented and have a link.
         else
@@ -791,6 +798,8 @@ public class DataPageIO extends PageIO {
         int itemId = addItem(pageAddr, fullEntrySize, directCnt, indirectCnt, dataOff, pageSize);
 
         setLink(row, pageAddr, itemId);
+
+        U.debug("After addRow [pageAddr=" + U.hexLong(pageAddr) + ", page=" + printPageLayout(pageAddr, MemoryConfiguration.DFLT_PAGE_SIZE) + ']');
     }
 
     /**


[28/57] [abbrv] ignite git commit: IGNITE-3477 - Fixing tests

Posted by ag...@apache.org.
IGNITE-3477 - Fixing tests


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

Branch: refs/heads/ignite-3477-debug
Commit: da7093add24a8efb6cf55f9e6686ec3d44c52ba5
Parents: 01b088f
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 12:07:20 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 12:12:53 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLocalPartition.java         | 8 ++------
 .../processors/cache/transactions/IgniteTxHandler.java       | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/da7093ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 8566b35..e8489e2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -429,6 +429,7 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
         release0(0);
     }
 
+    /** {@inheritDoc} */
     @Override protected void release(int sizeChange, GridCacheEntryEx e) {
         release0(sizeChange);
     }
@@ -457,12 +458,7 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
                 if (reservations == 0 && shouldBeRenting)
                     rent(true);
 
-                try {
-                    tryEvict();
-                }
-                catch (NodeStoppingException ignore) {
-                    // No-op.
-                }
+                tryEvictAsync(false);
 
                 break;
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/da7093ad/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index a34c5d6..099a4ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@ -121,7 +121,7 @@ public class IgniteTxHandler {
 
         IgniteInternalFuture<GridNearTxPrepareResponse> fut = prepareTx(nearNodeId, null, req);
 
-        assert req.txState() != null || fut.error() != null ||
+        assert req.txState() != null || fut == null || fut.error() != null ||
             (ctx.tm().tx(req.version()) == null && ctx.tm().nearTx(req.version()) == null);
 
         return fut;


[20/57] [abbrv] ignite git commit: Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master

Posted by ag...@apache.org.
Merge branch 'ignite-3477-master' of https://github.com/gridgain/apache-ignite into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: 54213d637b2f547856b736735b692ac672a023de
Parents: c56c4b8 f59a7f6
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Mon Apr 10 18:08:47 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 18:08:47 2017 +0300

----------------------------------------------------------------------
 .../cache/IgniteCacheOffheapManagerImpl.java    | 45 +++++++++++---------
 .../near/GridCacheNearReadersSelfTest.java      |  6 ++-
 2 files changed, 31 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/54213d63/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/54213d63/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
----------------------------------------------------------------------


[40/57] [abbrv] ignite git commit: .NET: Remove FairAffinityFunction

Posted by ag...@apache.org.
.NET: Remove FairAffinityFunction


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

Branch: refs/heads/ignite-3477-debug
Commit: b62d44646b93049a3795780ff5eaf7af070d3d9b
Parents: 3eb05de
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 13:28:14 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 13:28:14 2017 +0300

----------------------------------------------------------------------
 .../utils/PlatformConfigurationUtils.java       |  3 +-
 .../Affinity/AffinityFunctionSpringTest.cs      |  6 +-
 .../Cache/Affinity/AffinityFunctionTest.cs      | 92 +-------------------
 .../Cache/CacheConfigurationTest.cs             | 23 +----
 .../Config/Cache/Affinity/affinity-function.xml |  4 +-
 .../IgniteConfigurationSerializerTest.cs        |  8 +-
 .../IgniteConfigurationTest.cs                  |  2 -
 .../Apache.Ignite.Core.csproj                   |  2 -
 .../Cache/Affinity/Fair/FairAffinityFunction.cs | 32 -------
 .../Cache/Affinity/Fair/Package-Info.cs         | 26 ------
 .../Cache/Affinity/IAffinityFunction.cs         |  3 +-
 .../Cache/Configuration/CacheConfiguration.cs   | 81 +----------------
 .../IgniteConfigurationSection.xsd              | 29 ------
 .../Affinity/AffinityFunctionSerializer.cs      | 18 +---
 14 files changed, 14 insertions(+), 315 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 9c67b56..17a5a16 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -180,8 +180,7 @@ public class PlatformConfigurationUtils {
         if (qryEntCnt > 0) {
             Collection<QueryEntity> entities = new ArrayList<>(qryEntCnt);
 
-            for (int i
-                 = 0; i < qryEntCnt; i++)
+            for (int i = 0; i < qryEntCnt; i++)
                 entities.add(readQueryEntity(in));
 
             ccfg.setQueryEntities(entities);

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionSpringTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionSpringTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionSpringTest.cs
index 48c5814..de4d2ec 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionSpringTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionSpringTest.cs
@@ -24,7 +24,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
     using System.Linq;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Affinity;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
+    using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Resource;
     using NUnit.Framework;
@@ -117,7 +117,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
                 var longKey = (long)key;
                 int res;
 
-                if (TestFairFunc.PredefinedParts.TryGetValue(longKey, out res))
+                if (TestRendezvousFunc.PredefinedParts.TryGetValue(longKey, out res))
                     return res;
 
                 return (int)(longKey * 2 % 5);
@@ -135,7 +135,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
             }
         }
 
-        private class TestFairFunc : FairAffinityFunction   // [Serializable] is not necessary
+        private class TestRendezvousFunc : RendezvousAffinityFunction   // [Serializable] is not necessary
         {
             public static readonly Dictionary<long, int> PredefinedParts = new Dictionary<long, int>
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
index a3e6252..91ff7e0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Affinity/AffinityFunctionTest.cs
@@ -24,7 +24,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
     using System.Threading;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Affinity;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cluster;
@@ -47,9 +46,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
         private const string CacheName = "cache";
 
         /** */
-        private const string CacheNameFair = "cacheFair";
-
-        /** */
         private const string CacheNameRendezvous = "cacheRendezvous";
 
         /** */
@@ -77,10 +73,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
                         AffinityFunction = new SimpleAffinityFunction(),
                         Backups = 7
                     },
-                    new CacheConfiguration(CacheNameFair)
-                    {
-                        AffinityFunction = new FairAffinityFunctionEx {Foo = 25}
-                    },
                     new CacheConfiguration(CacheNameRendezvous)
                     {
                         AffinityFunction = new RendezvousAffinityFunctionEx {Bar = "test"}
@@ -175,11 +167,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
                 new CacheConfiguration("rendezvousPredefined")
                 {
                     AffinityFunction = new RendezvousAffinityFunction {Partitions = 1234}
-                },
-                new CacheConfiguration("fairPredefined")
-                {
-                    AffinityFunction = new FairAffinityFunction {Partitions = 1234}
-                },
+                }
             }.Select(_ignite.CreateCache<int, int>);
 
             foreach (var cache in caches)
@@ -249,42 +237,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
         }
 
         /// <summary>
-        /// Tests customized fair affinity.
-        /// </summary>
-        [Test]
-        public void TestInheritFairAffinity()
-        {
-            Assert.Greater(FairAffinityFunctionEx.AssignCount, 2);
-
-            var caches = new[]
-            {
-                _ignite.GetCache<int, int>(CacheNameFair),
-                _ignite.CreateCache<int, int>(new CacheConfiguration(CacheNameFair + "2")
-                {
-                    AffinityFunction = new FairAffinityFunctionEx {Foo = 25}
-                })
-            };
-
-            foreach (var cache in caches)
-            {
-                var aff = _ignite.GetAffinity(cache.Name);
-
-                Assert.AreEqual(PartitionCount, aff.Partitions);
-
-                // Test from map
-                Assert.AreEqual(2, aff.GetPartition(1));
-                Assert.AreEqual(3, aff.GetPartition(2));
-
-                // Test from base func
-                Assert.AreEqual(6, aff.GetPartition(33));
-
-                // Check config
-                var func = (FairAffinityFunctionEx) cache.GetConfiguration().AffinityFunction;
-                Assert.AreEqual(25, func.Foo);
-            }
-        }
-
-        /// <summary>
         /// Tests customized rendezvous affinity.
         /// </summary>
         [Test]
@@ -397,46 +349,6 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
         }
 
         [Serializable]
-        private class FairAffinityFunctionEx : FairAffinityFunction
-        {
-            public static int AssignCount;
-
-            private static readonly Dictionary<int, int> PartitionMap = new Dictionary<int, int> {{1, 2}, {2, 3}};
-
-            public override int Partitions
-            {
-                get { return PartitionCount; }
-                set { Assert.AreEqual(Partitions, value); }
-            }
-
-            public int Foo { get; set; }
-
-            public override int GetPartition(object key)
-            {
-                int res;
-
-                if (PartitionMap.TryGetValue((int)key, out res))
-                    return res;
-
-                return base.GetPartition(key);
-            }
-
-            public override void RemoveNode(Guid nodeId)
-            {
-                RemovedNodes.Add(nodeId);
-            }
-
-            public override IEnumerable<IEnumerable<IClusterNode>> AssignPartitions(AffinityFunctionContext context)
-            {
-                var res = base.AssignPartitions(context).Reverse();
-
-                Interlocked.Increment(ref AssignCount);
-
-                return res;
-            }
-        }
-
-        [Serializable]
         private class RendezvousAffinityFunctionEx : RendezvousAffinityFunction
         {
             public static int AssignCount;
@@ -479,7 +391,7 @@ namespace Apache.Ignite.Core.Tests.Cache.Affinity
         /// <summary>
         /// Override only properties, so this func won't be passed over the wire.
         /// </summary>
-        private class SimpleOverride : FairAffinityFunction
+        private class SimpleOverride : RendezvousAffinityFunction
         {
             public override int Partitions
             {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
index 250177d..e63e203 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheConfigurationTest.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Tests.Cache
     using System.Linq;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cache.Affinity;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cache.Eviction;
@@ -186,17 +185,12 @@ namespace Apache.Ignite.Core.Tests.Cache
             Assert.AreEqual(CacheConfiguration.DefaultCopyOnRead, cfg.CopyOnRead);
             Assert.AreEqual(CacheConfiguration.DefaultStartSize, cfg.StartSize);
             Assert.AreEqual(CacheConfiguration.DefaultEagerTtl, cfg.EagerTtl);
-            Assert.AreEqual(CacheConfiguration.DefaultEvictSynchronizedKeyBufferSize, cfg.EvictSynchronizedKeyBufferSize);
-            Assert.AreEqual(CacheConfiguration.DefaultEvictSynchronized, cfg.EvictSynchronized);
-            Assert.AreEqual(CacheConfiguration.DefaultEvictSynchronizedConcurrencyLevel, cfg.EvictSynchronizedConcurrencyLevel);
-            Assert.AreEqual(CacheConfiguration.DefaultEvictSynchronizedTimeout, cfg.EvictSynchronizedTimeout);
             Assert.AreEqual(CacheConfiguration.DefaultInvalidate, cfg.Invalidate);
             Assert.AreEqual(CacheConfiguration.DefaultKeepVinaryInStore, cfg.KeepBinaryInStore);
             Assert.AreEqual(CacheConfiguration.DefaultLoadPreviousValue, cfg.LoadPreviousValue);
             Assert.AreEqual(CacheConfiguration.DefaultLockTimeout, cfg.LockTimeout);
             Assert.AreEqual(CacheConfiguration.DefaultLongQueryWarningTimeout, cfg.LongQueryWarningTimeout);
             Assert.AreEqual(CacheConfiguration.DefaultMaxConcurrentAsyncOperations, cfg.MaxConcurrentAsyncOperations);
-            Assert.AreEqual(CacheConfiguration.DefaultMaxEvictionOverflowRatio, cfg.MaxEvictionOverflowRatio);
             Assert.AreEqual(CacheConfiguration.DefaultReadFromBackup, cfg.ReadFromBackup);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceBatchSize, cfg.RebalanceBatchSize);
             Assert.AreEqual(CacheConfiguration.DefaultRebalanceMode, cfg.RebalanceMode);
@@ -221,17 +215,12 @@ namespace Apache.Ignite.Core.Tests.Cache
             Assert.AreEqual(x.CopyOnRead, y.CopyOnRead);
             Assert.AreEqual(x.StartSize, y.StartSize);
             Assert.AreEqual(x.EagerTtl, y.EagerTtl);
-            Assert.AreEqual(x.EvictSynchronizedKeyBufferSize, y.EvictSynchronizedKeyBufferSize);
-            Assert.AreEqual(x.EvictSynchronized, y.EvictSynchronized);
-            Assert.AreEqual(x.EvictSynchronizedConcurrencyLevel, y.EvictSynchronizedConcurrencyLevel);
-            Assert.AreEqual(x.EvictSynchronizedTimeout, y.EvictSynchronizedTimeout);
             Assert.AreEqual(x.Invalidate, y.Invalidate);
             Assert.AreEqual(x.KeepBinaryInStore, y.KeepBinaryInStore);
             Assert.AreEqual(x.LoadPreviousValue, y.LoadPreviousValue);
             Assert.AreEqual(x.LockTimeout, y.LockTimeout);
             Assert.AreEqual(x.LongQueryWarningTimeout, y.LongQueryWarningTimeout);
             Assert.AreEqual(x.MaxConcurrentAsyncOperations, y.MaxConcurrentAsyncOperations);
-            Assert.AreEqual(x.MaxEvictionOverflowRatio, y.MaxEvictionOverflowRatio);
             Assert.AreEqual(x.ReadFromBackup, y.ReadFromBackup);
             Assert.AreEqual(x.RebalanceBatchSize, y.RebalanceBatchSize);
             Assert.AreEqual(x.RebalanceMode, y.RebalanceMode);
@@ -487,22 +476,17 @@ namespace Apache.Ignite.Core.Tests.Cache
                 WriteBehindFlushThreadCount = 4,
                 LongQueryWarningTimeout = TimeSpan.FromSeconds(5),
                 LoadPreviousValue = true,
-                EvictSynchronizedKeyBufferSize = 6,
                 CopyOnRead = true,
                 WriteBehindFlushFrequency = TimeSpan.FromSeconds(6),
                 WriteBehindFlushSize = 7,
-                EvictSynchronized = true,
                 AtomicWriteOrderMode = CacheAtomicWriteOrderMode.Primary,
                 AtomicityMode = CacheAtomicityMode.Atomic,
                 Backups = 8,
                 CacheMode = CacheMode.Partitioned,
                 EagerTtl = true,
-                EvictSynchronizedConcurrencyLevel = 9,
-                EvictSynchronizedTimeout = TimeSpan.FromSeconds(10),
                 Invalidate = true,
                 KeepBinaryInStore = true,
                 LockTimeout = TimeSpan.FromSeconds(11),
-                MaxEvictionOverflowRatio = 0.5f,
                 ReadFromBackup = true,
                 RebalanceBatchSize = 12,
                 RebalanceDelay = TimeSpan.FromSeconds(13),
@@ -579,22 +563,17 @@ namespace Apache.Ignite.Core.Tests.Cache
                 WriteBehindFlushThreadCount = 4,
                 LongQueryWarningTimeout = TimeSpan.FromSeconds(5),
                 LoadPreviousValue = true,
-                EvictSynchronizedKeyBufferSize = 6,
                 CopyOnRead = true,
                 WriteBehindFlushFrequency = TimeSpan.FromSeconds(6),
                 WriteBehindFlushSize = 7,
-                EvictSynchronized = true,
                 AtomicWriteOrderMode = CacheAtomicWriteOrderMode.Clock,
                 AtomicityMode = CacheAtomicityMode.Transactional,
                 Backups = 8,
                 CacheMode = CacheMode.Partitioned,
                 EagerTtl = true,
-                EvictSynchronizedConcurrencyLevel = 9,
-                EvictSynchronizedTimeout = TimeSpan.FromSeconds(10),
                 Invalidate = true,
                 KeepBinaryInStore = true,
                 LockTimeout = TimeSpan.FromSeconds(11),
-                MaxEvictionOverflowRatio = 0.5f,
                 ReadFromBackup = true,
                 RebalanceBatchSize = 12,
                 RebalanceDelay = TimeSpan.FromSeconds(13),
@@ -649,7 +628,7 @@ namespace Apache.Ignite.Core.Tests.Cache
                     MaxMemorySize = 2501,
                     BatchSize = 33
                 },
-                AffinityFunction = new FairAffinityFunction
+                AffinityFunction = new RendezvousAffinityFunction
                 {
                     Partitions = 113,
                     ExcludeNeighbors = false

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function.xml b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function.xml
index 62d723f..ca38fbe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function.xml
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Config/Cache/Affinity/affinity-function.xml
@@ -70,7 +70,7 @@
 
                     <property name="affinity">
                         <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetAffinityFunction">
-                            <property name="typeName" value="Apache.Ignite.Core.Tests.Cache.Affinity.AffinityFunctionSpringTest+TestFairFunc, Apache.Ignite.Core.Tests"/>
+                            <property name="typeName" value="Apache.Ignite.Core.Tests.Cache.Affinity.AffinityFunctionSpringTest+TestRendezvousFunc, Apache.Ignite.Core.Tests"/>
                             <property name="properties">
                                 <map>
                                     <entry key="Property1">
@@ -90,7 +90,7 @@
 
                     <property name="affinity">
                         <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetAffinityFunction">
-                            <property name="typeName" value="Apache.Ignite.Core.Tests.Cache.Affinity.AffinityFunctionSpringTest+TestFairFunc, Apache.Ignite.Core.Tests"/>
+                            <property name="typeName" value="Apache.Ignite.Core.Tests.Cache.Affinity.AffinityFunctionSpringTest+TestRendezvousFunc, Apache.Ignite.Core.Tests"/>
                             <property name="properties">
                                 <map>
                                     <entry key="Property1">

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 89e0d3d..2cdf0b0 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@ -33,7 +33,6 @@ namespace Apache.Ignite.Core.Tests
     using System.Xml.Linq;
     using System.Xml.Schema;
     using Apache.Ignite.Core.Binary;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cache.Eviction;
@@ -616,17 +615,12 @@ namespace Apache.Ignite.Core.Tests
                         CacheStoreFactory = new TestCacheStoreFactory(),
                         CopyOnRead = false,
                         EagerTtl = false,
-                        EvictSynchronized = true,
-                        EvictSynchronizedConcurrencyLevel = 13,
-                        EvictSynchronizedKeyBufferSize = 14,
-                        EvictSynchronizedTimeout = TimeSpan.FromMinutes(3),
                         Invalidate = true,
                         KeepBinaryInStore = true,
                         LoadPreviousValue = true,
                         LockTimeout = TimeSpan.FromSeconds(56),
                         LongQueryWarningTimeout = TimeSpan.FromSeconds(99),
                         MaxConcurrentAsyncOperations = 24,
-                        MaxEvictionOverflowRatio = 5.6F,
                         QueryEntities = new[]
                         {
                             new QueryEntity
@@ -674,7 +668,7 @@ namespace Apache.Ignite.Core.Tests
                         {
                             BatchSize = 18, MaxMemorySize = 1023, MaxSize = 554
                         },
-                        AffinityFunction = new FairAffinityFunction
+                        AffinityFunction = new RendezvousAffinityFunction
                         {
                             ExcludeNeighbors = true,
                             Partitions = 48

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index f642976..19053f2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@ -22,7 +22,6 @@ namespace Apache.Ignite.Core.Tests
     using System.IO;
     using System.Linq;
     using Apache.Ignite.Core.Binary;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cache.Configuration;
     using Apache.Ignite.Core.Cache.Eviction;
@@ -74,7 +73,6 @@ namespace Apache.Ignite.Core.Tests
             CheckDefaultValueAttributes(new TcpDiscoveryMulticastIpFinder());
             CheckDefaultValueAttributes(new TcpCommunicationSpi());
             CheckDefaultValueAttributes(new RendezvousAffinityFunction());
-            CheckDefaultValueAttributes(new FairAffinityFunction());
             CheckDefaultValueAttributes(new NearCacheConfiguration());
             CheckDefaultValueAttributes(new FifoEvictionPolicy());
             CheckDefaultValueAttributes(new LruEvictionPolicy());

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index a383ef2..908a192 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -111,8 +111,6 @@
     <Compile Include="Cache\Affinity\AffinityKeyMappedAttribute.cs" />
     <Compile Include="Cache\Affinity\AffinityFunctionContext.cs" />
     <Compile Include="Cache\Affinity\AffinityTopologyVersion.cs" />
-    <Compile Include="Cache\Affinity\Fair\FairAffinityFunction.cs" />
-    <Compile Include="Cache\Affinity\Fair\Package-Info.cs" />
     <Compile Include="Cache\Affinity\IAffinityFunction.cs" />
     <Compile Include="Cache\Affinity\Package-Info.cs" />
     <Compile Include="Cache\Affinity\Rendezvous\Package-Info.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/FairAffinityFunction.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/FairAffinityFunction.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/FairAffinityFunction.cs
deleted file mode 100644
index 4a3885f..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/FairAffinityFunction.cs
+++ /dev/null
@@ -1,32 +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.
- */
-
-namespace Apache.Ignite.Core.Cache.Affinity.Fair
-{
-    using System;
-
-    /// <summary>
-    /// Fair affinity function which tries to ensure that all nodes get equal number of partitions with 
-    /// minimum amount of reassignments between existing nodes.
-    /// </summary>
-    [Serializable]
-    public class FairAffinityFunction : AffinityFunctionBase
-    {
-        // No-op.
-        // Actual implementation is in Java, see AffinityFunctionSerializer.Write method.
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/Package-Info.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/Package-Info.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/Package-Info.cs
deleted file mode 100644
index 29a21bd..0000000
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/Fair/Package-Info.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-\ufeff/*
-* 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.
-*/
-
-#pragma warning disable 1587   // invalid XML comment
-
-/// <summary>
-/// Fair affinity API.
-/// </summary>
-namespace Apache.Ignite.Core.Cache.Affinity.Fair
-{
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/IAffinityFunction.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/IAffinityFunction.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/IAffinityFunction.cs
index b6c190c..14592b2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/IAffinityFunction.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Affinity/IAffinityFunction.cs
@@ -19,7 +19,6 @@ namespace Apache.Ignite.Core.Cache.Affinity
 {
     using System;
     using System.Collections.Generic;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cluster;
 
@@ -27,7 +26,7 @@ namespace Apache.Ignite.Core.Cache.Affinity
     /// Represents a function that maps cache keys to cluster nodes.
     /// <para />
     /// Predefined implementations: 
-    /// <see cref="RendezvousAffinityFunction"/>, <see cref="FairAffinityFunction"/>.
+    /// <see cref="RendezvousAffinityFunction"/>.
     /// </summary>
     public interface IAffinityFunction
     {

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
index a5b9712..cff054d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Cache/Configuration/CacheConfiguration.cs
@@ -29,7 +29,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cache;
     using Apache.Ignite.Core.Cache.Affinity;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cache.Eviction;
     using Apache.Ignite.Core.Cache.Expiry;
@@ -82,27 +81,9 @@ namespace Apache.Ignite.Core.Cache.Configuration
         /// <summary> Default rebalance batch size in bytes. </summary>
         public const int DefaultRebalanceBatchSize = 512*1024; // 512K
 
-        /// <summary> Default maximum eviction queue ratio. </summary>
-        public const float DefaultMaxEvictionOverflowRatio = 10;
-
-        /// <summary> Default eviction synchronized flag. </summary>
-        public const bool DefaultEvictSynchronized = false;
-
-        /// <summary> Default eviction key buffer size for batching synchronized evicts. </summary>
-        public const int DefaultEvictSynchronizedKeyBufferSize = 1024;
-
-        /// <summary> Default synchronous eviction timeout. </summary>
-        public static readonly TimeSpan DefaultEvictSynchronizedTimeout = TimeSpan.FromMilliseconds(10000);
-
-        /// <summary> Default synchronous eviction concurrency level. </summary>
-        public const int DefaultEvictSynchronizedConcurrencyLevel = 4;
-
         /// <summary> Default value for eager ttl flag. </summary>
         public const bool DefaultEagerTtl = true;
 
-        /// <summary> Default off-heap storage size is {@code -1} which means that off-heap storage is disabled. </summary>
-        public const long DefaultOffHeapMaxMemory = -1;
-
         /// <summary> Default value for 'maxConcurrentAsyncOps'. </summary>
         public const int DefaultMaxConcurrentAsyncOperations = 500;
 
@@ -171,17 +152,12 @@ namespace Apache.Ignite.Core.Cache.Configuration
             CacheMode = DefaultCacheMode;
             CopyOnRead = DefaultCopyOnRead;
             EagerTtl = DefaultEagerTtl;
-            EvictSynchronizedKeyBufferSize = DefaultEvictSynchronizedKeyBufferSize;
-            EvictSynchronized = DefaultEvictSynchronized;
-            EvictSynchronizedConcurrencyLevel = DefaultEvictSynchronizedConcurrencyLevel;
-            EvictSynchronizedTimeout = DefaultEvictSynchronizedTimeout;
             Invalidate = DefaultInvalidate;
             KeepBinaryInStore = DefaultKeepVinaryInStore;
             LoadPreviousValue = DefaultLoadPreviousValue;
             LockTimeout = DefaultLockTimeout;
             LongQueryWarningTimeout = DefaultLongQueryWarningTimeout;
             MaxConcurrentAsyncOperations = DefaultMaxConcurrentAsyncOperations;
-            MaxEvictionOverflowRatio = DefaultMaxEvictionOverflowRatio;
             ReadFromBackup = DefaultReadFromBackup;
             RebalanceBatchSize = DefaultRebalanceBatchSize;
             RebalanceMode = DefaultRebalanceMode;
@@ -234,17 +210,12 @@ namespace Apache.Ignite.Core.Cache.Configuration
             CacheMode = (CacheMode) reader.ReadInt();
             CopyOnRead = reader.ReadBoolean();
             EagerTtl = reader.ReadBoolean();
-            EvictSynchronized = reader.ReadBoolean();
-            EvictSynchronizedConcurrencyLevel = reader.ReadInt();
-            EvictSynchronizedKeyBufferSize = reader.ReadInt();
-            EvictSynchronizedTimeout = reader.ReadLongAsTimespan();
             Invalidate = reader.ReadBoolean();
             KeepBinaryInStore = reader.ReadBoolean();
             LoadPreviousValue = reader.ReadBoolean();
             LockTimeout = reader.ReadLongAsTimespan();
             LongQueryWarningTimeout = reader.ReadLongAsTimespan();
             MaxConcurrentAsyncOperations = reader.ReadInt();
-            MaxEvictionOverflowRatio = reader.ReadFloat();
             Name = reader.ReadString();
             ReadFromBackup = reader.ReadBoolean();
             RebalanceBatchSize = reader.ReadInt();
@@ -295,17 +266,12 @@ namespace Apache.Ignite.Core.Cache.Configuration
             writer.WriteInt((int) CacheMode);
             writer.WriteBoolean(CopyOnRead);
             writer.WriteBoolean(EagerTtl);
-            writer.WriteBoolean(EvictSynchronized);
-            writer.WriteInt(EvictSynchronizedConcurrencyLevel);
-            writer.WriteInt(EvictSynchronizedKeyBufferSize);
-            writer.WriteLong((long) EvictSynchronizedTimeout.TotalMilliseconds);
             writer.WriteBoolean(Invalidate);
             writer.WriteBoolean(KeepBinaryInStore);
             writer.WriteBoolean(LoadPreviousValue);
             writer.WriteLong((long) LockTimeout.TotalMilliseconds);
             writer.WriteLong((long) LongQueryWarningTimeout.TotalMilliseconds);
             writer.WriteInt(MaxConcurrentAsyncOperations);
-            writer.WriteFloat(MaxEvictionOverflowRatio);
             writer.WriteString(Name);
             writer.WriteBoolean(ReadFromBackup);
             writer.WriteInt(RebalanceBatchSize);
@@ -410,51 +376,6 @@ namespace Apache.Ignite.Core.Cache.Configuration
         public CacheWriteSynchronizationMode WriteSynchronizationMode { get; set; }
 
         /// <summary>
-        /// Gets or sets flag indicating whether eviction is synchronized between primary, backup and near nodes.        
-        /// If this parameter is true and swap is disabled then <see cref="ICache{TK,TV}.LocalEvict"/>
-        /// will involve all nodes where an entry is kept.  
-        /// If this property is set to false then eviction is done independently on different cache nodes.        
-        /// Note that it's not recommended to set this value to true if cache store is configured since it will allow 
-        /// to significantly improve cache performance.
-        /// </summary>
-        [DefaultValue(DefaultEvictSynchronized)]
-        public bool EvictSynchronized { get; set; }
-
-        /// <summary>
-        /// Gets or sets size of the key buffer for synchronized evictions.
-        /// </summary>
-        [DefaultValue(DefaultEvictSynchronizedKeyBufferSize)]
-        public int EvictSynchronizedKeyBufferSize { get; set; }
-
-        /// <summary>
-        /// Gets or sets concurrency level for synchronized evictions. 
-        /// This flag only makes sense with <see cref="EvictSynchronized"/> set to true. 
-        /// When synchronized evictions are enabled, it is possible that local eviction policy will try 
-        /// to evict entries faster than evictions can be synchronized with backup or near nodes. 
-        /// This value specifies how many concurrent synchronous eviction sessions should be allowed 
-        /// before the system is forced to wait and let synchronous evictions catch up with the eviction policy.       
-        /// </summary>
-        [DefaultValue(DefaultEvictSynchronizedConcurrencyLevel)]
-        public int EvictSynchronizedConcurrencyLevel { get; set; }
-
-        /// <summary>
-        /// Gets or sets timeout for synchronized evictions
-        /// </summary>
-        [DefaultValue(typeof(TimeSpan), "00:00:10")]
-        public TimeSpan EvictSynchronizedTimeout { get; set; }
-
-        /// <summary>
-        /// This value denotes the maximum size of eviction queue in percents of cache size 
-        /// in case of distributed cache (replicated and partitioned) and using synchronized eviction
-        /// <para/>        
-        /// That queue is used internally as a buffer to decrease network costs for synchronized eviction. 
-        /// Once queue size reaches specified value all required requests for all entries in the queue 
-        /// are sent to remote nodes and the queue is cleared.
-        /// </summary>
-        [DefaultValue(DefaultMaxEvictionOverflowRatio)]
-        public float MaxEvictionOverflowRatio { get; set; }
-
-        /// <summary>
         /// Gets or sets flag indicating whether expired cache entries will be eagerly removed from cache. 
         /// When set to false, expired entries will be removed on next entry access.        
         /// </summary>
@@ -692,7 +613,7 @@ namespace Apache.Ignite.Core.Cache.Configuration
         /// Gets or sets the affinity function to provide mapping from keys to nodes.
         /// <para />
         /// Predefined implementations:
-        /// <see cref="RendezvousAffinityFunction"/>, <see cref="FairAffinityFunction"/>.
+        /// <see cref="RendezvousAffinityFunction"/>.
         /// </summary>
         public IAffinityFunction AffinityFunction { get; set; }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index 569925f..7e0790d 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@ -554,35 +554,6 @@
                                             <xs:documentation>Write synchronization mode. This mode controls whether the main caller should wait for update on other nodes to complete or not.</xs:documentation>
                                         </xs:annotation>
                                     </xs:attribute>
-                                    <xs:attribute name="evictSynchronized" type="xs:boolean">
-                                        <xs:annotation>
-                                            <xs:documentation>
-                                                Flag indicating whether eviction is synchronized between primary, backup and near nodes. If this parameter is true and swap is disabled then ICache.LocalEvict will involve all nodes where an entry is kept. If this property is set to false then eviction is done independently on different cache nodes. Note that it's not recommended to set this value to true if cache store is configured since it will allow to significantly improve cache performance.
-                                            </xs:documentation>
-                                        </xs:annotation>
-                                    </xs:attribute>
-                                    <xs:attribute name="evictSynchronizedKeyBufferSize" type="xs:int">
-                                        <xs:annotation>
-                                            <xs:documentation>Size of the key buffer for synchronized evictions.</xs:documentation>
-                                        </xs:annotation>
-                                    </xs:attribute>
-                                    <xs:attribute name="evictSynchronizedConcurrencyLevel" type="xs:int">
-                                        <xs:annotation>
-                                            <xs:documentation>
-                                                Concurrency level for synchronized evictions. This flag only makes sense with EvictSynchronized set to true. When synchronized evictions are enabled, it is possible that local eviction policy will try to evict entries faster than evictions can be synchronized with backup or near nodes. This value specifies how many concurrent synchronous eviction sessions should be allowed before the system is forced to wait and let synchronous evictions catch up with the eviction policy.
-                                            </xs:documentation>
-                                        </xs:annotation>
-                                    </xs:attribute>
-                                    <xs:attribute name="evictSynchronizedTimeout" type="xs:string">
-                                        <xs:annotation>
-                                            <xs:documentation>Timeout for synchronized evictions</xs:documentation>
-                                        </xs:annotation>
-                                    </xs:attribute>
-                                    <xs:attribute name="maxEvictionOverflowRatio" type="xs:decimal">
-                                        <xs:annotation>
-                                            <xs:documentation>This value denotes the maximum size of eviction queue in percents of cache size in case of distributed cache (replicated and partitioned) and using synchronized eviction</xs:documentation>
-                                        </xs:annotation>
-                                    </xs:attribute>
                                     <xs:attribute name="startSize" type="xs:int">
                                         <xs:annotation>
                                             <xs:documentation>Initial cache size which will be used to pre-create internal hash table after start.</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/b62d4464/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Affinity/AffinityFunctionSerializer.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Affinity/AffinityFunctionSerializer.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Affinity/AffinityFunctionSerializer.cs
index 73afe38..15239c8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Affinity/AffinityFunctionSerializer.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/Affinity/AffinityFunctionSerializer.cs
@@ -24,7 +24,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Affinity
     using System.Linq;
     using Apache.Ignite.Core.Binary;
     using Apache.Ignite.Core.Cache.Affinity;
-    using Apache.Ignite.Core.Cache.Affinity.Fair;
     using Apache.Ignite.Core.Cache.Affinity.Rendezvous;
     using Apache.Ignite.Core.Cluster;
     using Apache.Ignite.Core.Common;
@@ -41,9 +40,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Affinity
         private const byte TypeCodeNull = 0;
 
         /** */
-        private const byte TypeCodeFair = 1;
-
-        /** */
         private const byte TypeCodeRendezvous = 2;
 
         /** */
@@ -68,11 +64,11 @@ namespace Apache.Ignite.Core.Impl.Cache.Affinity
             // 4) Override flags
             // 5) User object
 
-            var p = fun as AffinityFunctionBase;
+            var p = fun as RendezvousAffinityFunction;
 
             if (p != null)
             {
-                writer.WriteByte(p is FairAffinityFunction ? TypeCodeFair : TypeCodeRendezvous);
+                writer.WriteByte(TypeCodeRendezvous);
                 writer.WriteInt(p.Partitions);
                 writer.WriteBoolean(p.ExcludeNeighbors);
 
@@ -113,13 +109,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Affinity
             {
                 Debug.Assert(overrideFlags != UserOverrides.None);
 
-                var fair = userFunc as FairAffinityFunction;
-                if (fair != null)
-                {
-                    fair.Partitions = partitions;
-                    fair.ExcludeNeighbors = exclNeighbors;
-                }
-
                 var rendezvous = userFunc as RendezvousAffinityFunction;
                 if (rendezvous != null)
                 {
@@ -135,9 +124,6 @@ namespace Apache.Ignite.Core.Impl.Cache.Affinity
 
             switch (typeCode)
             {
-                case TypeCodeFair:
-                    fun = new FairAffinityFunction();
-                    break;
                 case TypeCodeRendezvous:
                     fun = new RendezvousAffinityFunction();
                     break;


[38/57] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-3477-master' into ignite-3477-master

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-3477-master' into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: 085c612c66c2b568f9a658a06baa9907dddb9489
Parents: 8daada7 8122099
Author: Dmitriy Govorukhin <dg...@gridgain.com>
Authored: Tue Apr 11 13:11:43 2017 +0300
Committer: Dmitriy Govorukhin <dg...@gridgain.com>
Committed: Tue Apr 11 13:11:43 2017 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    3 -
 assembly/dependencies-fabric-lgpl.xml           |    3 -
 assembly/dependencies-fabric.xml                |    3 -
 assembly/dependencies-schema-import.xml         |   57 -
 assembly/release-base.xml                       |    2 -
 assembly/release-fabric-base.xml                |    9 -
 assembly/release-schema-import.xml              |   50 -
 bin/ignite-schema-import.bat                    |  110 -
 bin/ignite-schema-import.sh                     |   87 -
 examples/README-LGPL.txt                        |    4 +-
 examples/README.txt                             |    2 -
 examples/pom-standalone-lgpl.xml                |    1 -
 examples/pom-standalone.xml                     |    1 -
 examples/pom.xml                                |    1 -
 examples/schema-import/README.txt               |   38 -
 examples/schema-import/bin/db-init.sql          |   28 -
 examples/schema-import/bin/h2-server.bat        |   80 -
 examples/schema-import/bin/h2-server.sh         |   66 -
 .../schema-import/bin/schema-import.properties  |   28 -
 examples/schema-import/pom-standalone.xml       |   90 -
 examples/schema-import/pom.xml                  |  101 -
 .../org/apache/ignite/schema/CacheConfig.java   |   36 -
 .../java/org/apache/ignite/schema/Demo.java     |  134 --
 .../java/org/apache/ignite/schema/DemoNode.java |   38 -
 .../ignite/schema/H2DataSourceFactory.java      |   35 -
 .../java/org/apache/ignite/schema/Person.java   |   44 -
 .../org/apache/ignite/schema/PersonKey.java     |   37 -
 .../JettyRestProcessorAbstractSelfTest.java     |    3 +-
 .../org/apache/ignite/IgniteFileSystem.java     |   26 +-
 .../affinity/fair/FairAffinityFunction.java     | 1159 ----------
 .../cache/affinity/fair/package-info.java       |   21 -
 .../configuration/DataPageEvictionMode.java     |   32 +
 .../configuration/FileSystemConfiguration.java  |    6 +-
 .../configuration/IgniteConfiguration.java      |    4 +-
 .../MemoryPolicyConfiguration.java              |   70 +
 .../configuration/NearCacheConfiguration.java   |   56 +-
 .../ignite/internal/IgniteEventsImpl.java       |    8 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |    4 +-
 .../binary/builder/BinaryObjectBuilderImpl.java |   36 +-
 .../eventstorage/GridEventStorageManager.java   |   12 +-
 .../ignite/internal/pagemem/PageSupport.java    |   10 +
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |    8 +
 .../cache/CacheOffheapEvictionManager.java      |    6 +-
 .../processors/cache/GridCacheAdapter.java      |    2 +
 .../processors/cache/GridCacheAtomicFuture.java |    2 +-
 .../cache/GridCacheConcurrentMapImpl.java       |   32 +-
 .../processors/cache/GridCacheEntryEx.java      |    5 +-
 .../cache/GridCacheEvictionManager.java         |   61 +-
 .../processors/cache/GridCacheMapEntry.java     |   32 +-
 .../processors/cache/GridCacheMvccManager.java  |   84 +-
 .../cache/GridDeferredAckMessageSender.java     |   11 +-
 .../cache/IgniteCacheOffheapManagerImpl.java    |   34 +-
 .../processors/cache/database/CacheDataRow.java |    5 +
 .../cache/database/CacheDataRowAdapter.java     |  116 +-
 .../IgniteCacheDatabaseSharedManager.java       |  126 +-
 .../processors/cache/database/MemoryPolicy.java |   19 +-
 .../evict/FairFifoPageEvictionTracker.java      |   74 +
 .../database/evict/NoOpPageEvictionTracker.java |   50 +
 .../evict/PageAbstractEvictionTracker.java      |  243 ++
 .../database/evict/PageEvictionTracker.java     |   52 +
 .../evict/Random2LruPageEvictionTracker.java    |  180 ++
 .../evict/RandomLruPageEvictionTracker.java     |  157 ++
 .../cache/database/freelist/FreeListImpl.java   |   62 +-
 .../cache/database/tree/io/DataPageIO.java      |  110 +-
 .../distributed/dht/GridDhtLocalPartition.java  |   49 +-
 .../GridDhtAtomicAbstractUpdateFuture.java      |    4 +-
 .../dht/atomic/GridDhtAtomicCache.java          |    2 +
 .../GridNearAtomicAbstractUpdateFuture.java     |    2 +-
 .../GridNearAtomicSingleUpdateFuture.java       |   21 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   23 +-
 .../cache/distributed/near/GridNearTxLocal.java |    2 +
 .../distributed/near/GridNearTxRemote.java      |    4 +-
 .../local/atomic/GridLocalAtomicCache.java      |    6 +-
 .../cache/transactions/IgniteTxHandler.java     |    2 +-
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |    7 -
 .../IgniteCacheObjectProcessorImpl.java         |   16 -
 .../internal/processors/igfs/IgfsAsyncImpl.java |    8 +-
 .../internal/processors/igfs/IgfsImpl.java      |   20 +-
 .../utils/PlatformConfigurationUtils.java       |   68 +-
 .../org/apache/ignite/internal/util/F0.java     |  196 +-
 .../ignite/internal/util/lang/GridFunc.java     |  620 +----
 .../visor/igfs/VisorIgfsFormatTask.java         |    2 +-
 .../visor/node/VisorIgfsConfiguration.java      |    2 +-
 .../deployment/local/LocalDeploymentSpi.java    |    5 +-
 .../spi/eventstorage/NoopEventStorageSpi.java   |   53 +
 .../test/config/store/jdbc/ignite-jdbc-type.xml |    2 +-
 .../GridCacheAffinityBackupsSelfTest.java       |   20 +-
 .../ignite/IgniteCacheAffinitySelfTest.java     |   12 +-
 .../affinity/AffinityClientNodeSelfTest.java    |   15 +-
 .../affinity/AffinityHistoryCleanupTest.java    |    3 +-
 .../fair/FairAffinityDynamicCacheSelfTest.java  |   86 -
 ...airAffinityFunctionBackupFilterSelfTest.java |   44 -
 ...ffinityFunctionExcludeNeighborsSelfTest.java |   31 -
 .../fair/FairAffinityFunctionNodesSelfTest.java |  247 --
 .../fair/FairAffinityFunctionSelfTest.java      |   31 -
 .../affinity/fair/FairAffinityNodesRestart.java |  130 --
 .../local/LocalAffinityFunctionTest.java        |    4 +-
 .../cache/store/jdbc/model/Organization.java    |    2 -
 .../cache/store/jdbc/model/OrganizationKey.java |    2 -
 .../ignite/cache/store/jdbc/model/Person.java   |    2 -
 .../store/jdbc/model/PersonComplexKey.java      |    4 +-
 .../cache/store/jdbc/model/PersonKey.java       |    2 -
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |    2 +-
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |    2 +-
 .../ignite/igfs/IgfsFragmentizerSelfTest.java   |    2 +-
 .../GridEventStorageDefaultExceptionTest.java   |   94 +
 ...CacheExchangeMessageDuplicatedStateTest.java |   33 -
 .../cache/CrossCacheTxRandomOperationsTest.java |   36 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |    1 +
 .../processors/cache/GridCacheTestEntryEx.java  |    2 +-
 .../GridCacheVersionTopologyChangeTest.java     |    5 -
 .../IgniteClientAffinityAssignmentSelfTest.java |   20 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |    3 -
 ...ObjectsAtomicNearDisabledOnheapSelfTest.java |   17 +
 ...dCacheBinaryObjectsAtomicOnheapSelfTest.java |   17 +
 ...tsPartitionedNearDisabledOnheapSelfTest.java |   17 +
 ...eBinaryObjectsPartitionedOnheapSelfTest.java |   17 +
 ...eLateAffinityAssignmentFairAffinityTest.java |   32 -
 ...teCacheClientNodePartitionsExchangeTest.java |   18 +-
 .../IgniteCacheTxFairAffinityNodeJoinTest.java  |   35 -
 ...arDisabledFairAffinityPutGetRestartTest.java |   35 -
 .../dht/GridCacheDhtEntrySelfTest.java          |    4 +-
 ...ledAtomicOnheapMultiNodeFullApiSelfTest.java |   10 +
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 .../AtomicPutAllChangingTopologyTest.java       |    4 +-
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...micFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...derFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...nedAtomicOnheapMultiNodeFullApiSelfTest.java |   10 +
 ...xcludeNeighborsMultiNodeFullApiSelfTest.java |   36 -
 ...tedFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...nedFairAffinityMultiNodeFullApiSelfTest.java |   37 -
 .../paged/PageEvictionAbstractTest.java         |  124 +
 .../paged/PageEvictionMultinodeTest.java        |  110 +
 .../paged/PageEvictionReadThroughTest.java      |  140 ++
 .../paged/PageEvictionTouchOrderTest.java       |  109 +
 .../paged/PageEvictionWithRebalanceTest.java    |   81 +
 .../Random2LruPageEvictionMultinodeTest.java    |   30 +
 ...Random2LruPageEvictionWithRebalanceTest.java |   30 +
 .../RandomLruPageEvictionMultinodeTest.java     |   30 +
 .../RandomLruPageEvictionWithRebalanceTest.java |   30 +
 .../cache/eviction/paged/TestObject.java        |   78 +
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...omicFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   36 -
 ...rderFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...onedFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 .../database/FreeListImplSelfTest.java          |   13 +-
 ...faultIgfsSecondaryFileSystemTestAdapter.java |    2 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |    2 +-
 .../processors/igfs/IgfsAbstractSelfTest.java   |    4 +-
 ...sCachePerBlockLruEvictionPolicySelfTest.java |    2 +-
 .../igfs/IgfsMetaManagerSelfTest.java           |    2 +-
 .../processors/igfs/IgfsMetricsSelfTest.java    |    2 +-
 .../internal/processors/igfs/IgfsMock.java      |    4 +-
 .../processors/igfs/IgfsProcessorSelfTest.java  |    8 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |    2 +-
 .../processors/igfs/IgfsTaskSelfTest.java       |    2 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |    2 +-
 .../configvariations/ConfigVariations.java      |    2 -
 .../testframework/junits/GridAbstractTest.java  |   56 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |   13 +
 .../IgniteCacheFailoverTestSuite.java           |    4 -
 ...IgniteCacheFullApiMultiJvmSelfTestSuite.java |   15 -
 .../IgniteCacheFullApiSelfTestSuite.java        |   24 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    9 +-
 .../testsuites/IgniteCacheTestSuite2.java       |    4 -
 .../testsuites/IgniteCacheTestSuite5.java       |   10 -
 .../testsuites/IgniteComputeGridTestSuite.java  |    2 +
 .../impl/HadoopTaskExecutionSelfTest.java       |    2 +-
 ...opClientProtocolMultipleServersSelfTest.java |    2 +-
 .../client/HadoopClientProtocolSelfTest.java    |    2 +-
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |    2 +-
 .../cache/hibernate/HibernateCacheProxy.java    |    2 +-
 .../cache/hibernate/HibernateCacheProxy.java    |    2 +-
 .../processors/query/h2/opt/GridH2Row.java      |    5 +
 ...QueryNodeRestartDistributedJoinSelfTest.java |   50 +-
 modules/log4j2/pom.xml                          |    4 +-
 .../ignite/logger/log4j2/Log4J2Logger.java      |   23 +-
 .../include/ignite/impl/binary/binary_utils.h   |    1 -
 .../ignite/impl/binary/binary_writer_impl.h     |    5 +-
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |   63 +-
 .../IgniteConfigurationSerializerTest.cs        |   13 +-
 .../IgniteConfigurationTest.cs                  |   15 +-
 .../Apache.Ignite.Core.csproj                   |    3 +
 .../Events/IEventStorageSpi.cs                  |   33 +
 .../Events/MemoryEventStorageSpi.cs             |  100 +
 .../Events/NoopEventStorageSpi.cs               |   27 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |   48 +-
 .../IgniteConfigurationSection.xsd              |   22 +
 .../Plugin/IPluginConfiguration.cs              |    4 +-
 .../Datagrid/MultiTieredCacheExample.cs         |    2 -
 modules/schema-import-db/README.txt             |    4 -
 modules/schema-import-db/pom.xml                |   55 -
 .../apache/ignite/schema/parser/DbColumn.java   |   88 -
 .../ignite/schema/parser/DbMetadataReader.java  |  147 --
 .../apache/ignite/schema/parser/DbTable.java    |   82 -
 .../parser/dialect/DB2MetadataDialect.java      |   33 -
 .../parser/dialect/DatabaseMetadataDialect.java |  102 -
 .../parser/dialect/JdbcMetadataDialect.java     |  199 --
 .../parser/dialect/MySQLMetadataDialect.java    |   82 -
 .../parser/dialect/OracleMetadataDialect.java   |  360 ---
 modules/schema-import/README.txt                |  216 --
 modules/schema-import/pom.xml                   |  119 -
 .../main/java/media/data_connection_48x48.png   |  Bin 4443 -> 0 bytes
 .../src/main/java/media/error_48x48.png         |  Bin 4349 -> 0 bytes
 .../src/main/java/media/ignite_128x128.png      |  Bin 4917 -> 0 bytes
 .../src/main/java/media/ignite_16x16.png        |  Bin 608 -> 0 bytes
 .../src/main/java/media/ignite_24x24.png        |  Bin 930 -> 0 bytes
 .../src/main/java/media/ignite_32x32.png        |  Bin 1203 -> 0 bytes
 .../src/main/java/media/ignite_48x48.png        |  Bin 1868 -> 0 bytes
 .../src/main/java/media/ignite_64x64.png        |  Bin 2453 -> 0 bytes
 .../src/main/java/media/information_48x48.png   |  Bin 4102 -> 0 bytes
 .../src/main/java/media/question_48x48.png      |  Bin 3857 -> 0 bytes
 .../src/main/java/media/sign_warning_48x48.png  |  Bin 2988 -> 0 bytes
 .../schema-import/src/main/java/media/style.css |  134 --
 .../src/main/java/media/text_tree_48x48.png     |  Bin 2567 -> 0 bytes
 .../ignite/schema/generator/CodeGenerator.java  |  831 -------
 .../ignite/schema/generator/GeneratorUtils.java |   70 -
 .../ignite/schema/generator/XmlGenerator.java   |  446 ----
 .../ignite/schema/model/PojoDescriptor.java     |  497 ----
 .../apache/ignite/schema/model/PojoField.java   |  461 ----
 .../ignite/schema/model/SchemaDescriptor.java   |   62 -
 .../schema/parser/DatabaseMetadataParser.java   |  115 -
 .../ignite/schema/ui/ConfirmCallable.java       |   83 -
 .../org/apache/ignite/schema/ui/Controls.java   |  697 ------
 .../org/apache/ignite/schema/ui/GridPaneEx.java |  180 --
 .../org/apache/ignite/schema/ui/MessageBox.java |  274 ---
 .../apache/ignite/schema/ui/ModalDialog.java    |   50 -
 .../ignite/schema/ui/SchemaImportApp.java       | 2115 ------------------
 .../ignite/schema/ui/TextColumnValidator.java   |   32 -
 .../schema/test/AbstractSchemaImportTest.java   |  181 --
 .../test/generator/CodeGeneratorTest.java       |   81 -
 .../schema/test/generator/XmlGeneratorTest.java |   42 -
 .../ignite/schema/test/model/CacheConfig.txt    |  409 ----
 .../apache/ignite/schema/test/model/Objects.txt |  531 -----
 .../ignite/schema/test/model/ObjectsKey.txt     |   96 -
 .../ignite/schema/test/model/Primitives.txt     |  535 -----
 .../ignite/schema/test/model/PrimitivesKey.txt  |   96 -
 .../org/apache/ignite/schema/test/model/Tst.txt |  535 -----
 .../apache/ignite/schema/test/model/TstKey.txt  |   96 -
 .../schema/test/model/ignite-type-metadata.xml  |  666 ------
 .../test/parser/DbMetadataParserTest.java       |  134 --
 .../testsuites/IgniteSchemaImportTestSuite.java |   42 -
 .../ignite/internal/GridFactorySelfTest.java    |    3 +
 modules/web-console/web-agent/pom.xml           |   12 -
 .../ignite/console/agent/db/DbColumn.java       |   88 +
 .../console/agent/db/DbMetadataReader.java      |  142 ++
 .../apache/ignite/console/agent/db/DbTable.java |   82 +
 .../agent/db/dialect/DB2MetadataDialect.java    |   33 +
 .../db/dialect/DatabaseMetadataDialect.java     |  102 +
 .../agent/db/dialect/JdbcMetadataDialect.java   |  199 ++
 .../agent/db/dialect/MySQLMetadataDialect.java  |   82 +
 .../agent/db/dialect/OracleMetadataDialect.java |  359 +++
 .../agent/handlers/DatabaseListener.java        |   20 +-
 .../dml/IgniteSqlDeleteFilteredBenchmark.java   |    5 +-
 .../dml/IgniteSqlUpdateFilteredBenchmark.java   |    5 +-
 pom.xml                                         |  121 -
 263 files changed, 4234 insertions(+), 16090 deletions(-)
----------------------------------------------------------------------



[06/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
deleted file mode 100644
index 17632de..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQueryAbstractSelfTest.java
+++ /dev/null
@@ -1,450 +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.apache.ignite.internal.processors.cache.query;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Callable;
-import javax.cache.Cache;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.query.ScanQuery;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.lang.IgniteBiPredicate;
-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;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
-
-/**
- * Tests scan query over entries in offheap and swap.
- */
-public abstract class GridCacheSwapScanQueryAbstractSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** */
-    protected static final String ATOMIC_PERSON_CACHE_NAME = "atomicPerson";
-
-    /** */
-    protected static final String ATOMIC_PRIMITIVE_CACHE_NAME = "atomicPrimitive";
-
-    /** */
-    protected static final String ATOMIC_BYTREARR_CACHE_NAME = "atomicByteArr";
-
-    /** */
-    protected static final String TRANSACTIONAL_PERSON_CACHE_NAME = "transactionalPerson";
-
-    /** */
-    protected static final String TRANSACTIONAL_PRIMITIVE_CACHE_NAME = "transactionalPrimitive";
-
-    /** */
-    protected static final String TRANSACTIONAL_BYTEARR_CACHE_NAME = "transactionalByteArr";
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        cfg.setCacheConfiguration(
-            cacheConfiguration(ATOMIC_PERSON_CACHE_NAME, ATOMIC, Key.class, Person.class),
-            cacheConfiguration(TRANSACTIONAL_PERSON_CACHE_NAME, TRANSACTIONAL, Key.class, Person.class),
-            cacheConfiguration(ATOMIC_PRIMITIVE_CACHE_NAME, ATOMIC, String.class, Long.class),
-            cacheConfiguration(TRANSACTIONAL_PRIMITIVE_CACHE_NAME, TRANSACTIONAL, String.class, Long.class),
-            cacheConfiguration(ATOMIC_BYTREARR_CACHE_NAME, ATOMIC,  Integer.class, byte[].class),
-            cacheConfiguration(TRANSACTIONAL_BYTEARR_CACHE_NAME, TRANSACTIONAL,  Integer.class, byte[].class));
-
-        return cfg;
-    }
-
-    /**
-     * @param name Name.
-     * @param atomicityMode Atomicity mode.
-     * @param clsK Class k.
-     * @param clsV Class v.
-     * @return Cache configuration.
-     */
-    protected CacheConfiguration cacheConfiguration(String name, CacheAtomicityMode atomicityMode,
-        Class<?> clsK, Class<?> clsV) {
-        CacheConfiguration ccfg = new CacheConfiguration();
-
-        ccfg.setName(name);
-
-        ccfg.setMemoryMode(OFFHEAP_TIERED);
-
-        ccfg.setOffHeapMaxMemory(1024); // Set small offheap size to provoke eviction in swap.
-
-        ccfg.setCacheMode(PARTITIONED);
-
-        ccfg.setAtomicityMode(atomicityMode);
-
-        ccfg.setAtomicWriteOrderMode(PRIMARY);
-
-        ccfg.setWriteSynchronizationMode(FULL_SYNC);
-
-        ccfg.setIndexedTypes(clsK, clsV);
-
-        return ccfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        startGrids(4);
-
-        awaitPartitionMapExchange();
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQuery() throws Exception {
-        checkQuery(grid(0).cache(ATOMIC_PERSON_CACHE_NAME), false);
-
-        checkQuery(grid(0).cache(TRANSACTIONAL_PERSON_CACHE_NAME), false);
-
-        checkQuery(grid(0).cache(ATOMIC_PERSON_CACHE_NAME), true);
-
-        checkQuery(grid(0).cache(TRANSACTIONAL_PERSON_CACHE_NAME), true);
-    }
-
-    /**
-     * @param cache Cache.
-     * @param scanPartitions Scan partitions.
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkQuery(IgniteCache cache, boolean scanPartitions) throws Exception {
-        final int ENTRY_CNT = 500;
-
-        Map<Integer, Map<Key, Person>> entries = new HashMap<>();
-
-        Affinity<Object> aff = ignite(0).affinity(cache.getName());
-
-        for (int i = 0; i < ENTRY_CNT; i++) {
-            Key key = new Key(i);
-            Person val = new Person("p-" + i, i);
-
-            int part = aff.partition(key);
-
-            cache.getAndPut(key, val);
-
-            Map<Key, Person> partEntries = entries.get(part);
-
-            if (partEntries == null)
-                entries.put(part, partEntries = new HashMap<>());
-
-            partEntries.put(key, val);
-        }
-
-        try {
-            int partitions = scanPartitions ? aff.partitions() : 1;
-
-            for (int i = 0; i < partitions; i++) {
-                ScanQuery<Key, Person> qry = new ScanQuery<>(new IgniteBiPredicate<Key, Person>() {
-                    @Override public boolean apply(Key key, Person p) {
-                        assertEquals(key.id, (Integer)p.salary);
-
-                        return key.id % 2 == 0;
-                    }
-                });
-
-                if (scanPartitions)
-                    qry.setPartition(i);
-
-                List<Cache.Entry<Key, Person>> res = cache.query(qry).getAll();
-
-                if (!scanPartitions)
-                    assertEquals(ENTRY_CNT / 2, res.size());
-
-                for (Cache.Entry<Key, Person> e : res) {
-                    Key k = e.getKey();
-                    Person p = e.getValue();
-
-                    assertEquals(k.id, (Integer)p.salary);
-                    assertEquals(0, k.id % 2);
-
-                    if (scanPartitions) {
-                        Map<Key, Person> partEntries = entries.get(i);
-
-                        assertEquals(p, partEntries.get(k));
-                    }
-                }
-
-                qry = new ScanQuery<>();
-
-                if (scanPartitions)
-                    qry.setPartition(i);
-
-                res = cache.query(qry).getAll();
-
-                if (!scanPartitions)
-                    assertEquals(ENTRY_CNT, res.size());
-            }
-
-            testMultithreaded(cache, ENTRY_CNT / 2);
-        }
-        finally {
-            for (int i = 0; i < ENTRY_CNT; i++)
-                assertTrue(cache.remove(new Key(i)));
-        }
-    }
-
-    /**
-     * @param cache Cache.
-     * @param expCnt Expected entries in query result.
-     * @throws Exception If failed.
-     */
-    private void testMultithreaded(final IgniteCache cache, final int expCnt) throws Exception {
-        log.info("Starting multithreaded queries.");
-
-        GridTestUtils.runMultiThreaded(new Callable<Void>() {
-            @SuppressWarnings("unchecked")
-            @Override public Void call() throws Exception {
-                ScanQuery<Key, Person> qry = new ScanQuery<>(new IgniteBiPredicate<Key, Person>() {
-                    @Override public boolean apply(Key key, Person p) {
-                        assertEquals(key.id, (Integer)p.salary);
-
-                        return key.id % 2 == 0;
-                    }
-                });
-
-                for (int i = 0; i < 250; i++) {
-                    List<Cache.Entry<Key, Person>> res = cache.query(qry).getAll();
-
-                    assertEquals(expCnt, res.size());
-
-                    if (i % 50 == 0)
-                        log.info("Iteration " + i);
-                }
-
-                return null;
-            }
-        }, 8, "test");
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQueryPrimitives() throws Exception {
-        checkQueryPrimitives(grid(0).cache(ATOMIC_PRIMITIVE_CACHE_NAME));
-        checkQueryPrimitives(grid(0).cache(TRANSACTIONAL_PRIMITIVE_CACHE_NAME));
-    }
-
-    /**
-     * @param cache Cache.
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkQueryPrimitives(IgniteCache cache) throws Exception {
-        final int ENTRY_CNT = 500;
-
-        for (int i = 0; i < ENTRY_CNT; i++)
-            cache.getAndPut(String.valueOf(i), (long)i);
-
-        try {
-            ScanQuery<String, Long> qry = new ScanQuery<>(new IgniteBiPredicate<String, Long>() {
-                @Override public boolean apply(String key, Long val) {
-                    assertEquals(key, String.valueOf(val));
-
-                    return val % 2 == 0;
-                }
-            });
-
-            Collection<Cache.Entry<String, Long>> res = cache.query(qry).getAll();
-
-            assertEquals(ENTRY_CNT / 2, res.size());
-
-            for (Cache.Entry<String, Long> e : res) {
-                String key = e.getKey();
-                Long val = e.getValue();
-
-                assertEquals(key, String.valueOf(val));
-
-                assertEquals(0, val % 2);
-            }
-
-            qry = new ScanQuery<>();
-
-            res = cache.query(qry).getAll();
-
-            assertEquals(ENTRY_CNT, res.size());
-        }
-        finally {
-            for (int i = 0; i < ENTRY_CNT; i++)
-                assertTrue(cache.remove(String.valueOf(i)));
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQueryValueByteArray() throws Exception {
-        checkQueryValueByteArray(grid(0).cache(ATOMIC_BYTREARR_CACHE_NAME));
-        checkQueryValueByteArray(grid(0).cache(TRANSACTIONAL_BYTEARR_CACHE_NAME));
-    }
-
-    /**
-     * @param cache Cache.
-     * @throws Exception If failed.
-     */
-    @SuppressWarnings("unchecked")
-    private void checkQueryValueByteArray(IgniteCache cache) throws Exception {
-        final int ENTRY_CNT = 100;
-
-        for (int i = 0; i < ENTRY_CNT; i++)
-            cache.getAndPut(i, new byte[i]);
-
-        try {
-            ScanQuery<Integer, byte[]> qry = new ScanQuery<>(
-                new IgniteBiPredicate<Integer, byte[]>() {
-                    @Override public boolean apply(Integer key, byte[] val) {
-                        assertEquals(key, (Integer)val.length);
-
-                        return key % 2 == 0;
-                    }
-                });
-
-            Collection<Cache.Entry<Integer, byte[]>> res = cache.query(qry).getAll();
-
-            assertEquals(ENTRY_CNT / 2, res.size());
-
-            for (Cache.Entry<Integer, byte[]> e : res) {
-                Integer key = e.getKey();
-                byte[] val = e.getValue();
-
-                assertEquals(key, (Integer)val.length);
-
-                assertEquals(0, key % 2);
-            }
-
-            qry = new ScanQuery<>();
-
-            res = cache.query(qry).getAll();
-
-            assertEquals(ENTRY_CNT, res.size());
-        }
-        finally {
-            for (int i = 0; i < ENTRY_CNT; i++)
-                assertTrue(cache.remove(i));
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class Key {
-        /** */
-        @SuppressWarnings("PublicField")
-        public Integer id;
-
-        /**
-         * @param id ID.
-         */
-        public Key(Integer id) {
-            this.id = id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            if (this == o)
-                return true;
-
-            if (o == null || getClass() != o.getClass())
-                return false;
-
-            Key key = (Key)o;
-
-            return id.equals(key.id);
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id.hashCode();
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class Person {
-        /** */
-        @SuppressWarnings("PublicField")
-        public String name;
-
-        /** */
-        @SuppressWarnings("PublicField")
-        public int salary;
-
-        /**
-         * @param name Name.
-         * @param salary Salary.
-         */
-        public Person(String name, int salary) {
-            this.name = name;
-            this.salary = salary;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            if (this == o)
-                return true;
-
-            if (o == null || getClass() != o.getClass())
-                return false;
-
-            Person person = (Person)o;
-
-            if (salary != person.salary)
-                return false;
-
-            return !(name != null ? !name.equals(person.name) : person.name != null);
-
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            int res = name != null ? name.hashCode() : 0;
-
-            return 31 * res + salary;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
deleted file mode 100644
index 1e21f0c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/GridCacheSwapScanQuerySelfTest.java
+++ /dev/null
@@ -1,25 +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.apache.ignite.internal.processors.cache.query;
-
-/**
- *
- */
-public class GridCacheSwapScanQuerySelfTest extends GridCacheSwapScanQueryAbstractSelfTest {
-    // No-op.
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
index dc104ff..dea491c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/IgniteCacheQueryCacheDestroySelfTest.java
@@ -25,7 +25,6 @@ import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -129,7 +128,6 @@ public class IgniteCacheQueryCacheDestroySelfTest extends GridCommonAbstractTest
 
         cfg.setAtomicityMode(CacheAtomicityMode.ATOMIC)
             .setCacheMode(CacheMode.PARTITIONED)
-            .setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED)
             .setRebalanceMode(CacheRebalanceMode.SYNC)
             .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
             .setRebalanceThrottle(100)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
index f7ceeb8..612043f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousBatchAckTest.java
@@ -24,7 +24,6 @@ import javax.cache.event.CacheEntryListenerException;
 import javax.cache.event.CacheEntryUpdatedListener;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
 import org.apache.ignite.cache.query.QueryCursor;
@@ -45,8 +44,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -128,7 +125,7 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
      * @throws Exception If failed.
      */
     public void testPartition() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, false));
     }
 
     /**
@@ -137,21 +134,21 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
     public void testPartitionWithFilter() throws Exception {
         filterOn.set(true);
 
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED, true));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionNoBackups() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, ATOMIC, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionTx() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, false));
     }
 
     /**
@@ -160,14 +157,14 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
     public void testPartitionTxWithFilter() throws Exception {
         filterOn.set(true);
 
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, ONHEAP_TIERED, true));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionTxNoBackup() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, false));
     }
 
     /**
@@ -176,44 +173,21 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
     public void testPartitionTxNoBackupWithFilter() throws Exception {
         filterOn.set(true);
 
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, ONHEAP_TIERED, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionOffheap() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionOffheapWithFilter() throws Exception {
-        filterOn.set(true);
-
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionTxOffheap() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 1, TRANSACTIONAL, OFFHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicated() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, false));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicatedTx() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, ONHEAP_TIERED, false));
+        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, false));
     }
 
     /**
@@ -222,30 +196,7 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
     public void testReplicatedTxWithFilter() throws Exception {
         filterOn.set(true);
 
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, ONHEAP_TIERED, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedOffheap() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, ATOMIC, OFFHEAP_TIERED, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedTxOffheap() throws Exception {
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, OFFHEAP_TIERED, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedTxOffheapWithFilter() throws Exception {
-        filterOn.set(true);
-
-        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, OFFHEAP_TIERED, true));
+        checkBackupAcknowledgeMessage(cacheConfiguration(REPLICATED, 1, TRANSACTIONAL, true));
     }
 
     /**
@@ -293,7 +244,6 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param filter Filter enabled.
      * @return Cache configuration.
      */
@@ -301,12 +251,11 @@ public class CacheContinuousBatchAckTest extends GridCommonAbstractTest implemen
         CacheMode cacheMode,
         int backups,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode, boolean filter) {
+        boolean filter) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
 
         if (cacheMode == PARTITIONED)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
index 4f398a6..22b8653 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryAsyncFilterListenerTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.IgniteException;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
 import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.query.ContinuousQuery;
@@ -59,9 +58,6 @@ import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -126,119 +122,84 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerTx() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerTxJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInListenerTxOffHeap() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInListenerTxOffHeapJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInListenerTxOffHeapValues() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerAtomic() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerAtomicJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerReplicatedAtomic() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerReplicatedAtomicJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerReplicatedAtomicOffHeapValues() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInListenerAtomicOffHeap() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInListenerAtomicOffHeapValues() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerAtomicWithoutBackup() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerAtomicWithoutBackupJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, true);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListener() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerReplicated() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInListenerReplicatedJCacheApi() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, true);
     }
 
     ///
@@ -249,105 +210,63 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterTx() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterTxJCacheApi() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterTxOffHeap() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterTxOffHeapJCacheApi() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), true, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterTxOffHeapValues() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterAtomic() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterAtomicJCacheApi() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), true, true, true);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC), true, true, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterReplicatedAtomic() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterAtomicOffHeap() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterAtomicOffHeapJCacheApi() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterAtomicOffHeapValues() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterAtomicWithoutBackup() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 0, ATOMIC), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilter() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterReplicated() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterReplicatedJCacheApi() throws Exception {
-        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), true, true, false);
+        testNonDeadLockInFilter(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), true, true, false);
     }
 
     ///
@@ -358,70 +277,42 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterTxSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterTxOffHeapSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_TIERED), false, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterTxOffHeapValuesSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, OFFHEAP_VALUES), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterAtomicSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, ONHEAP_TIERED), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC), false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterReplicatedAtomicSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC, ONHEAP_TIERED), false, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterAtomicOffHeapSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), false, true, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testNonDeadLockInFilterAtomicOffHeapValuesSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, ATOMIC, OFFHEAP_TIERED), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, ATOMIC), false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterAtomicWithoutBackupSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC, ONHEAP_TIERED), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 0, ATOMIC), false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL), false, true, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testNonDeadLockInFilterReplicatedSyncFilter() throws Exception {
-        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL, ONHEAP_TIERED), false, true, false);
+        testNonDeadLockInListener(cacheConfiguration(REPLICATED, 2, TRANSACTIONAL), false, true, false);
     }
 
     /**
@@ -872,20 +763,17 @@ public class CacheContinuousQueryAsyncFilterListenerTest extends GridCommonAbstr
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     protected CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
-        ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + memoryMode + "-" + backups);
+        ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + backups);
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
index 1d014ca..bcc58c0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryExecuteInPrimaryTest.java
@@ -24,7 +24,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
 import org.apache.ignite.cache.query.QueryCursor;
@@ -88,7 +87,6 @@ public class CacheContinuousQueryExecuteInPrimaryTest extends GridCommonAbstract
 
         ccfg.setAtomicityMode(cacheAtomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
index dbaafe1..8713aaf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFactoryFilterRandomOperationTest.java
@@ -62,7 +62,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryFactoryFilterRandomOperationTest.NonSerializableFilter.isAccepted;
 import static org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryRandomOperationsTest.ContinuousDeploy.CLIENT;
@@ -94,7 +93,6 @@ public class CacheContinuousQueryFactoryFilterRandomOperationTest extends CacheC
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         final IgniteCache<Object, Object> cache = grid(0).createCache(ccfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
index f9130ae..36c777b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAbstractSelfTest.java
@@ -57,7 +57,6 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
 import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -108,7 +107,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.MINUTES;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.testframework.GridTestUtils.waitForCondition;
@@ -161,7 +159,6 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
         ccfg.setBackups(backups);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setNearConfiguration(nearCacheConfiguration());
-        ccfg.setMemoryMode(memoryMode());
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -171,13 +168,6 @@ public abstract class CacheContinuousQueryFailoverAbstractSelfTest extends GridC
     }
 
     /**
-     * @return Cache memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /**
      * @return Async callback flag.
      */
     protected boolean asyncCallback() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
deleted file mode 100644
index cc8590d..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheContinuousQueryFailoverAtomicPrimaryWriteOrderOffheapTieredTest
-    extends CacheContinuousQueryFailoverAtomicPrimaryWriteOrderSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
deleted file mode 100644
index cae06c3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryFailoverTxOffheapTieredTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.query.continuous;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class CacheContinuousQueryFailoverTxOffheapTieredTest extends CacheContinuousQueryFailoverTxSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
index 43bf54f..4fa0424 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOperationP2PTest.java
@@ -30,7 +30,6 @@ import javax.cache.event.CacheEntryListenerException;
 import javax.cache.event.CacheEntryUpdatedListener;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
 import org.apache.ignite.cache.query.QueryCursor;
@@ -44,7 +43,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -105,8 +103,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testAtomicClient() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
-            ATOMIC,
-            ONHEAP_TIERED
+            ATOMIC
         );
 
         testContinuousQuery(ccfg, true);
@@ -118,8 +115,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testAtomic() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
-            ATOMIC,
-            ONHEAP_TIERED
+            ATOMIC
         );
 
         testContinuousQuery(ccfg, false);
@@ -131,8 +127,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testAtomicReplicated() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
-            ATOMIC,
-            ONHEAP_TIERED
+            ATOMIC
         );
 
         testContinuousQuery(ccfg, false);
@@ -144,8 +139,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testAtomicReplicatedClient() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
-            ATOMIC,
-            ONHEAP_TIERED
+            ATOMIC
         );
 
         testContinuousQuery(ccfg, true);
@@ -157,8 +151,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testTx() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
+            TRANSACTIONAL
         );
 
         testContinuousQuery(ccfg, false);
@@ -169,8 +162,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testTxClient() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
+            TRANSACTIONAL
         );
 
         testContinuousQuery(ccfg, true);
@@ -182,8 +174,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testTxReplicated() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
+            TRANSACTIONAL
         );
 
         testContinuousQuery(ccfg, false);
@@ -195,8 +186,7 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
     public void testTxReplicatedClient() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
-            TRANSACTIONAL,
-            ONHEAP_TIERED
+            TRANSACTIONAL
         );
 
         testContinuousQuery(ccfg, true);
@@ -279,19 +269,16 @@ public class CacheContinuousQueryOperationP2PTest extends GridCommonAbstractTest
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
index c5c98cb..9f5cfd5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/query/continuous/CacheContinuousQueryOrderingEventTest.java
@@ -39,7 +39,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryEventSerializableFilter;
 import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.query.ContinuousQuery;
@@ -64,9 +63,6 @@ import org.apache.ignite.transactions.Transaction;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -143,38 +139,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicOnheapTwoBackup() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            ONHEAP_TIERED, PRIMARY_SYNC);
-
-        doOrderingTest(ccfg, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTwoBackup() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_TIERED, PRIMARY_SYNC);
-
-        doOrderingTest(ccfg, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesTwoBackup() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_VALUES, PRIMARY_SYNC);
-
-        doOrderingTest(ccfg, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicReplicatedOffheap() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
-            OFFHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, false);
     }
@@ -183,8 +148,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapTwoBackup() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL,
-            ONHEAP_TIERED, FULL_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, FULL_SYNC);
 
         doOrderingTest(ccfg, false);
     }
@@ -193,8 +157,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapWithoutBackup() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, false);
     }
@@ -203,8 +166,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapWithoutBackupFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
-            ONHEAP_TIERED, FULL_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC);
 
         doOrderingTest(ccfg, false);
     }
@@ -215,8 +177,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicOnheapTwoBackupAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -225,48 +186,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicOnheapTwoBackupAsyncFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            ONHEAP_TIERED, FULL_SYNC);
-
-        doOrderingTest(ccfg, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTwoBackupAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_TIERED, PRIMARY_SYNC);
-
-        doOrderingTest(ccfg, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTwoBackupAsyncFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_TIERED, FULL_SYNC);
-
-        doOrderingTest(ccfg, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesTwoBackupAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_VALUES, PRIMARY_SYNC);
-
-        doOrderingTest(ccfg, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesTwoBackupAsyncFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC,
-            OFFHEAP_VALUES, FULL_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, ATOMIC, FULL_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -275,8 +195,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicReplicatedAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -285,18 +204,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicReplicatedAsyncFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
-            ONHEAP_TIERED, FULL_SYNC);
-
-        doOrderingTest(ccfg, true);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicReplicatedOffheapAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC,
-            OFFHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED, 0, ATOMIC, FULL_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -305,8 +213,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testAtomicOnheapWithoutBackupAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, ATOMIC,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, ATOMIC, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -315,8 +222,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapTwoBackupAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 2, TRANSACTIONAL, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -325,8 +231,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapAsync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
-            ONHEAP_TIERED, PRIMARY_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, PRIMARY_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -335,8 +240,7 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testTxOnheapAsyncFullSync() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL,
-            ONHEAP_TIERED, FULL_SYNC);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 0, TRANSACTIONAL, FULL_SYNC);
 
         doOrderingTest(ccfg, true);
     }
@@ -604,7 +508,6 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param writeMode Cache write mode.
      * @return Cache configuration.
      */
@@ -612,15 +515,13 @@ public class CacheContinuousQueryOrderingEventTest extends GridCommonAbstractTes
         CacheMode cacheMode,
         int backups,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         CacheWriteSynchronizationMode writeMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
-        ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + memoryMode + "-" + memoryMode + "-"
-            + backups + "-" + UUID.randomUUID()); // TODO GG-11220 (remove setName when fixed).
+        ccfg.setName("test-cache-" + atomicityMode + "-" + cacheMode + "-" + backups + "-" + UUID.randomUUID());
+        // TODO GG-11220 (remove setName when fixed).
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(writeMode);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 


[18/57] [abbrv] ignite git commit: ignite-4851 : Removed incorrect assertion for publicSize.

Posted by ag...@apache.org.
ignite-4851 : Removed incorrect assertion for publicSize.


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

Branch: refs/heads/ignite-3477-debug
Commit: b4e6e4a4abe0c3ca28ac58dccfc64c3682d69c36
Parents: f15e9a5
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 10 17:52:12 2017 +0300
Committer: Ilya Lantukh <il...@gridgain.com>
Committed: Mon Apr 10 17:52:12 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/distributed/dht/GridDhtLocalPartition.java     | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b4e6e4a4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index cd69494..5c2445a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -984,7 +984,6 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
             long state = this.state.get();
 
             assert getPartState(state) != EVICTED;
-            assert getSize(state) > 0;
 
             if (this.state.compareAndSet(state, setSize(state, getSize(state) - 1)))
                 return;


[09/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
index b48f6f9..1b9b0d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
@@ -86,6 +86,7 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(100000);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
         c.setCacheConfiguration(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
index 1ee0503..ee83990 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAbstractSelfTest.java
@@ -37,6 +37,7 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.cache.CachePartialUpdateException;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
 import org.apache.ignite.configuration.AtomicConfiguration;
@@ -61,7 +62,6 @@ import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.internal.processors.cache.transactions.IgniteTxManager.DEFERRED_ONE_PHASE_COMMIT_ACK_REQUEST_TIMEOUT;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
 import static org.apache.ignite.testframework.GridTestUtils.runAsync;
 
 /**
@@ -85,13 +85,13 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
     }
 
     /**
-     * @param memMode Memory mode.
+     * @param evict If {@code true} adds eviction policy.
      * @param store If {@code true} adds cache store.
      * @return Cache configuration.
      * @throws Exception If failed.
      */
     @SuppressWarnings("unchecked")
-    protected CacheConfiguration cacheConfiguration(TestMemoryMode memMode, boolean store) throws Exception {
+    protected CacheConfiguration cacheConfiguration(boolean evict, boolean store) throws Exception {
         CacheConfiguration cfg = new CacheConfiguration();
 
         cfg.setAtomicityMode(atomicityMode());
@@ -100,13 +100,21 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
         cfg.setBackups(1);
         cfg.setRebalanceMode(SYNC);
 
+        if (evict) {
+            LruEvictionPolicy plc = new LruEvictionPolicy();
+
+            plc.setMaxSize(100);
+
+            cfg.setEvictionPolicy(plc);
+
+            cfg.setOnheapCacheEnabled(true);
+        }
+
         if (store) {
             cfg.setCacheStoreFactory(new TestStoreFactory());
             cfg.setWriteThrough(true);
         }
 
-        GridTestUtils.setMemoryMode(null, cfg, memMode, 100, 1024);
-
         return cfg;
     }
 
@@ -173,80 +181,73 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
      * @throws Exception If failed.
      */
     public void testPut() throws Exception {
-        checkRetry(Test.PUT, TestMemoryMode.HEAP, false);
+        checkRetry(Test.PUT, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testGetAndPut() throws Exception {
-        checkRetry(Test.GET_AND_PUT, TestMemoryMode.HEAP, false);
+        checkRetry(Test.GET_AND_PUT, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPutStoreEnabled() throws Exception {
-        checkRetry(Test.PUT, TestMemoryMode.HEAP, true);
+        checkRetry(Test.PUT, false, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPutAll() throws Exception {
-        checkRetry(Test.PUT_ALL, TestMemoryMode.HEAP, false);
+        checkRetry(Test.PUT_ALL, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPutAsync() throws Exception {
-        checkRetry(Test.PUT_ASYNC, TestMemoryMode.HEAP, false);
+        checkRetry(Test.PUT_ASYNC, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPutAsyncStoreEnabled() throws Exception {
-        checkRetry(Test.PUT_ASYNC, TestMemoryMode.HEAP, true);
+        checkRetry(Test.PUT_ASYNC, false, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvoke() throws Exception {
-        checkRetry(Test.INVOKE, TestMemoryMode.HEAP, false);
+        checkRetry(Test.INVOKE, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testInvokeAll() throws Exception {
-        checkRetry(Test.INVOKE_ALL, TestMemoryMode.HEAP, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testInvokeAllOffheapSwap() throws Exception {
-        checkRetry(Test.INVOKE_ALL, TestMemoryMode.OFFHEAP_EVICT_SWAP, false);
+        checkRetry(Test.INVOKE_ALL, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
-    public void testInvokeAllOffheapTiered() throws Exception {
-        checkRetry(Test.INVOKE_ALL, TestMemoryMode.OFFHEAP_TIERED, false);
+    public void testInvokeAllEvict() throws Exception {
+        checkRetry(Test.INVOKE_ALL, true, false);
     }
 
     /**
      * @param test Test type.
-     * @param memMode Memory mode.
+     * @param evict If {@code true} uses eviction policy
      * @param store If {@code true} uses cache with store.
      * @throws Exception If failed.
      */
-    protected final void checkRetry(Test test, TestMemoryMode memMode, boolean store) throws Exception {
-        ignite(0).createCache(cacheConfiguration(memMode, store));
+    protected final void checkRetry(Test test, boolean evict, boolean store) throws Exception {
+        ignite(0).createCache(cacheConfiguration(evict, store));
 
         final AtomicBoolean finished = new AtomicBoolean();
 
@@ -520,7 +521,7 @@ public abstract class IgniteCachePutRetryAbstractSelfTest extends GridCommonAbst
      * @throws Exception If failed.
      */
     private void checkFailsWithNoRetries(boolean async) throws Exception {
-        ignite(0).createCache(cacheConfiguration(TestMemoryMode.HEAP, false));
+        ignite(0).createCache(cacheConfiguration(false, false));
 
         final AtomicBoolean finished = new AtomicBoolean();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
index 3d7c7d7..8f5b88d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryAtomicSelfTest.java
@@ -47,7 +47,7 @@ public class IgniteCachePutRetryAtomicSelfTest extends IgniteCachePutRetryAbstra
      * @throws Exception If failed.
      */
     public void testPutInsideTransaction() throws Exception {
-        ignite(0).createCache(cacheConfiguration(GridTestUtils.TestMemoryMode.HEAP, false));
+        ignite(0).createCache(cacheConfiguration(false, false));
 
         CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
index 7460828..b439bcc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCachePutRetryTransactionalSelfTest.java
@@ -36,7 +36,6 @@ import org.apache.ignite.internal.IgniteInternalFuture;
 import org.apache.ignite.internal.util.typedef.internal.U;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
 import static org.apache.ignite.testframework.GridTestUtils.runAsync;
 import static org.apache.ignite.testframework.GridTestUtils.runMultiThreadedAsync;
 
@@ -93,52 +92,45 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
      * @throws Exception If failed.
      */
     public void testExplicitTransactionRetriesSingleValue() throws Exception {
-        checkRetry(Test.TX_PUT, TestMemoryMode.HEAP, false);
+        checkRetry(Test.TX_PUT, false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testExplicitTransactionRetriesSingleValueStoreEnabled() throws Exception {
-        checkRetry(Test.TX_PUT, TestMemoryMode.HEAP, true);
+        checkRetry(Test.TX_PUT, false, true);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testExplicitTransactionRetries() throws Exception {
-        explicitTransactionRetries(TestMemoryMode.HEAP, false);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testExplicitTransactionRetriesSingleOperation() throws Exception {
-        explicitTransactionRetries(TestMemoryMode.HEAP, false);
+        explicitTransactionRetries(false, false);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testExplicitTransactionRetriesStoreEnabled() throws Exception {
-        explicitTransactionRetries(TestMemoryMode.HEAP, true);
+        explicitTransactionRetries(false, true);
     }
 
     /**
      * @throws Exception If failed.
      */
-    public void testExplicitTransactionRetriesOffheapSwap() throws Exception {
-        explicitTransactionRetries(TestMemoryMode.OFFHEAP_EVICT_SWAP, false);
+    public void testExplicitTransactionRetriesEvictionEnabled() throws Exception {
+        explicitTransactionRetries(true, false);
     }
 
     /**
-     * @param memMode Memory mode.
+     * @param evict If {@code true} uses cache with eviction policy.
      * @param store If {@code true} uses cache with store.
      * @throws Exception If failed.
      */
     @SuppressWarnings("unchecked")
-    public void explicitTransactionRetries(TestMemoryMode memMode, boolean store) throws Exception {
-        ignite(0).createCache(cacheConfiguration(memMode, store));
+    public void explicitTransactionRetries(boolean evict, boolean store) throws Exception {
+        ignite(0).createCache(cacheConfiguration(evict, store));
 
         final AtomicInteger idx = new AtomicInteger();
         int threads = 8;
@@ -211,7 +203,7 @@ public class IgniteCachePutRetryTransactionalSelfTest extends IgniteCachePutRetr
      * @throws Exception If failed.
      */
     public void testOriginatingNodeFailureForcesOnePhaseCommitDataCleanup() throws Exception {
-        ignite(0).createCache(cacheConfiguration(TestMemoryMode.HEAP, false));
+        ignite(0).createCache(cacheConfiguration(false, false));
 
         final AtomicBoolean finished = new AtomicBoolean();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
index 1514673..4d345c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicInvalidPartitionHandlingSelfTest.java
@@ -66,7 +66,6 @@ import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_ASYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
-import static org.apache.ignite.testframework.GridTestUtils.TestMemoryMode;
 
 /**
  * Test GridDhtInvalidPartitionException handling in ATOMIC cache during restarts.
@@ -85,9 +84,6 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
     /** Write sync. */
     private CacheWriteSynchronizationMode writeSync;
 
-    /** Memory mode. */
-    private TestMemoryMode memMode;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -107,8 +103,6 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
         if (testClientNode() && getTestIgniteInstanceName(0).equals(igniteInstanceName))
             cfg.setClientMode(true);
 
-        GridTestUtils.setMemoryMode(cfg, ccfg, memMode, 100, 1024);
-
         return cfg;
     }
 
@@ -150,99 +144,54 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
      * @throws Exception If failed.
      */
     public void testClockFullSync() throws Exception {
-        checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClockFullSyncSwap() throws Exception {
-        checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClockFullSyncOffheapTiered() throws Exception {
-        checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.OFFHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClockFullSyncOffheapSwap() throws Exception {
-        checkRestarts(CLOCK, FULL_SYNC, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+        checkRestarts(CLOCK, FULL_SYNC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClockPrimarySync() throws Exception {
-        checkRestarts(CLOCK, PRIMARY_SYNC, TestMemoryMode.HEAP);
+        checkRestarts(CLOCK, PRIMARY_SYNC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testClockFullAsync() throws Exception {
-        checkRestarts(CLOCK, FULL_ASYNC, TestMemoryMode.HEAP);
+        checkRestarts(CLOCK, FULL_ASYNC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPrimaryFullSync() throws Exception {
-        checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.HEAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPrimaryFullSyncSwap() throws Exception {
-        checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.SWAP);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPrimaryFullSyncOffheapTiered() throws Exception {
-        checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.OFFHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPrimaryFullSyncOffheapSwap() throws Exception {
-        checkRestarts(PRIMARY, FULL_SYNC, TestMemoryMode.OFFHEAP_EVICT_SWAP);
+        checkRestarts(PRIMARY, FULL_SYNC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPrimaryPrimarySync() throws Exception {
-        checkRestarts(PRIMARY, PRIMARY_SYNC, TestMemoryMode.HEAP);
+        checkRestarts(PRIMARY, PRIMARY_SYNC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPrimaryFullAsync() throws Exception {
-        checkRestarts(PRIMARY, FULL_ASYNC, TestMemoryMode.HEAP);
+        checkRestarts(PRIMARY, FULL_ASYNC);
     }
 
     /**
      * @param writeOrder Write order to check.
      * @param writeSync Write synchronization mode to check.
-     * @param memMode Memory mode.
      * @throws Exception If failed.
      */
     private void checkRestarts(CacheAtomicWriteOrderMode writeOrder,
-        CacheWriteSynchronizationMode writeSync,
-        TestMemoryMode memMode)
+        CacheWriteSynchronizationMode writeSync)
         throws Exception {
         this.writeOrder = writeOrder;
         this.writeSync = writeSync;
-        this.memMode = memMode;
 
         final int gridCnt = 6;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
index af80bf6..0b8ccdf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest.java
@@ -192,7 +192,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
     }
 
     /** {@inheritDoc} */
-    @Override public void _testEvictExpired() throws Exception {
+    @Override public void testEvictExpired() throws Exception {
         IgniteCache<String, Integer> cache = jcache();
 
         final String key = primaryKeysForCache(cache, 1).get(0);
@@ -224,10 +224,6 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
 
         assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
 
-        cache.localPromote(Collections.singleton(key));
-
-        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
         assertTrue(cache.localSize() == 0);
 
         // Force reload on primary node.
@@ -292,7 +288,7 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
     }
 
     /** {@inheritDoc} */
-    @Override public void _testPeekExpired() throws Exception {
+    @Override public void testPeekExpired() throws Exception {
         IgniteCache<String, Integer> c = jcache();
 
         String key = primaryKeysForCache(c, 1).get(0);
@@ -315,111 +311,6 @@ public class GridCacheAtomicClientOnlyMultiNodeFullApiSelfTest extends GridCache
         assert c.localSize() == 0 : "Cache is not empty.";
     }
 
-    // TODO: GG-11148 check if test makes sense.
-    /** {@inheritDoc} */
-    @Override public void _testUnswap() throws Exception {
-        IgniteCache<String, Integer> cache = jcache();
-
-        List<String> keys = primaryKeysForCache(cache, 3);
-
-        String k1 = keys.get(0);
-        String k2 = keys.get(1);
-        String k3 = keys.get(2);
-
-        cache.put(k1, 1);
-        cache.put(k2, 2);
-        cache.put(k3, 3);
-
-        final AtomicInteger swapEvts = new AtomicInteger(0);
-        final AtomicInteger unswapEvts = new AtomicInteger(0);
-
-        Collection<String> locKeys = new HashSet<>();
-
-        for (int i = 0; i < gridCount(); i++) {
-            grid(i).events().localListen(
-                new LocalListener(swapEvts, unswapEvts), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-        }
-
-        cache.localEvict(Collections.singleton(k2));
-        cache.localEvict(Collections.singleton(k3));
-
-        assertNull(cache.localPeek(k1, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-        assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-        assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-
-        int cnt = 0;
-
-        if (locKeys.contains(k2)) {
-            cache.localPromote(Collections.singleton(k2));
-
-            assertEquals((Integer)2, cache.localPeek(k2, CachePeekMode.ONHEAP));
-
-            cnt++;
-        }
-        else {
-            cache.localPromote(Collections.singleton(k2));
-
-            assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP));
-        }
-
-
-        if (locKeys.contains(k3)) {
-            cache.localPromote(Collections.singleton(k3));
-
-            assertEquals((Integer)3, cache.localPeek(k3, CachePeekMode.ONHEAP));
-
-            cnt++;
-        }
-        else {
-            cache.localPromote(Collections.singleton(k3));
-
-            assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP));
-        }
-
-        assertEquals(cnt, swapEvts.get());
-        assertEquals(cnt, unswapEvts.get());
-
-        cache.localEvict(Collections.singleton(k1));
-
-        assertEquals((Integer)1, cache.get(k1));
-
-        if (locKeys.contains(k1))
-            cnt++;
-
-        assertEquals(cnt, swapEvts.get());
-        assertEquals(cnt, unswapEvts.get());
-
-        cache.clear();
-
-        // Check with multiple arguments.
-        cache.put(k1, 1);
-        cache.put(k2, 2);
-        cache.put(k3, 3);
-
-        swapEvts.set(0);
-        unswapEvts.set(0);
-
-        cache.localEvict(Collections.singleton(k2));
-        cache.localEvict(Collections.singleton(k3));
-
-        assertNull(cache.localPeek(k1, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-        assertNull(cache.localPeek(k2, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-        assertNull(cache.localPeek(k3, CachePeekMode.ONHEAP, CachePeekMode.OFFHEAP));
-
-        cache.localPromote(ImmutableSet.of(k2, k3));
-
-        cnt = 0;
-
-        if (locKeys.contains(k2))
-            cnt++;
-
-        if (locKeys.contains(k3))
-            cnt++;
-
-        assertEquals(cnt, swapEvts.get());
-        assertEquals(cnt, unswapEvts.get());
-    }
-
     /**
      *
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
index f4a9a20..2909a1d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest.java
@@ -118,56 +118,4 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
         for (String key : keys)
             assertEquals((Integer)i++, nearCache.localPeek(key, CachePeekMode.ONHEAP));
     }
-
-    /** {@inheritDoc} */
-    @Override public void _testEvictExpired() throws Exception {
-        if (isMultiJvm())
-            fail("https://issues.apache.org/jira/browse/IGNITE-1113");
-
-        IgniteCache<String, Integer> cache = jcache();
-
-        final String key = primaryKeysForCache(cache, 1).get(0);
-
-        cache.put(key, 1);
-
-        assertEquals((Integer)1, cache.get(key));
-
-        long ttl = 500;
-
-        grid(0).cache(null).
-            withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, ttl))).put(key, 1);
-
-        boolean wait = waitForCondition(new GridAbsPredicate() {
-            @Override public boolean apply() {
-                for (int i = 0; i < gridCount(); i++) {
-                    if (peek(jcache(i), key) != null)
-                        return false;
-                }
-
-                return true;
-            }
-        }, ttl + 1000);
-
-        assertTrue("Failed to wait for entry expiration.", wait);
-
-        // Expired entry should not be swapped.
-        cache.localEvict(Collections.singleton(key));
-
-        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
-        cache.localPromote(Collections.singleton(key));
-
-        assertNull(cache.localPeek(key, CachePeekMode.ONHEAP));
-
-        assertTrue(cache.localSize() == 0);
-
-        load(cache, key, true);
-
-        Affinity<String> aff = ignite(0).affinity(null);
-
-        for (int i = 0; i < gridCount(); i++) {
-            if (aff.isPrimaryOrBackup(grid(i).cluster().localNode(), key))
-                assertEquals((Integer)1, peek(jcache(i), key));
-        }
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
deleted file mode 100644
index 0c6d2b9..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,67 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCacheAtomicOffHeapFullApiSelfTest extends GridCachePartitionedOffHeapFullApiSelfTest {
-    /**
-     * @return Write order mode for atomic cache.
-     */
-    protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return CLOCK;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean lockingEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean txEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode());
-
-        return ccfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index e45b30c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,68 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.NearCacheConfiguration;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.CLOCK;
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCacheAtomicOffHeapMultiNodeFullApiSelfTest extends
-    GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
-    /**
-     * @return Write order mode for atomic cache.
-     */
-    protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return CLOCK;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return ATOMIC;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected NearCacheConfiguration nearConfiguration() {
-        return null;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean lockingEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected boolean txEnabled() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
-        CacheConfiguration ccfg = super.cacheConfiguration(igniteInstanceName);
-
-        ccfg.setAtomicWriteOrderMode(atomicWriteOrderMode());
-
-        return ccfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index b0d13e0..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicOffHeapTieredFullApiSelfTest extends GridCacheAtomicOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 472ad16..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicOffHeapTieredMultiNodeFullApiSelfTest extends
-    GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..977fea4
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridCacheAtomicFullApiSelfTest;
+
+public class GridCacheAtomicOnheapFullApiSelfTest extends GridCacheAtomicFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..ddd8916
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCacheAtomicOnheapMultiNodeFullApiSelfTest extends GridCacheAtomicOnheapFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+            return 3;
+        }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
deleted file mode 100644
index dbb461f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-
-/**
- * Tests partitioned cache with values being stored off-heap and with primary write order.
- */
-public class GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest extends GridCacheAtomicOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return PRIMARY;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 6df18be..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicPrimaryWriteOrderOffHeapTieredFullApiSelfTest extends
-    GridCacheAtomicPrimaryWriteOrderOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..21ecf5e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapFullApiSelfTest extends GridCacheAtomicOnheapFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return CacheAtomicWriteOrderMode.PRIMARY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..99778c7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
+
+public class GridCacheAtomicPrimaryWriteOrderOnheapMultiNodeFullApiSelfTest
+    extends GridCacheAtomicOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
+        return CacheAtomicWriteOrderMode.PRIMARY;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index e49c60b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
-
-import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
-
-/**
- * Tests partitioned cache with values being stored off-heap and with primary write order.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest extends
-        GridCacheAtomicOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicWriteOrderMode atomicWriteOrderMode() {
-        return PRIMARY;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index f2e3b12..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCacheAtomicPrimaryWrityOrderOffHeapTieredMultiNodeFullApiSelfTest extends
-    GridCacheAtomicPrimaryWrityOrderOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
index faf9ba2..6f7ff65 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearReadersSelfTest.java
@@ -82,7 +82,6 @@ public class GridCacheNearReadersSelfTest extends GridCommonAbstractTest {
         cacheCfg.setRebalanceMode(NONE);
 
         cacheCfg.setAffinity(aff);
-        cacheCfg.setEvictSynchronized(true);
         cacheCfg.setAtomicityMode(atomicityMode());
         cacheCfg.setBackups(aff.backups());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..c05e6ed
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapFullApiSelfTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedAtomicOnheapFullApiSelfTest extends GridCachePartitionedOnheapFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean txEnabled() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean lockingEnabled() {
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..703d88c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,28 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+public class GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedOnheapMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
index 67422b7..f5ec2c2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
@@ -90,6 +90,7 @@ public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfT
         FifoEvictionPolicy plc = new FifoEvictionPolicy();
         plc.setMaxSize(EVICT_CACHE_SIZE);
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
 
         FifoEvictionPolicy nearPlc = new FifoEvictionPolicy();
         nearPlc.setMaxSize(EVICT_CACHE_SIZE);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
index 5aad5a6..b790975 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedFullApiSelfTest.java
@@ -51,8 +51,6 @@ public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullAp
     @Override protected CacheConfiguration cacheConfiguration(String igniteInstanceName) throws Exception {
         CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
 
-        cfg.setEvictSynchronized(false);
-
         cfg.setAtomicityMode(atomicityMode());
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
index 965a50a..a546d89 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiNodeFullApiSelfTest.java
@@ -29,7 +29,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteAtomicLong;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.affinity.AffinityKeyMapped;
@@ -185,48 +184,6 @@ public class GridCachePartitionedMultiNodeFullApiSelfTest extends GridCacheParti
     }
 
     /**
-     * TODO: GG-11148 check if test makes sense.
-     *
-     * @throws Exception If failed.
-     */
-    public void _testUnswapShort() throws Exception {
-        if (memoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            return;
-
-        final IgniteAtomicLong swapEvts = grid(0).atomicLong("swapEvts", 0, true);
-
-        final IgniteAtomicLong unswapEvts = grid(0).atomicLong("unswapEvts", 0, true);
-
-        for (int i = 0; i < gridCount(); i++)
-            grid(i).events().localListen(
-                new SwapUnswapLocalListener(), EVT_CACHE_OBJECT_SWAPPED, EVT_CACHE_OBJECT_UNSWAPPED);
-
-        jcache().put("key", 1);
-
-        for (int i = 0; i < gridCount(); i++) {
-            if (grid(i).affinity(null).isBackup(grid(i).localNode(), "key")) {
-                jcache(i).localEvict(Collections.singleton("key"));
-
-                assertNull(jcache(i).localPeek("key", ONHEAP));
-
-                assertEquals((Integer)1, jcache(i).get("key"));
-
-                GridTestUtils.waitForCondition(new GridAbsPredicate() {
-                    @Override public boolean apply() {
-                        return swapEvts.get() == 1 && unswapEvts.get() == 1;
-                    }
-                }, 5000);
-
-                assertEquals(1, swapEvts.get());
-
-                assertEquals(1, unswapEvts.get());
-
-                break;
-            }
-        }
-    }
-
-    /**
      * @throws Exception If failed.
      */
     public void testPeekPartitionedModes() throws Exception {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
index 77c4c56..86b2217 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedMultiThreadedPutGetSelfTest.java
@@ -77,8 +77,8 @@ public class GridCachePartitionedMultiThreadedPutGetSelfTest extends GridCommonA
         plc.setMaxMemorySize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setAtomicityMode(TRANSACTIONAL);
-        cc.setEvictSynchronized(false);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
deleted file mode 100644
index 1f6ca4e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCachePartitionedOffHeapFullApiSelfTest extends GridCachePartitionedFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 901cf82..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Tests partitioned cache with values being stored off-heap.
- */
-public class GridCachePartitionedOffHeapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
deleted file mode 100644
index 365e9aa..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredFullApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.*;
-
-import static org.apache.ignite.cache.CacheMemoryMode.*;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCachePartitionedOffHeapTieredFullApiSelfTest extends GridCachePartitionedOffHeapFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
deleted file mode 100644
index 593271c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest.java
+++ /dev/null
@@ -1,74 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CachePeekMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Tests partitioned cache with off-heap tiered mode.
- */
-public class GridCachePartitionedOffHeapTieredMultiNodeFullApiSelfTest extends GridCachePartitionedOffHeapMultiNodeFullApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return OFFHEAP_TIERED;
-    }
-
-    /**
-    * @throws Exception If failed.
-    */
-    public void testPut() throws Exception {
-        IgniteCache<String, Integer> cache = grid(0).cache(null);
-
-        assert gridCount() > 3;
-        String key = null;
-
-        for (int i = 0; i < 250; ++i) {
-            String testKey = "key_" + i;
-
-            if (!grid(0).affinity(null).isPrimaryOrBackup(grid(0).localNode(), testKey)) {
-                key = testKey;
-
-                break;
-            }
-        }
-
-        assert key != null;
-
-        IgniteCache<String, Integer> primaryCache = primaryCache(key);
-
-        assertFalse(grid(0).affinity(null).isPrimary(grid(0).localNode(), key));
-        assertFalse(grid(0).affinity(null).isBackup(grid(0).localNode(), key));
-
-        primaryCache.put(key, 4); // Put from primary.
-
-        assertNull(primaryCache.localPeek(key, CachePeekMode.ONHEAP));
-        assertEquals(4, primaryCache.localPeek(key, CachePeekMode.OFFHEAP).intValue());
-
-        cache.put(key, 5); // Put from near to add reader on primary.
-
-        assertEquals(5, primaryCache.localPeek(key, CachePeekMode.ONHEAP).intValue());
-        // TODO: GG-11148 check if test makes sense.
-        // assertNull(primaryCache.localPeek(key, CachePeekMode.OFFHEAP));
-        assertEquals(5, cache.get(key).intValue());
-        assertEquals(5, storeStgy.getFromStore(key));
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
new file mode 100644
index 0000000..c9f29fe
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCachePartitionedOnheapFullApiSelfTest extends GridCachePartitionedFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
new file mode 100644
index 0000000..14cc6cb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedOnheapMultiNodeFullApiSelfTest.java
@@ -0,0 +1,26 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.distributed.near;
+
+public class GridCachePartitionedOnheapMultiNodeFullApiSelfTest extends GridCachePartitionedMultiNodeFullApiSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean onheapCacheEnabled() {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
deleted file mode 100644
index ae3f695..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOffheapCacheStoreUpdateTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.distributed.near;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Check that near cache is updated when entry loaded from store.
- */
-public class GridNearOffheapCacheStoreUpdateTest extends GridNearCacheStoreUpdateTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration<String, String> cacheConfiguration() {
-        final CacheConfiguration<String, String> ccfg = super.cacheConfiguration();
-
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
-        return ccfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
index acff6cf..b4e58fc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheAbstractReplicatedByteArrayValuesSelfTest.java
@@ -22,8 +22,6 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheAbstractDistributedByteArrayValuesSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -48,33 +46,6 @@ public abstract class GridCacheAbstractReplicatedByteArrayValuesSelfTest extends
         cfg.setCacheMode(REPLICATED);
         cfg.setAtomicityMode(TRANSACTIONAL);
         cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setEvictSynchronized(false);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration offheapCacheConfiguration0() {
-        CacheConfiguration cfg = new CacheConfiguration();
-
-        cfg.setCacheMode(REPLICATED);
-        cfg.setAtomicityMode(TRANSACTIONAL);
-        cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setMemoryMode(OFFHEAP_VALUES);
-        cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration offheapTieredCacheConfiguration0() {
-        CacheConfiguration cfg = new CacheConfiguration();
-
-        cfg.setCacheMode(REPLICATED);
-        cfg.setAtomicityMode(TRANSACTIONAL);
-        cfg.setWriteSynchronizationMode(FULL_SYNC);
-        cfg.setMemoryMode(OFFHEAP_TIERED);
-        cfg.setOffHeapMaxMemory(100 * 1024 * 1024);
 
         return cfg;
     }


[51/57] [abbrv] ignite git commit: IGNITE-4534: Detailed javadocs added + Tests now run faster

Posted by ag...@apache.org.
IGNITE-4534: Detailed javadocs added + Tests now run faster


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

Branch: refs/heads/ignite-3477-debug
Commit: 0390391870c759e1c5d65605b94a9bcbf3e9e67c
Parents: d69a594
Author: Ivan Rakov <iv...@gmail.com>
Authored: Tue Apr 11 19:06:54 2017 +0300
Committer: Ivan Rakov <iv...@gmail.com>
Committed: Tue Apr 11 19:06:54 2017 +0300

----------------------------------------------------------------------
 .../configuration/DataPageEvictionMode.java       | 16 ++++++++++++++--
 .../configuration/MemoryPolicyConfiguration.java  | 18 ++++++++++++------
 .../eviction/paged/PageEvictionAbstractTest.java  |  4 ++--
 .../eviction/paged/PageEvictionMultinodeTest.java |  4 ++--
 .../paged/PageEvictionReadThroughTest.java        |  2 +-
 5 files changed, 31 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/03903918/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java b/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
index bada68e..da3dbdf 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
@@ -24,9 +24,21 @@ public enum DataPageEvictionMode {
     /** Disabled. */
     DISABLED,
 
-    /** Random lru. */
+    /**
+     * Random-LRU algorithm. In a nutshell:
+     * 1) During memory policy initialization, off-heap array is allocated to track timestamp of last usage for each
+     * data page.
+     * 2) When data page on address X is accessed, current timestamp is stored in X / PAGE_SIZE array position.
+     * 3) When there's a need for eviction, we randomly choose 5 indices of array (if some of indices point to
+     * non-data pages, re-choose them) and evict data page with minimum timestamp.
+     */
     RANDOM_LRU,
 
-    /** Random 2-lru. */
+    /**
+     * Random-2-LRU algorithm. Scan-resistant version of Random-LRU. The only difference is that we store two
+     * previous timestamps for each data page, and choose minimum between "older" timestamps. LRU-2 outperforms LRU by
+     * resolving "one-hit wonder" problem: if page is accessed very rarely, but accidentally accessed once, it's
+     * protected from eviction for long time.
+     */
     RANDOM_2_LRU
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/03903918/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
index d6203c6..6fe373d 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
@@ -17,10 +17,9 @@
 package org.apache.ignite.configuration;
 
 import java.io.Serializable;
+import org.apache.ignite.internal.mem.OutOfMemoryException;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
-import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
-import org.apache.ignite.internal.processors.cache.database.tree.io.DataPageIO;
 
 /**
  * Configuration bean used for creating {@link MemoryPolicy} instances.
@@ -48,12 +47,19 @@ public final class MemoryPolicyConfiguration implements Serializable {
     /** Algorithm for per-page eviction. If {@link DataPageEvictionMode#DISABLED} set, eviction is not performed. */
     private DataPageEvictionMode pageEvictionMode = DataPageEvictionMode.DISABLED;
 
-    /** Allocation of new {@link DataPageIO} pages is stopped when this percentage of pages are allocated. */
+    /** Threshold for per-page eviction.
+     * When this percentage of memory pages of the current policy is allocated (90% by default),
+     * system starts page eviction.
+     * Decrease this parameter if {@link OutOfMemoryException} occurred with enabled page eviction.
+     */
     private double evictionThreshold = 0.9;
 
-    /** Allocation of new {@link DataPageIO} pages is stopped by maintaining this amount of empty pages in
-     * corresponding {@link FreeList} bucket. Pages get into the bucket through evicting all data entries one by one.
-     * Higher load and contention require larger pool size.
+    /** When {@link #evictionThreshold} is reached, allocation of new data pages is prevented by maintaining this
+     * amount of evicted data pages in the pool. If any thread needs free page to store cache entry,
+     * it will take empty page from the pool instead of allocating a new one.
+     * Increase this parameter if cache can contain very big entries (total size of pages in the pool should be enough
+     * to contain largest cache entry).
+     * Increase this parameter if {@link OutOfMemoryException} occurred with enabled page eviction.
      */
     private int emptyPagesPoolSize = 100;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/03903918/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
index bf05146..20edd4e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
@@ -38,13 +38,13 @@ public class PageEvictionAbstractTest extends GridCommonAbstractTest {
     protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
 
     /** Offheap size for memory policy. */
-    private static final int SIZE = 256 * 1024 * 1024;
+    private static final int SIZE = 96 * 1024 * 1024;
 
     /** Page size. */
     static final int PAGE_SIZE = 2048;
 
     /** Number of entries. */
-    static final int ENTRIES = 400_000;
+    static final int ENTRIES = 80_000;
 
     /** Empty pages pool size. */
     private static final int EMPTY_PAGES_POOL_SIZE = 100;

http://git-wip-us.apache.org/repos/asf/ignite/blob/03903918/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
index 2302de1..7a58dd4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
@@ -102,8 +102,8 @@ public abstract class PageEvictionMultinodeTest extends PageEvictionAbstractTest
 
         System.out.println(">>> Resulting size: " + resultingSize);
 
-        // More than half of entries evicted, no OutOfMemory occurred, success.
-        assertTrue(resultingSize < ENTRIES / 2);
+        // Eviction started, no OutOfMemory occurred, success.
+        assertTrue(resultingSize < ENTRIES);
 
         ignite(0).destroyCache(cfg.getName());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/03903918/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
index c8cd7c9..ff71361 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
@@ -73,7 +73,7 @@ public class PageEvictionReadThroughTest extends PageEvictionAbstractTest {
      * @throws Exception If failed.
      */
     private void testEvictionWithReadThrough(CacheAtomicityMode atomicityMode, CacheMode cacheMode) throws Exception {
-        startGridsMultiThreaded(4);
+        startGrid(0);
 
         CacheConfiguration<Object, Object> cfg = cacheConfig("evict-rebalance", null, cacheMode, atomicityMode,
             CacheWriteSynchronizationMode.PRIMARY_SYNC);


[27/57] [abbrv] ignite git commit: IGNITE-4847: Upgrade log4j2 to version 2.8.1

Posted by ag...@apache.org.
IGNITE-4847: Upgrade log4j2 to version 2.8.1


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

Branch: refs/heads/ignite-3477-debug
Commit: edfa353eba7c87c802df9e32678cb253549949b3
Parents: b99c198
Author: Michael Griggs <en...@gmail.com>
Authored: Mon Apr 10 12:39:49 2017 -0700
Committer: Denis Magda <dm...@gridgain.com>
Committed: Mon Apr 10 12:39:49 2017 -0700

----------------------------------------------------------------------
 modules/log4j2/pom.xml                          |  4 ++--
 .../ignite/logger/log4j2/Log4J2Logger.java      | 23 +++++++++++++++-----
 2 files changed, 20 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/edfa353e/modules/log4j2/pom.xml
----------------------------------------------------------------------
diff --git a/modules/log4j2/pom.xml b/modules/log4j2/pom.xml
index 5b0e989..5c6e7c4 100644
--- a/modules/log4j2/pom.xml
+++ b/modules/log4j2/pom.xml
@@ -52,13 +52,13 @@
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-api</artifactId>
-            <version>2.3</version>
+            <version>2.8.1</version>
         </dependency>
 
         <dependency>
             <groupId>org.apache.logging.log4j</groupId>
             <artifactId>log4j-core</artifactId>
-            <version>2.3</version>
+            <version>2.8.1</version>
         </dependency>
     </dependencies>
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/edfa353e/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
----------------------------------------------------------------------
diff --git a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
index ffe8e1b..dff3179 100644
--- a/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
+++ b/modules/log4j2/src/main/java/org/apache/ignite/logger/log4j2/Log4J2Logger.java
@@ -353,18 +353,31 @@ public class Log4J2Logger implements IgniteLogger, LoggerNodeIdAware {
 
         Configuration cfg = ctx.getConfiguration();
 
-        PatternLayout layout = PatternLayout.createLayout("[%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n", null, null,
-            Charset.defaultCharset(), false, false, null, null);
+        PatternLayout.Builder builder = PatternLayout.newBuilder();
+
+        builder
+            .withPattern("%d{ABSOLUTE}][%-5p][%t][%c{1}] %m%n")
+            .withCharset(Charset.defaultCharset())
+            .withAlwaysWriteExceptions(false)
+            .withNoConsoleNoAnsi(false);
+
+        PatternLayout layout = builder.build();
+
+        ConsoleAppender.Builder consoleAppenderBuilder = ConsoleAppender.newBuilder();
+
+        consoleAppenderBuilder
+            .withName(CONSOLE_APPENDER)
+            .withLayout(layout);
+
+        ConsoleAppender consoleApp = consoleAppenderBuilder.build();
 
-        final Appender consoleApp = ConsoleAppender.createAppender(layout, null, null, CONSOLE_APPENDER, null, null);
         consoleApp.start();
 
         AppenderRef ref = AppenderRef.createAppenderRef(CONSOLE_APPENDER, Level.TRACE, null);
 
         AppenderRef[] refs = {ref};
 
-        LoggerConfig logCfg = LoggerConfig.createLogger("false", Level.INFO, LogManager.ROOT_LOGGER_NAME, "",
-            refs, null, null, null);
+        LoggerConfig logCfg = LoggerConfig.createLogger(false, Level.INFO, LogManager.ROOT_LOGGER_NAME, "", refs, null, null, null);
 
         logCfg.addAppender(consoleApp, null, null);
         cfg.addAppender(consoleApp);


[53/57] [abbrv] ignite git commit: IGNITE-3477 - Fixing hanging test

Posted by ag...@apache.org.
IGNITE-3477 - Fixing hanging test


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

Branch: refs/heads/ignite-3477-debug
Commit: b9867ebbab8c9712e02df00007d56c075d5c61a6
Parents: 5703547
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 19:53:26 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 19:53:46 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/processors/cache/GridCacheContext.java  | 2 --
 .../processors/cache/IgniteCacheTopologySafeGetSelfTest.java       | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b9867ebb/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index ffc379c..9e6fc3776 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -54,7 +54,6 @@ import org.apache.ignite.internal.managers.communication.GridIoManager;
 import org.apache.ignite.internal.managers.deployment.GridDeploymentManager;
 import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
 import org.apache.ignite.internal.managers.eventstorage.GridEventStorageManager;
-import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
@@ -85,7 +84,6 @@ import org.apache.ignite.internal.processors.cache.version.GridCacheVersionedEnt
 import org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessor;
 import org.apache.ignite.internal.processors.closure.GridClosureProcessor;
 import org.apache.ignite.internal.processors.plugin.CachePluginManager;
-import org.apache.ignite.internal.processors.query.GridQueryProcessor;
 import org.apache.ignite.internal.processors.query.QueryUtils;
 import org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor;
 import org.apache.ignite.internal.util.F0;

http://git-wip-us.apache.org/repos/asf/ignite/blob/b9867ebb/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTopologySafeGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTopologySafeGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTopologySafeGetSelfTest.java
index 2404095..0140000 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTopologySafeGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTopologySafeGetSelfTest.java
@@ -147,7 +147,7 @@ public class IgniteCacheTopologySafeGetSelfTest extends GridCommonAbstractTest {
             IgniteInternalFuture<?> nodeFut = startNodeAsync();
 
             if (failPrimary)
-                stopGrid(1);
+                stopGrid(getTestIgniteInstanceName(1), false, false);
 
             assertEquals(key, ((IgniteKernal)ignite(0)).internalCache("tx").getTopologySafe(key));
             assertEquals(key, ((IgniteKernal)ignite(0)).internalCache("atomic").getTopologySafe(key));


[42/57] [abbrv] ignite git commit: IGNITE-3477 - Reverted partition evict

Posted by ag...@apache.org.
IGNITE-3477 - Reverted partition evict


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

Branch: refs/heads/ignite-3477-debug
Commit: 2a6afe5286b105e5e45097391f78e85ec2cd1fde
Parents: b62d446
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 15:09:32 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 15:09:32 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/GridDhtLocalPartition.java          | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2a6afe52/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index e8489e2..dbd1948 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -458,7 +458,12 @@ public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements
                 if (reservations == 0 && shouldBeRenting)
                     rent(true);
 
-                tryEvictAsync(false);
+                try {
+                    tryEvict();
+                }
+                catch (NodeStoppingException ignore) {
+                    // Node is stopping.
+                }
 
                 break;
             }


[22/57] [abbrv] ignite git commit: IGNITE-4851 - Fixed partition destroy race

Posted by ag...@apache.org.
IGNITE-4851 - Fixed partition destroy race


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

Branch: refs/heads/ignite-3477-debug
Commit: baa3835ee60f9c9a0c7229b78c4603504fb5e522
Parents: 54213d6 6e67866
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 10 18:55:00 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 18:55:00 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java      |   2 +-
 .../cache/GridCacheConcurrentMap.java           |   5 +-
 .../cache/GridCacheConcurrentMapImpl.java       | 218 +++++++++++--------
 .../cache/GridCacheLocalConcurrentMap.java      |  54 +++++
 .../processors/cache/GridCacheMapEntry.java     |  14 +-
 .../dht/GridCachePartitionedConcurrentMap.java  |  15 +-
 .../distributed/dht/GridDhtLocalPartition.java  | 204 ++++++++++++-----
 .../distributed/near/GridNearCacheAdapter.java  |   3 +-
 .../cache/GridCacheAbstractFullApiSelfTest.java |   1 +
 ...ledAtomicOnheapMultiNodeFullApiSelfTest.java |  10 +
 ...nedAtomicOnheapMultiNodeFullApiSelfTest.java |  10 +
 .../cache/hibernate/HibernateCacheProxy.java    |   2 +-
 .../cache/hibernate/HibernateCacheProxy.java    |   2 +-
 13 files changed, 380 insertions(+), 160 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
index 10f5ca3,15a688b..0ef1fdb
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
@@@ -120,103 -116,148 +116,158 @@@ public abstract class GridCacheConcurre
          GridCacheMapEntry doomed = null;
  
          boolean done = false;
 -
+         boolean reserved = false;
++        int sizeChange = 0;
  
-         while (!done) {
-             GridCacheMapEntry entry = map.get(key);
-             created = null;
-             doomed = null;
- 
-             if (entry == null) {
-                 if (create) {
-                     if (created0 == null)
-                         created0 = factory.create(ctx, topVer, key, key.hashCode(), val);
+         try {
+             while (!done) {
+                 GridCacheMapEntry entry = map.get(key);
+                 created = null;
+                 doomed = null;
  
-                     cur = created = created0;
+                 if (entry == null) {
+                     if (create) {
+                         if (created0 == null) {
+                             if (!reserved) {
+                                 if (!reserve())
+                                     return null;
  
-                     done = map.putIfAbsent(created.key(), created) == null;
-                 }
-                 else
-                     done = true;
-             }
-             else {
-                 if (entry.obsolete()) {
-                     doomed = entry;
+                                 reserved = true;
+                             }
  
-                     if (create) {
-                         if (created0 == null)
                              created0 = factory.create(ctx, topVer, key, key.hashCode(), val);
+                         }
  
                          cur = created = created0;
  
-                         done = map.replace(entry.key(), doomed, created);
+                         done = map.putIfAbsent(created.key(), created) == null;
                      }
                      else
-                         done = map.remove(entry.key(), doomed);
+                         done = true;
                  }
                  else {
-                     cur = entry;
+                     if (entry.obsolete()) {
+                         doomed = entry;
+ 
+                         if (create) {
+                             if (created0 == null) {
+                                 if (!reserved) {
+                                     if (!reserve())
+                                         return null;
+ 
+                                     reserved = true;
+                                 }
+ 
+                                 created0 = factory.create(ctx, topVer, key, key.hashCode(), val);
+                             }
+ 
+                             cur = created = created0;
  
-                     done = true;
+                             done = map.replace(entry.key(), doomed, created);
+                         }
+                         else
+                             done = map.remove(entry.key(), doomed);
+                     }
+                     else {
+                         cur = entry;
+ 
+                         done = true;
+                     }
                  }
              }
-         }
  
-         int sizeChange = 0;
 -            int sizeChange = 0;
++            sizeChange = 0;
+ 
+             if (doomed != null) {
+                 synchronized (doomed) {
+                     if (!doomed.deleted())
+                         sizeChange--;
+                 }
  
-         if (doomed != null) {
-             synchronized (doomed) {
-                 if (!doomed.deleted())
-                     sizeChange--;
+                 if (ctx.events().isRecordable(EVT_CACHE_ENTRY_DESTROYED))
+                     ctx.events().addEvent(doomed.partition(),
+                         doomed.key(),
+                         ctx.localNodeId(),
+                         (IgniteUuid)null,
+                         null,
+                         EVT_CACHE_ENTRY_DESTROYED,
+                         null,
+                         false,
+                         null,
+                         false,
+                         null,
+                         null,
+                         null,
+                         true);
              }
  
-             if (ctx.events().isRecordable(EVT_CACHE_ENTRY_DESTROYED))
-                 ctx.events().addEvent(doomed.partition(),
-                     doomed.key(),
-                     ctx.localNodeId(),
-                     (IgniteUuid)null,
-                     null,
-                     EVT_CACHE_ENTRY_DESTROYED,
-                     null,
-                     false,
-                     null,
-                     false,
-                     null,
-                     null,
-                     null,
-                     true);
+             if (created != null) {
+                 sizeChange++;
+ 
+                 if (ctx.events().isRecordable(EVT_CACHE_ENTRY_CREATED))
+                     ctx.events().addEvent(created.partition(),
+                         created.key(),
+                         ctx.localNodeId(),
+                         (IgniteUuid)null,
+                         null,
+                         EVT_CACHE_ENTRY_CREATED,
+                         null,
+                         false,
+                         null,
+                         false,
+                         null,
+                         null,
+                         null,
+                         true);
+ 
+                 if (touch)
+                     ctx.evicts().touch(
+                         cur,
+                         topVer);
+             }
+ 
+             assert Math.abs(sizeChange) <= 1;
+ 
 -            if (sizeChange == -1)
 -                decrementPublicSize(cur);
 -            else if (sizeChange == 1) {
 -                assert reserved;
 -
 -                incrementPublicSize(cur);
 -            }
 -
+             return cur;
          }
+         finally {
+             if (reserved)
 -                release();
++                release(sizeChange, cur);
++            else {
++                if (sizeChange != 0) {
++                    assert sizeChange == -1;
 +
-         if (created != null) {
-             sizeChange++;
- 
-             if (ctx.events().isRecordable(EVT_CACHE_ENTRY_CREATED))
-                 ctx.events().addEvent(created.partition(),
-                     created.key(),
-                     ctx.localNodeId(),
-                     (IgniteUuid)null,
-                     null,
-                     EVT_CACHE_ENTRY_CREATED,
-                     null,
-                     false,
-                     null,
-                     false,
-                     null,
-                     null,
-                     null,
-                     true);
- 
-             if (touch)
-                 ctx.evicts().touch(
-                     cur,
-                     topVer);
++                    decrementPublicSize(cur);
++                }
++            }
          }
+     }
  
-         if (sizeChange != 0)
-             pubSize.addAndGet(sizeChange);
+     /**
+      *
+      */
+     protected boolean reserve() {
+         return true;
+     }
  
-         return cur;
+     /**
+      *
+      */
+     protected void release() {
+         // No-op.
+     }
+ 
++    /**
++     * @param sizeChange Size delta.
++     * @param e Map entry.
++     */
++    protected void release(int sizeChange, GridCacheEntryEx e) {
++        if (sizeChange == 1)
++            incrementPublicSize(e);
++        else if (sizeChange == -1)
++            decrementPublicSize(e);
 +    }
 +
      /** {@inheritDoc} */
      @Override public boolean removeEntry(final GridCacheEntryEx entry) {
          boolean removed = map.remove(entry.key(), entry);

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index 46b2bf8,5c2445a..8566b35
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@@ -435,17 -426,21 +426,35 @@@ public class GridDhtLocalPartition exte
       * Releases previously reserved partition.
       */
      @Override public void release() {
++        release0(0);
++    }
++
++    @Override protected void release(int sizeChange, GridCacheEntryEx e) {
++        release0(sizeChange);
++    }
++
++    /**
++     * @param sizeChange Size change delta.
++     */
++    private void release0(int sizeChange) {
          while (true) {
-             long reservations = state.get();
+             long state = this.state.get();
  
-             if ((int)(reservations & 0xFFFF) == 0)
+             int reservations = getReservations(state);
+ 
+             if (reservations == 0)
                  return;
  
-             assert (int)(reservations >> 32) != EVICTED.ordinal();
+             assert getPartState(state) != EVICTED;
+ 
+             long newState = setReservations(state, --reservations);
++            newState = setSize(newState, getSize(newState) + sizeChange);
++
++            assert getSize(newState) == getSize(state) + sizeChange;
  
              // Decrement reservations.
-             if (state.compareAndSet(reservations, --reservations)) {
-                 if ((reservations & 0xFFFF) == 0 && shouldBeRenting)
+             if (this.state.compareAndSet(state, newState)) {
+                 if (reservations == 0 && shouldBeRenting)
                      rent(true);
  
                  try {
@@@ -965,6 -963,57 +977,84 @@@
              "createTime", U.format(createTime));
      }
  
+     /** {@inheritDoc} */
+     @Override public int publicSize() {
+         return getSize(state.get());
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void incrementPublicSize(GridCacheEntryEx e) {
+         while (true) {
+             long state = this.state.get();
+ 
+             if (this.state.compareAndSet(state, setSize(state, getSize(state) + 1)))
+                 return;
+         }
+     }
+ 
+     /** {@inheritDoc} */
+     @Override public void decrementPublicSize(GridCacheEntryEx e) {
+         while (true) {
+             long state = this.state.get();
+ 
+             assert getPartState(state) != EVICTED;
+ 
+             if (this.state.compareAndSet(state, setSize(state, getSize(state) - 1)))
+                 return;
+         }
+     }
+ 
++    /**
++     * @param state Composite state.
++     * @return Partition state.
++     */
+     private static GridDhtPartitionState getPartState(long state) {
+         return GridDhtPartitionState.fromOrdinal((int)(state & (0x0000000000000007L)));
+     }
+ 
++    /**
++     * @param state Composite state to update.
++     * @param partState Partition state.
++     * @return Updated composite state.
++     */
+     private static long setPartState(long state, GridDhtPartitionState partState) {
+         return (state & (~0x0000000000000007L)) | partState.ordinal();
+     }
+ 
++    /**
++     * @param state Composite state.
++     * @return Reservations.
++     */
+     private static int getReservations(long state) {
+         return (int)((state & 0x00000000FFFF0000L) >> 16);
+     }
+ 
++    /**
++     * @param state Composite state to update.
++     * @param reservations Reservations to set.
++     * @return Updated composite state.
++     */
+     private static long setReservations(long state, int reservations) {
+         return (state & (~0x00000000FFFF0000L)) | (reservations << 16);
+     }
+ 
++    /**
++     * @param state Composite state.
++     * @return Size.
++     */
+     private static int getSize(long state) {
+         return (int)((state & 0xFFFFFFFF00000000L) >> 32);
+     }
+ 
++    /**
++     * @param state Composite state to update.
++     * @param size Size to set.
++     * @return Updated composite state.
++     */
+     private static long setSize(long state, int size) {
+         return (state & (~0xFFFFFFFF00000000L)) | ((long)size << 32);
+     }
+ 
      /**
       * Removed entry holder.
       */

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index b70ca6a,b70ca6a..af80e00
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@@ -400,6 -400,6 +400,7 @@@ public abstract class GridCacheAbstract
  
          assertEquals(0, cache.localSize());
          assertEquals(0, cache.size());
++        assertEquals(0, cache.size(ONHEAP));
  
          dfltIgnite = null;
      }

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
index 20e7b7a,20e7b7a..eb5a1dd
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledAtomicOnheapMultiNodeFullApiSelfTest.java
@@@ -25,4 -25,4 +25,14 @@@ public class GridCachePartitionedNearDi
      @Override protected CacheAtomicityMode atomicityMode() {
          return CacheAtomicityMode.ATOMIC;
      }
++
++    /** {@inheritDoc} */
++    @Override protected boolean lockingEnabled() {
++        return false;
++    }
++
++    /** {@inheritDoc} */
++    @Override protected boolean txShouldBeUsed() {
++        return false;
++    }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
index 703d88c,703d88c..573c5a4
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAtomicOnheapMultiNodeFullApiSelfTest.java
@@@ -25,4 -25,4 +25,14 @@@ public class GridCachePartitionedAtomic
      @Override protected CacheAtomicityMode atomicityMode() {
          return CacheAtomicityMode.ATOMIC;
      }
++
++    /** {@inheritDoc} */
++    @Override protected boolean lockingEnabled() {
++        return false;
++    }
++
++    /** {@inheritDoc} */
++    @Override protected boolean txShouldBeUsed() {
++        return false;
++    }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
----------------------------------------------------------------------
diff --cc modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
index 69d9097,69d9097..c814f9a
--- a/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
+++ b/modules/hibernate/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
@@@ -50,7 -50,7 +50,7 @@@ import org.apache.ignite.transactions.T
  import org.jetbrains.annotations.Nullable;
  
  /**
-- * Hibernate cache proxy.
++ * Hibernate cache proxy used to substitute hibernate keys with ignite keys.
   */
  public class HibernateCacheProxy implements IgniteInternalCache<Object, Object> {
      /** Delegate. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/baa3835e/modules/hibernate5/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
----------------------------------------------------------------------
diff --cc modules/hibernate5/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
index 69d9097,69d9097..c814f9a
--- a/modules/hibernate5/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
+++ b/modules/hibernate5/src/main/java/org/apache/ignite/cache/hibernate/HibernateCacheProxy.java
@@@ -50,7 -50,7 +50,7 @@@ import org.apache.ignite.transactions.T
  import org.jetbrains.annotations.Nullable;
  
  /**
-- * Hibernate cache proxy.
++ * Hibernate cache proxy used to substitute hibernate keys with ignite keys.
   */
  public class HibernateCacheProxy implements IgniteInternalCache<Object, Object> {
      /** Delegate. */


[56/57] [abbrv] ignite git commit: Merge branch 'ignite-3477-master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-3477-debug

Posted by ag...@apache.org.
Merge branch 'ignite-3477-master' of https://git-wip-us.apache.org/repos/asf/ignite into ignite-3477-debug


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

Branch: refs/heads/ignite-3477-debug
Commit: 3c5f34223428bfe49d417ccf49169e2ce736e102
Parents: a0b6940 50f9f16
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Wed Apr 12 10:26:09 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Wed Apr 12 10:26:09 2017 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    3 -
 assembly/dependencies-fabric-lgpl.xml           |    3 -
 assembly/dependencies-fabric.xml                |    4 +-
 assembly/dependencies-schema-import.xml         |   57 -
 assembly/libs/README.txt                        |    1 +
 assembly/release-base.xml                       |    2 -
 assembly/release-fabric-base.xml                |   15 +-
 assembly/release-schema-import.xml              |   50 -
 bin/ignite-schema-import.bat                    |  110 -
 bin/ignite-schema-import.sh                     |   87 -
 examples/README-LGPL.txt                        |    4 +-
 examples/README.txt                             |    2 -
 examples/pom-standalone-lgpl.xml                |    1 -
 examples/pom-standalone.xml                     |    1 -
 examples/pom.xml                                |    1 -
 examples/schema-import/README.txt               |   38 -
 examples/schema-import/bin/db-init.sql          |   28 -
 examples/schema-import/bin/h2-server.bat        |   80 -
 examples/schema-import/bin/h2-server.sh         |   66 -
 .../schema-import/bin/schema-import.properties  |   28 -
 examples/schema-import/pom-standalone.xml       |   90 -
 examples/schema-import/pom.xml                  |  101 -
 .../org/apache/ignite/schema/CacheConfig.java   |   36 -
 .../java/org/apache/ignite/schema/Demo.java     |  134 --
 .../java/org/apache/ignite/schema/DemoNode.java |   38 -
 .../ignite/schema/H2DataSourceFactory.java      |   35 -
 .../java/org/apache/ignite/schema/Person.java   |   44 -
 .../org/apache/ignite/schema/PersonKey.java     |   37 -
 .../benchmarks/jmh/tree/BPlusTreeBenchmark.java |    2 +
 .../internal/jdbc2/JdbcConnectionSelfTest.java  |   34 +
 .../JettyRestProcessorAbstractSelfTest.java     |    3 +-
 .../src/test/resources/spring-server-node.xml   |   71 +-
 .../test/resources/spring-server-ssl-node.xml   |   69 +-
 .../src/main/java/org/apache/ignite/Ignite.java |    8 +
 .../java/org/apache/ignite/IgniteBinary.java    |   35 +-
 .../org/apache/ignite/IgniteFileSystem.java     |   26 +-
 .../org/apache/ignite/IgniteJdbcDriver.java     |   11 +-
 .../java/org/apache/ignite/MemoryMetrics.java   |   95 +
 .../binary/BinaryAbstractIdentityResolver.java  |   53 -
 .../binary/BinaryArrayIdentityResolver.java     |  224 --
 .../binary/BinaryFieldIdentityResolver.java     |  307 ---
 .../ignite/binary/BinaryIdentityResolver.java   |   42 -
 .../ignite/binary/BinaryTypeConfiguration.java  |   25 -
 .../apache/ignite/cache/CacheMemoryMode.java    |   63 -
 .../org/apache/ignite/cache/CacheMetrics.java   |   70 -
 .../org/apache/ignite/cache/CachePeekMode.java  |    5 +-
 .../ignite/cache/CacheTypeFieldMetadata.java    |  149 --
 .../apache/ignite/cache/CacheTypeMetadata.java  |  379 ----
 .../org/apache/ignite/cache/QueryEntity.java    |    3 +
 .../affinity/fair/FairAffinityFunction.java     | 1159 ----------
 .../cache/affinity/fair/package-info.java       |   21 -
 .../store/jdbc/CacheAbstractJdbcStore.java      |   55 -
 .../configuration/CacheConfiguration.java       |  344 +--
 .../configuration/CollectionConfiguration.java  |   16 -
 .../configuration/DataPageEvictionMode.java     |   44 +
 .../configuration/FileSystemConfiguration.java  |    6 +-
 .../configuration/IgniteConfiguration.java      |   34 +-
 .../configuration/MemoryConfiguration.java      |   22 +-
 .../MemoryPolicyConfiguration.java              |   88 +-
 .../configuration/NearCacheConfiguration.java   |   57 +-
 .../ignite/internal/GridKernalContext.java      |    7 +
 .../ignite/internal/GridKernalContextImpl.java  |   11 +
 .../ignite/internal/IgniteEventsImpl.java       |    8 +-
 .../apache/ignite/internal/IgniteKernal.java    |   12 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |   22 +-
 .../ignite/internal/MarshallerContextImpl.java  |   20 +-
 .../binary/BinaryAbstractIdentityResolver.java  |   56 +
 .../binary/BinaryArrayIdentityResolver.java     |  222 ++
 .../ignite/internal/binary/BinaryContext.java   |    4 +-
 .../internal/binary/BinaryIdentityResolver.java |   43 +
 .../internal/binary/BinaryObjectExImpl.java     |    1 -
 .../internal/binary/BinaryWriterExImpl.java     |    1 -
 .../binary/builder/BinaryObjectBuilderImpl.java |   36 +-
 .../ignite/internal/jdbc2/JdbcConnection.java   |   50 +-
 .../managers/communication/GridIoManager.java   |    2 +
 .../communication/GridIoMessageFactory.java     |   20 +-
 .../managers/communication/GridIoPolicy.java    |    5 +-
 .../eventstorage/GridEventStorageManager.java   |   12 +-
 .../apache/ignite/internal/pagemem/Page.java    |   84 -
 .../ignite/internal/pagemem/PageMemory.java     |   20 +-
 .../ignite/internal/pagemem/PageSupport.java    |  114 +
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |  182 +-
 .../internal/pagemem/impl/PageNoStoreImpl.java  |  141 --
 .../cache/CacheClusterMetricsMXBeanImpl.java    |   50 -
 .../processors/cache/CacheEvictionManager.java  |   15 -
 .../cache/CacheLocalMetricsMXBeanImpl.java      |   50 -
 .../processors/cache/CacheMetricsImpl.java      |  134 +-
 .../processors/cache/CacheMetricsSnapshot.java  |  120 -
 .../cache/CacheOffheapEvictionManager.java      |   22 +-
 .../processors/cache/GridCacheAdapter.java      |  101 +-
 .../processors/cache/GridCacheAtomicFuture.java |    2 +-
 .../processors/cache/GridCacheAttributes.java   |   14 -
 .../cache/GridCacheConcurrentMap.java           |    7 +-
 .../cache/GridCacheConcurrentMapImpl.java       |  221 +-
 .../processors/cache/GridCacheContext.java      |    2 -
 .../processors/cache/GridCacheEntryEx.java      |    5 +-
 .../cache/GridCacheEvictionManager.java         | 1757 +--------------
 .../cache/GridCacheEvictionRequest.java         |  248 --
 .../cache/GridCacheEvictionResponse.java        |  225 --
 .../processors/cache/GridCacheIoManager.java    |   14 -
 .../cache/GridCacheLocalConcurrentMap.java      |   54 +
 .../processors/cache/GridCacheMapEntry.java     |   46 +-
 .../processors/cache/GridCacheMvccManager.java  |   84 +-
 .../GridCachePartitionExchangeManager.java      |    6 +-
 .../processors/cache/GridCachePreloader.java    |    4 +-
 .../cache/GridCachePreloaderAdapter.java        |    4 +-
 .../processors/cache/GridCacheProcessor.java    |   49 +-
 .../processors/cache/GridCacheUtils.java        |    8 -
 .../cache/GridDeferredAckMessageSender.java     |   11 +-
 .../processors/cache/GridNoStorageCacheMap.java |    1 +
 .../cache/IgniteCacheOffheapManagerImpl.java    |  103 +-
 .../processors/cache/database/CacheDataRow.java |    5 +
 .../cache/database/CacheDataRowAdapter.java     |  138 +-
 .../cache/database/DataStructure.java           |  243 +-
 .../IgniteCacheDatabaseSharedManager.java       |  212 +-
 .../cache/database/IgniteMemoryPoolMetrics.java |   33 -
 .../cache/database/MemoryMetricsImpl.java       |  314 +++
 .../processors/cache/database/MemoryPolicy.java |   35 +-
 .../processors/cache/database/RowStore.java     |   10 -
 .../evict/FairFifoPageEvictionTracker.java      |   74 +
 .../database/evict/NoOpPageEvictionTracker.java |   50 +
 .../evict/PageAbstractEvictionTracker.java      |  243 ++
 .../database/evict/PageEvictionTracker.java     |   52 +
 .../evict/Random2LruPageEvictionTracker.java    |  180 ++
 .../evict/RandomLruPageEvictionTracker.java     |  157 ++
 .../cache/database/freelist/FreeListImpl.java   |  232 +-
 .../cache/database/freelist/PagesList.java      |  637 +++---
 .../cache/database/tree/BPlusTree.java          |  979 ++++----
 .../cache/database/tree/io/DataPageIO.java      |  110 +-
 .../cache/database/tree/io/PageIO.java          |    3 +-
 .../database/tree/reuse/ReuseListImpl.java      |    2 +-
 .../cache/database/tree/util/PageHandler.java   |  381 +++-
 .../database/tree/util/PageLockListener.java    |   42 +-
 .../GridDistributedCacheAdapter.java            |    6 +
 .../dht/GridCachePartitionedConcurrentMap.java  |   15 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |   29 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  318 +--
 .../dht/GridDhtPartitionTopologyImpl.java       |    2 +-
 .../GridDhtAtomicAbstractUpdateFuture.java      |    4 +-
 .../dht/atomic/GridDhtAtomicCache.java          |   57 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |    2 +-
 .../GridNearAtomicSingleUpdateFuture.java       |   21 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   23 +-
 .../dht/preloader/GridDhtPartitionDemander.java |    2 +-
 .../dht/preloader/GridDhtPartitionMap.java      |   13 +-
 .../dht/preloader/GridDhtPartitionSupplier.java |    8 +-
 .../GridDhtPartitionSupplyMessage.java          |  103 +-
 .../GridDhtPartitionSupplyMessageV2.java        |  422 ----
 .../dht/preloader/GridDhtPreloader.java         |    6 +-
 .../distributed/near/GridNearCacheAdapter.java  |   21 +-
 .../cache/distributed/near/GridNearTxLocal.java |    2 +
 .../distributed/near/GridNearTxRemote.java      |    4 +-
 .../local/atomic/GridLocalAtomicCache.java      |    6 +-
 .../cache/transactions/IgniteTxHandler.java     |    2 +-
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../cache/version/GridCacheVersionManager.java  |    3 +
 .../cacheobject/IgniteCacheObjectProcessor.java |    7 -
 .../IgniteCacheObjectProcessorImpl.java         |   16 -
 .../clock/GridClockDeltaSnapshot.java           |    2 +-
 .../continuous/GridContinuousProcessor.java     |    3 +-
 .../datastructures/DataStructuresProcessor.java |    1 -
 .../internal/processors/igfs/IgfsAsyncImpl.java |    8 +-
 .../internal/processors/igfs/IgfsImpl.java      |   20 +-
 .../platform/cache/PlatformCache.java           |   10 -
 .../utils/PlatformConfigurationUtils.java       |  148 +-
 .../internal/processors/pool/PoolProcessor.java |   10 +-
 .../processors/query/GridQueryProcessor.java    |   10 -
 .../internal/processors/query/QueryUtils.java   |  328 +--
 .../processors/service/GridServiceProxy.java    |   10 +
 .../task/GridTaskThreadContextKey.java          |    7 +-
 .../processors/task/GridTaskWorker.java         |   16 +-
 .../org/apache/ignite/internal/util/F0.java     |  196 +-
 .../apache/ignite/internal/util/IgniteTree.java |   14 +
 .../ignite/internal/util/lang/GridFunc.java     |  620 +----
 .../visor/cache/VisorCacheConfiguration.java    |    3 +-
 .../cache/VisorCacheEvictionConfiguration.java  |   55 -
 .../cache/VisorCacheQueryConfiguration.java     |    1 -
 .../cache/VisorCacheTypeFieldMetadata.java      |   14 +-
 .../visor/cache/VisorCacheTypeMetadata.java     |   91 +-
 .../visor/igfs/VisorIgfsFormatTask.java         |    2 +-
 .../visor/node/VisorIgfsConfiguration.java      |    2 +-
 .../visor/node/VisorMemoryConfiguration.java    |    1 -
 .../ignite/mxbean/CacheMetricsMXBean.java       |   40 -
 .../ignite/mxbean/MemoryMetricsMXBean.java      |   89 +
 .../ignite/spi/collision/CollisionSpi.java      |   11 +-
 .../communication/tcp/TcpCommunicationSpi.java  |    4 +-
 .../deployment/local/LocalDeploymentSpi.java    |    5 +-
 .../ignite/spi/discovery/tcp/ServerImpl.java    |    3 +-
 .../spi/eventstorage/NoopEventStorageSpi.java   |   53 +
 .../resources/META-INF/classnames.properties    |    2 -
 .../core/src/test/config/spring-multicache.xml  |   16 +
 .../test/config/store/jdbc/ignite-jdbc-type.xml |  279 +++
 .../config/store/jdbc/ignite-type-metadata.xml  |  276 ---
 .../config/websession/example-cache-client.xml  |    4 +
 .../GridCacheAffinityBackupsSelfTest.java       |   20 +-
 .../ignite/IgniteCacheAffinitySelfTest.java     |   12 +-
 .../affinity/AffinityClientNodeSelfTest.java    |   15 +-
 .../affinity/AffinityHistoryCleanupTest.java    |    3 +-
 .../fair/FairAffinityDynamicCacheSelfTest.java  |   86 -
 ...airAffinityFunctionBackupFilterSelfTest.java |   44 -
 ...ffinityFunctionExcludeNeighborsSelfTest.java |   31 -
 .../fair/FairAffinityFunctionNodesSelfTest.java |  247 --
 .../fair/FairAffinityFunctionSelfTest.java      |   31 -
 .../affinity/fair/FairAffinityNodesRestart.java |  130 --
 .../local/LocalAffinityFunctionTest.java        |    4 +-
 ...eJdbcStoreAbstractMultithreadedSelfTest.java |   71 +-
 .../cache/store/jdbc/model/Organization.java    |    2 -
 .../cache/store/jdbc/model/OrganizationKey.java |    2 -
 .../ignite/cache/store/jdbc/model/Person.java   |    2 -
 .../store/jdbc/model/PersonComplexKey.java      |    4 +-
 .../cache/store/jdbc/model/PersonKey.java       |    2 -
 .../ignite/custom/DummyEventFilterFactory.java  |   47 +
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |    2 +-
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |    2 +-
 .../ignite/igfs/IgfsFragmentizerSelfTest.java   |    2 +-
 .../internal/ClusterNodeMetricsSelfTest.java    |   46 +-
 .../GridEventStorageDefaultExceptionTest.java   |   94 +
 .../MarshallerContextLockingSelfTest.java       |   33 +-
 .../BinaryArrayIdentityResolverSelfTest.java    |    4 -
 .../BinaryFieldIdentityResolverSelfTest.java    |  333 ---
 ...ryIdentityResolverConfigurationSelfTest.java |  138 --
 .../BinaryObjectBuilderAdditionalSelfTest.java  |    1 -
 ...naryObjectBuilderDefaultMappersSelfTest.java |    1 -
 .../pagemem/impl/PageMemoryNoLoadSelfTest.java  |  119 +-
 .../BinaryObjectOffHeapUnswapTemporaryTest.java |  365 ---
 .../cache/CacheClientStoreSelfTest.java         |    4 +
 .../cache/CacheConfigurationLeakTest.java       |    4 +-
 .../cache/CacheDeferredDeleteQueueTest.java     |    2 +-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java |    2 +-
 .../cache/CacheEnumOperationsAbstractTest.java  |   52 +-
 ...CacheExchangeMessageDuplicatedStateTest.java |   33 -
 .../cache/CacheGetEntryAbstractTest.java        |    2 +
 ...erceptorPartitionCounterLocalSanityTest.java |   25 +-
 ...torPartitionCounterRandomOperationsTest.java |  111 -
 .../cache/CacheNearReaderUpdateTest.java        |   12 -
 .../cache/CacheOffheapMapEntrySelfTest.java     |   42 +-
 .../CachePutEventListenerErrorSelfTest.java     |   41 +-
 .../CacheSerializableTransactionsTest.java      |   54 +-
 .../cache/CacheStopAndDestroySelfTest.java      |   48 +-
 .../cache/CacheSwapUnswapGetTest.java           |  310 ---
 .../cache/ClusterStateAbstractTest.java         |   15 +-
 .../cache/CrossCacheTxRandomOperationsTest.java |   36 +-
 ...idAbstractCacheInterceptorRebalanceTest.java |    6 -
 ...ridCacheAbstractByteArrayValuesSelfTest.java |    6 -
 .../cache/GridCacheAbstractFullApiSelfTest.java |  184 +-
 .../GridCacheAbstractLocalStoreSelfTest.java    |   13 -
 .../GridCacheAbstractRemoveFailureTest.java     |   26 +-
 .../cache/GridCacheAbstractSelfTest.java        |   21 +-
 .../cache/GridCacheClearSelfTest.java           |  113 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |    2 +-
 .../GridCacheConditionalDeploymentSelfTest.java |   19 +-
 ...idCacheConfigurationConsistencySelfTest.java |   41 +-
 .../GridCacheDeploymentOffHeapSelfTest.java     |   41 -
 ...ridCacheDeploymentOffHeapValuesSelfTest.java |   41 -
 .../GridCacheEvictionEventAbstractTest.java     |    5 +-
 ...heInterceptorAtomicOffheapRebalanceTest.java |   30 -
 ...GridCacheInterceptorAtomicRebalanceTest.java |    6 -
 ...ceptorTransactionalOffheapRebalanceTest.java |   35 -
 ...heInterceptorTransactionalRebalanceTest.java |    6 -
 .../cache/GridCacheLifecycleAwareSelfTest.java  |    1 +
 .../cache/GridCacheMemoryModeSelfTest.java      |  285 ---
 .../cache/GridCacheObjectToStringSelfTest.java  |    1 +
 ...HeapMultiThreadedUpdateAbstractSelfTest.java |    3 -
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  679 ------
 .../GridCacheOffHeapTieredAtomicSelfTest.java   |   32 -
 ...heOffHeapTieredEvictionAbstractSelfTest.java |  364 ---
 ...acheOffHeapTieredEvictionAtomicSelfTest.java |   32 -
 .../GridCacheOffHeapTieredEvictionSelfTest.java |   33 -
 .../cache/GridCacheOffHeapTieredSelfTest.java   |   33 -
 .../cache/GridCacheOffheapUpdateSelfTest.java   |    3 -
 .../cache/GridCachePartitionedGetSelfTest.java  |    1 -
 ...chePartitionedOffHeapLocalStoreSelfTest.java |   44 -
 .../GridCachePreloadingEvictionsSelfTest.java   |    7 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   58 -
 .../cache/GridCacheReloadSelfTest.java          |    4 +-
 .../cache/GridCacheSwapPreloadSelfTest.java     |    1 -
 .../processors/cache/GridCacheTestEntryEx.java  |    2 +-
 .../GridCacheTtlManagerEvictionSelfTest.java    |   26 +-
 .../GridCacheValueBytesPreloadingSelfTest.java  |   44 -
 .../GridCacheVersionTopologyChangeTest.java     |    5 -
 .../processors/cache/H2CacheStoreStrategy.java  |    2 +-
 .../cache/IgniteCacheAbstractTest.java          |    6 +-
 ...IgniteCacheAtomicPutAllFailoverSelfTest.java |    5 -
 .../IgniteCacheConfigVariationsFullApiTest.java |  189 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |   11 -
 ...cheEntryListenerAtomicOffheapTieredTest.java |   32 -
 ...cheEntryListenerAtomicOffheapValuesTest.java |   32 -
 ...niteCacheEntryListenerExpiredEventsTest.java |   26 +-
 ...teCacheEntryListenerTxOffheapTieredTest.java |   32 -
 ...teCacheEntryListenerTxOffheapValuesTest.java |   32 -
 ...niteCacheExpireAndUpdateConsistencyTest.java |   35 +-
 .../IgniteCacheInterceptorSelfTestSuite.java    |    2 -
 ...gniteCacheInvokeReadThroughAbstractTest.java |    4 -
 ...iteCacheInvokeReadThroughSingleNodeTest.java |   32 +-
 .../cache/IgniteCacheInvokeReadThroughTest.java |   92 +-
 ...gniteCacheLoadRebalanceEvictionSelfTest.java |    3 +-
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |    4 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |  117 +-
 .../IgniteCacheReadThroughEvictionSelfTest.java |   10 +-
 .../IgniteCacheStoreValueAbstractTest.java      |    5 -
 .../IgniteCacheTopologySafeGetSelfTest.java     |    2 +-
 .../cache/IgniteCacheTxNearPeekModesTest.java   |    5 +-
 .../cache/IgniteCacheTxPeekModesTest.java       |    5 +-
 .../IgniteClientAffinityAssignmentSelfTest.java |   20 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |    3 -
 .../cache/OffHeapTieredTransactionSelfTest.java |  134 --
 ...heapCacheMetricsForClusterGroupSelfTest.java |    3 -
 ...ryDuplicateIndexObjectsAbstractSelfTest.java |  161 --
 .../GridCacheBinaryObjectsAbstractSelfTest.java |   84 +-
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 -
 ...xObjectPartitionedTransactionalSelfTest.java |   41 -
 ...AtomicNearDisabledOffheapTieredSelfTest.java |   29 -
 ...ObjectsAtomicNearDisabledOnheapSelfTest.java |   25 +
 ...inaryObjectsAtomicOffheapTieredSelfTest.java |   29 -
 ...dCacheBinaryObjectsAtomicOnheapSelfTest.java |   25 +
 ...tionedNearDisabledOffheapTieredSelfTest.java |   30 -
 ...tsPartitionedNearDisabledOnheapSelfTest.java |   25 +
 ...ObjectsPartitionedOffheapTieredSelfTest.java |   30 -
 ...eBinaryObjectsPartitionedOnheapSelfTest.java |   25 +
 .../dht/GridCacheMemoryModeBinarySelfTest.java  |   36 -
 ...dCacheOffHeapTieredAtomicBinarySelfTest.java |   48 -
 .../GridCacheOffHeapTieredBinarySelfTest.java   |   48 -
 ...fHeapTieredEvictionAtomicBinarySelfTest.java |   96 -
 ...acheOffHeapTieredEvictionBinarySelfTest.java |   96 -
 ...BinaryObjectsLocalOffheapTieredSelfTest.java |   29 -
 ...idCacheBinaryObjectsLocalOnheapSelfTest.java |   26 +
 .../GridCacheQueueCleanupSelfTest.java          |    7 -
 ...dCacheQueueMultiNodeConsistencySelfTest.java |    7 -
 .../IgniteCollectionAbstractTest.java           |    7 -
 .../IgniteDataStructureUniqueNameTest.java      |    7 -
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |   32 -
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |    6 -
 .../local/GridCacheLocalAtomicSetSelfTest.java  |    7 -
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |   31 -
 .../local/GridCacheLocalQueueApiSelfTest.java   |    7 -
 .../local/GridCacheLocalSetSelfTest.java        |    7 -
 ...artitionedAtomicOffheapQueueApiSelfTest.java |   32 -
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |   32 -
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |   32 -
 ...dCachePartitionedAtomicQueueApiSelfTest.java |    7 -
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |    7 -
 ...micQueueFailoverDataConsistencySelfTest.java |    7 -
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |    7 -
 ...itionedAtomicQueueRotativeMultiNodeTest.java |    7 -
 ...chePartitionedAtomicSetFailoverSelfTest.java |    7 -
 ...rtitionedDataStructuresFailoverSelfTest.java |    7 -
 ...artitionedOffHeapValuesQueueApiSelfTest.java |   35 -
 ...achePartitionedOffHeapValuesSetSelfTest.java |   32 -
 ...edOffheapDataStructuresFailoverSelfTest.java |   33 -
 ...hePartitionedOffheapSetFailoverSelfTest.java |   32 -
 .../GridCachePartitionedQueueApiSelfTest.java   |    7 -
 ...PartitionedQueueCreateMultiNodeSelfTest.java |    7 -
 ...dCachePartitionedQueueEntryMoveSelfTest.java |    7 -
 ...nedQueueFailoverDataConsistencySelfTest.java |    7 -
 ...CachePartitionedQueueJoinedNodeSelfTest.java |    7 -
 ...dCachePartitionedQueueMultiNodeSelfTest.java |    7 -
 ...hePartitionedQueueRotativeMultiNodeTest.java |    7 -
 ...GridCachePartitionedSetFailoverSelfTest.java |    7 -
 .../GridCachePartitionedSetSelfTest.java        |    7 -
 .../IgnitePartitionedQueueNoBackupsTest.java    |    7 -
 ...eplicatedDataStructuresFailoverSelfTest.java |    7 -
 .../GridCacheReplicatedQueueApiSelfTest.java    |    7 -
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |    7 -
 ...cheReplicatedQueueRotativeMultiNodeTest.java |    7 -
 .../GridCacheReplicatedSetSelfTest.java         |    7 -
 ...eLateAffinityAssignmentFairAffinityTest.java |   32 -
 .../CacheLateAffinityAssignmentTest.java        |    6 +-
 ...tractDistributedByteArrayValuesSelfTest.java |  120 +-
 .../GridCacheAbstractNodeRestartSelfTest.java   |  116 +-
 ...tractPartitionedByteArrayValuesSelfTest.java |   33 -
 ...heExpiredEntriesPreloadAbstractSelfTest.java |  122 -
 .../IgniteCacheAtomicNodeRestartTest.java       |    5 -
 ...teCacheClientNodePartitionsExchangeTest.java |   18 +-
 .../IgniteCacheNearOffheapGetSelfTest.java      |  136 --
 .../IgniteCacheReadFromBackupTest.java          |    6 +-
 .../IgniteCacheTxFairAffinityNodeJoinTest.java  |   35 -
 .../IgniteCacheTxIteratorSelfTest.java          |   34 +-
 ...arDisabledFairAffinityPutGetRestartTest.java |   35 -
 ...tPartitionedOnlyByteArrayValuesSelfTest.java |   55 +-
 ...acheAtomicExpiredEntriesPreloadSelfTest.java |   46 -
 ...eColocatedOptimisticTransactionSelfTest.java |    1 -
 .../dht/GridCacheDhtEntrySelfTest.java          |    4 +-
 ...GridCacheDhtEvictionNearReadersSelfTest.java |    6 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |  356 ---
 ...idCacheDhtExpiredEntriesPreloadSelfTest.java |   39 -
 .../dht/GridCacheDhtPreloadOffHeapSelfTest.java |   38 -
 .../dht/GridCacheDhtPreloadOnheapSelfTest.java  |   26 +
 .../dht/GridCacheDhtPreloadSelfTest.java        |   38 +-
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   43 -
 ...NearDisabledAtomicOnheapFullApiSelfTest.java |   38 +
 ...ledAtomicOnheapMultiNodeFullApiSelfTest.java |   38 +
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...ionedNearDisabledOffHeapFullApiSelfTest.java |   33 -
 ...DisabledOffHeapMultiNodeFullApiSelfTest.java |   33 -
 ...abledOffHeapTieredAtomicFullApiSelfTest.java |   57 -
 ...earDisabledOffHeapTieredFullApiSelfTest.java |   33 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 ...tionedNearDisabledOnheapFullApiSelfTest.java |   27 +
 ...rDisabledOnheapMultiNodeFullApiSelfTest.java |   27 +
 .../dht/IgniteCacheConcurrentPutGetRemove.java  |   27 +-
 .../IgniteCacheCrossCacheTxFailoverTest.java    |   46 +-
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |    1 +
 .../IgniteCachePutRetryAbstractSelfTest.java    |   53 +-
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |    2 +-
 ...gniteCachePutRetryTransactionalSelfTest.java |   28 +-
 .../AtomicPutAllChangingTopologyTest.java       |    4 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   65 +-
 .../atomic/IgniteCacheAtomicProtocolTest.java   |    3 +-
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java |  113 +-
 ...micFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...eAtomicNearOnlyMultiNodeFullApiSelfTest.java |   52 -
 .../GridCacheAtomicOffHeapFullApiSelfTest.java  |   67 -
 ...heAtomicOffHeapMultiNodeFullApiSelfTest.java |   68 -
 ...CacheAtomicOffHeapTieredFullApiSelfTest.java |   32 -
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 .../GridCacheAtomicOnheapFullApiSelfTest.java   |   28 +
 ...cheAtomicOnheapMultiNodeFullApiSelfTest.java |   26 +
 ...derFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...PrimaryWriteOrderOffHeapFullApiSelfTest.java |   32 -
 ...yWriteOrderOffHeapTieredFullApiSelfTest.java |   33 -
 ...cPrimaryWriteOrderOnheapFullApiSelfTest.java |   28 +
 ...riteOrderOnheapMultiNodeFullApiSelfTest.java |   29 +
 ...ityOrderOffHeapMultiNodeFullApiSelfTest.java |   33 -
 ...erOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 ...dCacheNearExpiredEntriesPreloadSelfTest.java |   33 -
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 .../near/GridCacheNearReadersSelfTest.java      |    7 +-
 ...ePartitionedAtomicOnheapFullApiSelfTest.java |   38 +
 ...nedAtomicOnheapMultiNodeFullApiSelfTest.java |   38 +
 .../GridCachePartitionedEvictionSelfTest.java   |    1 +
 .../GridCachePartitionedFullApiSelfTest.java    |    2 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |   43 -
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    2 +-
 ...dCachePartitionedOffHeapFullApiSelfTest.java |   32 -
 ...titionedOffHeapMultiNodeFullApiSelfTest.java |   32 -
 ...PartitionedOffHeapTieredFullApiSelfTest.java |   32 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   74 -
 ...idCachePartitionedOnheapFullApiSelfTest.java |   26 +
 ...rtitionedOnheapMultiNodeFullApiSelfTest.java |   26 +
 .../GridNearOffheapCacheStoreUpdateTest.java    |   35 -
 ...eRebalancingUnmarshallingFailedSelfTest.java |    6 +-
 ...xcludeNeighborsMultiNodeFullApiSelfTest.java |   36 -
 ...tedFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...stractReplicatedByteArrayValuesSelfTest.java |   29 -
 ...nedFairAffinityMultiNodeFullApiSelfTest.java |   37 -
 .../GridCacheReplicatedEvictionSelfTest.java    |  135 --
 ...idCacheReplicatedOffHeapFullApiSelfTest.java |   32 -
 ...plicatedOffHeapMultiNodeFullApiSelfTest.java |   32 -
 ...eReplicatedOffHeapTieredFullApiSelfTest.java |   33 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 ...ridCacheReplicatedOnheapFullApiSelfTest.java |   26 +
 ...eplicatedOnheapMultiNodeFullApiSelfTest.java |   26 +
 ...idCacheReplicatedPreloadOffHeapSelfTest.java |   37 -
 .../cache/eviction/EvictionAbstractTest.java    |   37 +-
 .../GridCacheBatchEvictUnswapSelfTest.java      |  199 --
 ...heConcurrentEvictionConsistencySelfTest.java |    6 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |    1 +
 .../GridCacheDistributedEvictionsSelfTest.java  |  235 --
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |    4 +-
 .../GridCacheEvictableEntryEqualsSelfTest.java  |    1 +
 .../GridCacheEvictionFilterSelfTest.java        |    2 +-
 .../GridCacheEvictionLockUnlockSelfTest.java    |    1 +
 .../GridCacheEvictionTouchSelfTest.java         |   12 +-
 ...cheSynchronousEvictionsFailoverSelfTest.java |  166 --
 .../lru/LruNearEvictionPolicySelfTest.java      |   28 -
 .../LruNearOnlyNearEvictionPolicySelfTest.java  |   55 -
 .../paged/PageEvictionAbstractTest.java         |  124 +
 .../paged/PageEvictionMultinodeTest.java        |  110 +
 .../paged/PageEvictionReadThroughTest.java      |  140 ++
 .../paged/PageEvictionTouchOrderTest.java       |  109 +
 .../paged/PageEvictionWithRebalanceTest.java    |   81 +
 .../Random2LruPageEvictionMultinodeTest.java    |   30 +
 ...Random2LruPageEvictionWithRebalanceTest.java |   30 +
 .../RandomLruPageEvictionMultinodeTest.java     |   30 +
 .../RandomLruPageEvictionWithRebalanceTest.java |   30 +
 .../cache/eviction/paged/TestObject.java        |   78 +
 .../SortedEvictionPolicyPerformanceTest.java    |    2 +-
 ...CacheAtomicLocalOffheapExpiryPolicyTest.java |   30 -
 ...eCacheAtomicLocalOnheapExpiryPolicyTest.java |   26 +
 ...gniteCacheAtomicOffheapExpiryPolicyTest.java |   30 -
 ...IgniteCacheAtomicOnheapExpiryPolicyTest.java |   26 +
 ...rimaryWriteOrderOffheapExpiryPolicyTest.java |   31 -
 ...teOrderWithStoreOffheapExpiryPolicyTest.java |   31 -
 ...AtomicReplicatedOffheapExpiryPolicyTest.java |   30 -
 ...eAtomicWithStoreOffheapExpiryPolicyTest.java |   30 -
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   13 -
 .../IgniteCacheExpiryPolicyTestSuite.java       |   13 -
 ...eCacheExpiryPolicyWithStoreAbstractTest.java |    3 -
 ...niteCacheTxLocalOffheapExpiryPolicyTest.java |   30 -
 .../IgniteCacheTxOffheapExpiryPolicyTest.java   |   30 -
 ...acheTxReplicatedOffheapExpiryPolicyTest.java |   30 -
 ...CacheTxWithStoreOffheapExpiryPolicyTest.java |   30 -
 ...dCacheLocalAtomicOffHeapFullApiSelfTest.java |   42 -
 ...LocalAtomicOffHeapTieredFullApiSelfTest.java |   32 -
 .../GridCacheLocalByteArrayValuesSelfTest.java  |   64 +-
 .../GridCacheLocalOffHeapFullApiSelfTest.java   |   30 -
 ...dCacheLocalOffHeapTieredFullApiSelfTest.java |   32 -
 ...LocalCacheOffHeapAndSwapMetricsSelfTest.java |  627 ------
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...omicFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   36 -
 ...cheAtomicOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...micOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...acheAtomicOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...rderFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...WriteOrderOnheapMultiJvmFullApiSelfTest.java |   29 +
 ...rityOrderOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...derOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...onedFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...micOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...bledAtomicOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...rDisabledOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...ledOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...arDisabledOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...rtitionedOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...nedOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...artitionedOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...eplicatedOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...tedOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...ReplicatedOnheapMultiJvmFullApiSelfTest.java |   28 +
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  450 ----
 .../query/GridCacheSwapScanQuerySelfTest.java   |   25 -
 .../IgniteCacheQueryCacheDestroySelfTest.java   |    2 -
 .../continuous/CacheContinuousBatchAckTest.java |   73 +-
 ...eContinuousQueryAsyncFilterListenerTest.java |  170 +-
 ...acheContinuousQueryExecuteInPrimaryTest.java |    2 -
 ...usQueryFactoryFilterRandomOperationTest.java |    2 -
 ...ContinuousQueryFailoverAbstractSelfTest.java |   10 -
 ...tomicPrimaryWriteOrderOffheapTieredTest.java |   33 -
 ...tinuousQueryFailoverTxOffheapTieredTest.java |   32 -
 .../CacheContinuousQueryOperationP2PTest.java   |   31 +-
 .../CacheContinuousQueryOrderingEventTest.java  |  127 +-
 ...acheContinuousQueryRandomOperationsTest.java |  246 --
 ...CacheKeepBinaryIterationNearEnabledTest.java |    6 +-
 ...acheKeepBinaryIterationStoreEnabledTest.java |    6 +-
 .../CacheKeepBinaryIterationTest.java           |  105 +-
 .../ContinuousQueryPeerClassLoadingTest.java    |  142 ++
 ...ridCacheContinuousQueryAbstractSelfTest.java |   10 -
 ...eContinuousQueryAtomicOffheapTieredTest.java |   32 -
 ...eContinuousQueryAtomicOffheapValuesTest.java |   32 -
 ...CacheContinuousQueryTxOffheapTieredTest.java |   32 -
 ...CacheContinuousQueryTxOffheapValuesTest.java |   32 -
 .../IgniteCacheContinuousQueryClientTest.java   |   23 +-
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |   35 -
 ...PartitionedTransactionalOffHeapSelfTest.java |   36 -
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |   35 -
 ...yReplicatedTransactionalOffHeapSelfTest.java |   36 -
 .../database/BPlusTreeReuseSelfTest.java        |   29 +-
 .../processors/database/BPlusTreeSelfTest.java  |  123 +-
 .../database/FreeListImplSelfTest.java          |   16 +-
 .../database/MemoryMetricsSelfTest.java         |  313 +++
 .../database/MetadataStorageSelfTest.java       |    3 +-
 .../DataStreamProcessorSelfTest.java            |    2 -
 ...faultIgfsSecondaryFileSystemTestAdapter.java |    2 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |   20 +-
 .../processors/igfs/IgfsAbstractSelfTest.java   |   15 +-
 .../IgfsAtomicPrimaryOffheapTieredSelfTest.java |   39 -
 .../IgfsAtomicPrimaryOffheapValuesSelfTest.java |   39 -
 ...sCachePerBlockLruEvictionPolicySelfTest.java |    3 +-
 .../processors/igfs/IgfsIgniteMock.java         |    8 +
 .../processors/igfs/IgfsMaxSizeSelfTest.java    |    1 -
 .../igfs/IgfsMetaManagerSelfTest.java           |    2 +-
 .../processors/igfs/IgfsMetricsSelfTest.java    |    2 +-
 .../internal/processors/igfs/IgfsMock.java      |    4 +-
 .../igfs/IgfsPrimaryOffheapTieredSelfTest.java  |   33 -
 .../igfs/IgfsPrimaryOffheapValuesSelfTest.java  |   33 -
 .../processors/igfs/IgfsProcessorSelfTest.java  |    8 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |    2 +-
 .../processors/igfs/IgfsTaskSelfTest.java       |    2 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |    2 +-
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    1 +
 .../GridCachePartitionedAtomicLongLoadTest.java |    2 +-
 .../marshaller/MarshallerContextSelfTest.java   |   80 +-
 .../platform/PlatformCacheWriteMetricsTask.java |  126 +-
 .../ignite/platform/PlatformStopIgniteTask.java |   11 +-
 .../services/ServiceThreadPoolSelfTest.java     |  133 ++
 ...gniteClientReconnectMassiveShutdownTest.java |    3 -
 .../ignite/testframework/GridTestUtils.java     |  113 -
 .../configvariations/ConfigVariations.java      |   28 +-
 .../testframework/junits/GridAbstractTest.java  |   56 +-
 .../junits/GridTestKernalContext.java           |    1 +
 ...IgniteCacheConfigVariationsAbstractTest.java |   38 +-
 .../ignite/testframework/junits/IgniteMock.java |    6 +
 .../junits/common/GridCommonAbstractTest.java   |   10 +-
 .../junits/multijvm/IgniteProcessProxy.java     |    6 +
 .../ConfigVariationsTestSuiteBuilderTest.java   |    4 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    4 +-
 .../testsuites/IgniteBinaryCacheTestSuite.java  |   19 -
 .../IgniteBinaryObjectsTestSuite.java           |   17 -
 .../IgniteCacheDataStructuresSelfTestSuite.java |   18 -
 .../IgniteCacheEvictionSelfTestSuite.java       |   21 +-
 .../IgniteCacheFailoverTestSuite.java           |    4 -
 ...IgniteCacheFullApiMultiJvmSelfTestSuite.java |   54 +-
 .../IgniteCacheFullApiSelfTestSuite.java        |  102 +-
 .../IgniteCacheMetricsSelfTestSuite.java        |    2 -
 .../ignite/testsuites/IgniteCacheTestSuite.java |   36 +-
 .../testsuites/IgniteCacheTestSuite2.java       |   37 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |    9 -
 .../testsuites/IgniteCacheTestSuite5.java       |   10 -
 .../testsuites/IgniteComputeGridTestSuite.java  |    2 +
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |    9 -
 .../testsuites/IgniteKernalSelfTestSuite.java   |    2 +
 .../hadoop/impl/v2/HadoopV2Context.java         |    6 +-
 .../impl/HadoopAbstractMapReduceTest.java       |    1 -
 .../impl/HadoopTaskExecutionSelfTest.java       |    2 +-
 ...opClientProtocolMultipleServersSelfTest.java |    2 +-
 .../client/HadoopClientProtocolSelfTest.java    |    2 +-
 .../igfs/HadoopFIleSystemFactorySelfTest.java   |    1 -
 .../igfs/HadoopIgfsDualAbstractSelfTest.java    |    1 -
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |    2 +-
 .../HibernateAccessStrategyAdapter.java         |    8 +-
 .../cache/hibernate/HibernateCacheProxy.java    |  811 +++++++
 .../hibernate/HibernateCollectionRegion.java    |    3 +-
 .../cache/hibernate/HibernateEntityRegion.java  |    3 +-
 .../hibernate/HibernateGeneralDataRegion.java   |    3 +-
 .../hibernate/HibernateKeyTransformer.java      |   28 +
 .../cache/hibernate/HibernateKeyWrapper.java    |   72 +
 .../hibernate/HibernateNaturalIdRegion.java     |    3 +-
 .../HibernateNonStrictAccessStrategy.java       |    5 +-
 .../hibernate/HibernateQueryResultsRegion.java  |    3 +-
 .../HibernateReadOnlyAccessStrategy.java        |    3 +-
 .../HibernateReadWriteAccessStrategy.java       |    3 +-
 .../ignite/cache/hibernate/HibernateRegion.java |    6 +-
 .../cache/hibernate/HibernateRegionFactory.java |   30 +-
 .../hibernate/HibernateTimestampsRegion.java    |    3 +-
 .../HibernateTransactionalAccessStrategy.java   |    2 +-
 .../HibernateTransactionalDataRegion.java       |    3 +-
 .../hibernate/HibernateL2CacheSelfTest.java     |    2 +-
 .../IgniteBinaryHibernateTestSuite.java         |   37 +
 modules/hibernate5/README.txt                   |   48 +
 modules/hibernate5/licenses/apache-2.0.txt      |  202 ++
 modules/hibernate5/pom.xml                      |  146 ++
 .../HibernateAbstractRegionAccessStrategy.java  |   99 +
 .../HibernateAccessStrategyAdapter.java         |  379 ++++
 .../cache/hibernate/HibernateCacheProxy.java    |  811 +++++++
 .../hibernate/HibernateCollectionRegion.java    |  114 +
 .../cache/hibernate/HibernateEntityRegion.java  |  129 ++
 .../hibernate/HibernateGeneralDataRegion.java   |   72 +
 .../hibernate/HibernateKeyTransformer.java      |   28 +
 .../cache/hibernate/HibernateKeyWrapper.java    |  108 +
 .../hibernate/HibernateNaturalIdRegion.java     |  113 +
 .../HibernateNonStrictAccessStrategy.java       |  222 ++
 .../hibernate/HibernateQueryResultsRegion.java  |   70 +
 .../HibernateReadOnlyAccessStrategy.java        |  107 +
 .../HibernateReadWriteAccessStrategy.java       |  328 +++
 .../ignite/cache/hibernate/HibernateRegion.java |   99 +
 .../cache/hibernate/HibernateRegionFactory.java |  255 +++
 .../hibernate/HibernateTimestampsRegion.java    |   39 +
 .../HibernateTransactionalAccessStrategy.java   |  141 ++
 .../HibernateTransactionalDataRegion.java       |  107 +
 .../ignite/cache/hibernate/package-info.java    |   24 +
 .../hibernate/CacheHibernateBlobStore.java      |  542 +++++
 .../CacheHibernateBlobStoreEntry.hbm.xml        |   31 +
 .../hibernate/CacheHibernateBlobStoreEntry.java |   89 +
 .../CacheHibernateBlobStoreFactory.java         |  235 ++
 .../CacheHibernateStoreSessionListener.java     |  223 ++
 .../cache/store/hibernate/package-info.java     |   22 +
 .../src/test/config/factory-cache.xml           |   59 +
 .../src/test/config/factory-cache1.xml          |   61 +
 .../config/factory-incorrect-store-cache.xml    |   56 +
 .../HibernateL2CacheConfigurationSelfTest.java  |  409 ++++
 .../hibernate/HibernateL2CacheSelfTest.java     | 1948 ++++++++++++++++
 .../HibernateL2CacheTransactionalSelfTest.java  |  154 ++
 ...nateL2CacheTransactionalUseSyncSelfTest.java |   31 +
 .../CacheHibernateBlobStoreNodeRestartTest.java |   54 +
 .../CacheHibernateBlobStoreSelfTest.java        |  113 +
 .../CacheHibernateStoreFactorySelfTest.java     |  326 +++
 ...heHibernateStoreSessionListenerSelfTest.java |  241 ++
 .../cache/store/hibernate/hibernate.cfg.xml     |   42 +
 .../cache/store/hibernate/package-info.java     |   22 +
 .../IgniteBinaryHibernate5TestSuite.java        |   37 +
 .../testsuites/IgniteHibernate5TestSuite.java   |   57 +
 .../processors/query/h2/IgniteH2Indexing.java   |   23 +-
 .../processors/query/h2/database/H2Tree.java    |   14 +-
 .../query/h2/database/H2TreeIndex.java          |   16 +-
 .../processors/query/h2/opt/GridH2Row.java      |    5 +
 .../processors/query/h2/opt/GridH2Table.java    |   15 +-
 .../query/h2/opt/GridH2TreeIndex.java           |   29 +-
 .../query/h2/sql/GridSqlOperationType.java      |   23 +-
 .../query/h2/sql/GridSqlQueryParser.java        |   19 +-
 .../cache/BinarySerializationQuerySelfTest.java |   30 +-
 .../cache/CacheIndexStreamerTest.java           |    3 -
 .../cache/CacheIndexingOffheapCleanupTest.java  |  157 --
 .../CacheOffheapBatchIndexingBaseTest.java      |    6 +-
 .../CacheOffheapBatchIndexingMultiTypeTest.java |   17 +-
 ...CacheOffheapBatchIndexingSingleTypeTest.java |   20 +-
 .../CacheOperationsWithExpirationTest.java      |   68 +-
 .../cache/CacheQueryEvictDataLostTest.java      |  120 +
 .../CacheQueryOffheapEvictDataLostTest.java     |  136 --
 .../CacheRandomOperationsMultithreadedTest.java |   64 +-
 .../ClientReconnectAfterClusterRestartTest.java |   16 +-
 ...ryDuplicateIndexObjectsAbstractSelfTest.java |  159 ++
 .../cache/GridCacheOffHeapAndSwapSelfTest.java  |  453 ----
 .../cache/GridCacheOffHeapSelfTest.java         |    1 -
 .../GridCacheOffheapIndexEntryEvictTest.java    |    4 -
 .../cache/GridCacheOffheapIndexGetSelfTest.java |    8 -
 .../cache/GridCacheQuerySimpleBenchmark.java    |    3 -
 .../cache/GridIndexingWithNoopSwapSelfTest.java |    3 +-
 ...aryObjectQueryArgumentsOffheapLocalTest.java |   28 -
 ...teBinaryObjectQueryArgumentsOffheapTest.java |   30 -
 .../IgniteBinaryObjectQueryArgumentsTest.java   |   11 -
 ...niteCacheAbstractInsertSqlQuerySelfTest.java |  129 --
 ...CacheDistributedJoinQueryConditionsTest.java |   16 -
 .../IgniteCacheInsertSqlQuerySelfTest.java      |   40 -
 .../cache/IgniteCacheMergeSqlQuerySelfTest.java |   38 -
 .../IgniteCacheObjectKeyIndexingSelfTest.java   |  124 +
 .../cache/IgniteCacheOffheapEvictQueryTest.java |    6 -
 .../cache/IgniteCacheOffheapIndexScanTest.java  |    3 -
 ...CacheOffheapTieredMultithreadedSelfTest.java |  301 ---
 .../cache/IgniteCacheQueriesLoadTest1.java      |    2 -
 ...QueryMultiThreadedOffHeapTieredSelfTest.java |   38 -
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   24 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   28 -
 ...eCacheQueryOffheapMultiThreadedSelfTest.java |   28 -
 .../cache/IgniteCrossCachesJoinsQueryTest.java  |   16 -
 .../cache/IncorrectCacheTypeMetadataTest.java   |   76 -
 .../cache/IncorrectQueryEntityTest.java         |    3 +
 ...ateIndexObjectPartitionedAtomicSelfTest.java |   38 +
 ...xObjectPartitionedTransactionalSelfTest.java |   41 +
 ...QueryNodeRestartDistributedJoinSelfTest.java |   50 +-
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |    9 +-
 .../ttl/CacheTtlAtomicAbstractSelfTest.java     |   29 +
 .../cache/ttl/CacheTtlAtomicLocalSelfTest.java  |   34 +
 .../ttl/CacheTtlAtomicPartitionedSelfTest.java  |   34 +
 .../ttl/CacheTtlOffheapAbstractSelfTest.java    |   29 -
 .../CacheTtlOffheapAtomicAbstractSelfTest.java  |   29 -
 .../ttl/CacheTtlOffheapAtomicLocalSelfTest.java |   34 -
 ...acheTtlOffheapAtomicPartitionedSelfTest.java |   34 -
 ...TtlOffheapTransactionalAbstractSelfTest.java |   29 -
 ...cheTtlOffheapTransactionalLocalSelfTest.java |   34 -
 ...OffheapTransactionalPartitionedSelfTest.java |   34 -
 .../ttl/CacheTtlOnheapAbstractSelfTest.java     |   29 -
 .../CacheTtlOnheapAtomicAbstractSelfTest.java   |   29 -
 .../ttl/CacheTtlOnheapAtomicLocalSelfTest.java  |   34 -
 ...CacheTtlOnheapAtomicPartitionedSelfTest.java |   34 -
 ...eTtlOnheapTransactionalAbstractSelfTest.java |   29 -
 ...acheTtlOnheapTransactionalLocalSelfTest.java |   34 -
 ...lOnheapTransactionalPartitionedSelfTest.java |   34 -
 .../CacheTtlTransactionalAbstractSelfTest.java  |   29 +
 .../ttl/CacheTtlTransactionalLocalSelfTest.java |   34 +
 ...acheTtlTransactionalPartitionedSelfTest.java |   34 +
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |    3 +-
 .../query/IgniteSqlSplitterSelfTest.java        |   43 +
 .../query/h2/IgniteSqlQueryMinMaxTest.java      |  376 ++++
 .../h2/database/InlineIndexHelperTest.java      |   48 +-
 .../query/h2/opt/GridH2TableSelfTest.java       |   52 +
 .../query/h2/sql/GridQueryParsingTest.java      |   27 +-
 .../IgniteBinaryCacheQueryTestSuite.java        |    4 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   15 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |   15 +-
 .../IgniteCacheQuerySelfTestSuite3.java         |   10 +-
 .../IgniteCacheQuerySelfTestSuite4.java         |    4 -
 .../IgniteCacheWithIndexingTestSuite.java       |   28 +-
 modules/log4j2/pom.xml                          |    4 +-
 .../ignite/logger/log4j2/Log4J2Logger.java      |   23 +-
 modules/platforms/cpp/binary/Makefile.am        |    1 -
 .../platforms/cpp/binary/include/Makefile.am    |    3 -
 .../binary/binary_array_identity_resolver.h     |   64 -
 .../include/ignite/binary/binary_containers.h   |    2 +-
 .../ignite/binary/binary_identity_resolver.h    |   61 -
 .../include/ignite/binary/binary_object.h       |   12 +-
 .../include/ignite/binary/binary_raw_writer.h   |    4 +-
 .../binary/include/ignite/binary/binary_type.h  |   10 -
 .../include/ignite/binary/binary_writer.h       |    4 +-
 .../ignite/impl/binary/binary_reader_impl.h     |    6 +-
 .../ignite/impl/binary/binary_type_impl.h       |  149 --
 .../include/ignite/impl/binary/binary_utils.h   |   12 +-
 .../ignite/impl/binary/binary_writer_impl.h     |   12 +-
 .../cpp/binary/project/vs/binary.vcxproj        |    4 -
 .../binary/project/vs/binary.vcxproj.filters    |   12 -
 .../binary/binary_array_identity_resolver.cpp   |   42 -
 .../cpp/core-test/config/cache-identity-32.xml  |   50 +
 .../core-test/config/cache-identity-default.xml |  154 ++
 .../cpp/core-test/config/cache-identity.xml     |  124 +-
 .../core-test/config/cache-query-default.xml    |   70 +-
 .../cpp/core-test/config/cache-store-32.xml     |   50 +
 .../core-test/config/cache-store-default.xml    |   71 +
 .../cpp/core-test/config/cache-store.xml        |   41 +-
 .../cpp/core-test/config/cache-test-default.xml |    1 +
 .../cpp/core-test/config/cache-test.xml         |    2 +-
 .../core-test/include/ignite/binary_test_defs.h |   25 -
 .../cpp/core-test/include/ignite/complex_type.h |    2 -
 .../cpp/core-test/include/ignite/test_type.h    |    1 -
 .../cpp/core-test/include/ignite/test_utils.h   |   11 +
 .../cpp/core-test/project/vs/core-test.vcxproj  |    8 +
 .../project/vs/core-test.vcxproj.filters        |   12 +
 .../src/binary_identity_resolver_test.cpp       |  262 +--
 .../cpp/core-test/src/binary_object_test.cpp    |    8 +
 .../src/binary_reader_writer_raw_test.cpp       |   12 +-
 .../core-test/src/binary_reader_writer_test.cpp |   12 +-
 .../cpp/core-test/src/cache_invoke_test.cpp     |    7 +-
 .../cpp/core-test/src/cache_query_test.cpp      |  227 +-
 .../cpp/core-test/src/cache_store_test.cpp      |   11 +-
 .../platforms/cpp/core-test/src/cache_test.cpp  |  207 +-
 .../cpp/core-test/src/cluster_test.cpp          |    8 +-
 .../cpp/core-test/src/continuous_query_test.cpp |   22 +-
 .../cpp/core-test/src/ignition_test.cpp         |   12 +-
 .../cpp/core/include/ignite/cache/cache.h       |  161 ++
 .../cpp/core/include/ignite/cache/cache_entry.h |   15 +
 .../include/ignite/cache/query/query_cursor.h   |   28 +-
 .../platforms/cpp/core/include/ignite/ignite.h  |   18 +-
 .../cpp/core/include/ignite/ignition.h          |   14 +-
 .../ignite/impl/cache/query/query_impl.h        |    7 +
 .../cpp/core/include/ignite/impl/helpers.h      |   57 +
 .../core/include/ignite/impl/module_manager.h   |   26 +
 .../cpp/core/include/ignite/impl/operations.h   |  136 +-
 .../platforms/cpp/core/project/vs/core.vcxproj  |    1 +
 .../cpp/core/project/vs/core.vcxproj.filters    |    3 +
 modules/platforms/cpp/core/src/ignition.cpp     |   62 +-
 .../core/src/impl/cache/query/query_impl.cpp    |   39 +-
 .../cpp/core/src/impl/ignite_environment.cpp    |    2 +-
 .../examples/include/ignite/examples/person.h   |    1 -
 .../cpp/odbc-test/include/complex_type.h        |    2 -
 .../platforms/cpp/odbc-test/include/test_type.h |    1 -
 .../ExpiryCacheHolderTest.cs                    |   12 +-
 .../Binary/BinaryDynamicRegistrationTest.cs     |   50 +-
 .../Binary/BinaryEqualityComparerTest.cs        |  217 +-
 .../BinaryConfigurationTest.cs                  |   43 +
 .../Affinity/AffinityFunctionSpringTest.cs      |    6 +-
 .../Cache/Affinity/AffinityFunctionTest.cs      |   92 +-
 .../Cache/CacheAbstractTest.cs                  |   18 +-
 .../Cache/CacheConfigurationTest.cs             |   32 +-
 .../Cache/CacheMetricsTest.cs                   |   86 +-
 .../Cache/CacheTestAsyncWrapper.cs              |   12 +-
 .../Cache/Query/CacheDmlQueriesTest.cs          |   13 +-
 .../Cache/Query/CacheLinqTest.cs                |   36 +-
 .../Cache/Store/CacheStoreTest.cs               |    2 +-
 .../Compute/AbstractTaskTest.cs                 |   28 +-
 .../Compute/MixedClusterTest.cs                 |   33 +-
 .../Config/Cache/Affinity/affinity-function.xml |    4 +-
 .../Config/cache-query-continuous.xml           |  118 +-
 .../Apache.Ignite.Core.Tests/DeploymentTest.cs  |   10 +
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |   63 +-
 .../Examples/ExamplesTest.cs                    |   22 +-
 .../Apache.Ignite.Core.Tests/ExecutableTest.cs  |    5 +-
 .../IgniteConfigurationSectionTest.cs           |    7 +-
 .../IgniteConfigurationSerializerTest.cs        |   32 +-
 .../IgniteConfigurationTest.cs                  |   24 +-
 .../Plugin/PluginTest.cs                        |   16 +-
 .../Apache.Ignite.Core.csproj                   |   10 +-
 .../Binary/BinaryArrayEqualityComparer.cs       |  160 --
 .../Binary/BinaryTypeConfiguration.cs           |   13 -
 .../Cache/Affinity/Fair/FairAffinityFunction.cs |   32 -
 .../Cache/Affinity/Fair/Package-Info.cs         |   26 -
 .../Cache/Affinity/IAffinityFunction.cs         |    3 +-
 .../Cache/Configuration/CacheConfiguration.cs   |  104 +-
 .../dotnet/Apache.Ignite.Core/Cache/ICache.cs   |   16 +-
 .../Cache/ICacheEntryProcessorResult.cs         |   12 +-
 .../Apache.Ignite.Core/Cache/ICacheMetrics.cs   |   80 -
 .../Events/IEventStorageSpi.cs                  |   33 +
 .../Events/MemoryEventStorageSpi.cs             |  100 +
 .../Events/NoopEventStorageSpi.cs               |   27 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |   91 +-
 .../IgniteConfigurationSection.xsd              |   65 +-
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   28 +-
 .../Impl/Binary/BinaryArrayEqualityComparer.cs  |  159 ++
 .../Binary/BinaryEqualityComparerSerializer.cs  |  100 +-
 .../Impl/Binary/BinaryFieldEqualityComparer.cs  |  138 --
 .../Impl/Binary/BinaryFullTypeDescriptor.cs     |   20 -
 .../Impl/Binary/BinaryObject.cs                 |    2 +-
 .../Impl/Binary/BinaryObjectBuilder.cs          |    7 +-
 .../Binary/BinarySurrogateTypeDescriptor.cs     |    6 -
 .../Impl/Binary/BinaryUtils.cs                  |   10 -
 .../Impl/Binary/BinaryWriter.cs                 |    6 +-
 .../Impl/Binary/IBinaryEqualityComparer.cs      |   63 -
 .../Impl/Binary/IBinaryTypeDescriptor.cs        |    5 -
 .../Impl/Binary/Marshaller.cs                   |   51 +-
 .../Affinity/AffinityFunctionSerializer.cs      |   18 +-
 .../Impl/Cache/CacheEntryProcessorResult.cs     |   27 +-
 .../Apache.Ignite.Core/Impl/Cache/CacheImpl.cs  |   28 +-
 .../Impl/Cache/CacheMetricsImpl.cs              |   70 -
 .../Impl/Common/IgniteHome.cs                   |   21 +-
 .../Apache.Ignite.Core/Impl/PlatformTarget.cs   |   17 +-
 .../Plugin/IPluginConfiguration.cs              |    4 +-
 .../Impl/DbCache.cs                             |    2 +-
 .../Impl/CacheQueryExpressionVisitor.cs         |   14 +-
 .../Apache.Ignite.Linq/Impl/CacheQueryParser.cs |   25 +-
 .../Apache.Ignite.Linq/Impl/MethodVisitor.cs    |   72 +-
 .../examples/Apache.Ignite.Examples/App.config  |    4 +-
 .../Datagrid/MultiTieredCacheExample.cs         |    4 +-
 .../Datagrid/PutGetExample.cs                   |   13 +-
 .../Misc/ClientReconnectExample.cs              |   38 +-
 modules/schema-import-db/README.txt             |    4 -
 modules/schema-import-db/pom.xml                |   55 -
 .../apache/ignite/schema/parser/DbColumn.java   |   88 -
 .../ignite/schema/parser/DbMetadataReader.java  |  147 --
 .../apache/ignite/schema/parser/DbTable.java    |   82 -
 .../parser/dialect/DB2MetadataDialect.java      |   33 -
 .../parser/dialect/DatabaseMetadataDialect.java |  102 -
 .../parser/dialect/JdbcMetadataDialect.java     |  199 --
 .../parser/dialect/MySQLMetadataDialect.java    |   82 -
 .../parser/dialect/OracleMetadataDialect.java   |  360 ---
 modules/schema-import/README.txt                |  216 --
 modules/schema-import/pom.xml                   |  119 -
 .../main/java/media/data_connection_48x48.png   |  Bin 4443 -> 0 bytes
 .../src/main/java/media/error_48x48.png         |  Bin 4349 -> 0 bytes
 .../src/main/java/media/ignite_128x128.png      |  Bin 4917 -> 0 bytes
 .../src/main/java/media/ignite_16x16.png        |  Bin 608 -> 0 bytes
 .../src/main/java/media/ignite_24x24.png        |  Bin 930 -> 0 bytes
 .../src/main/java/media/ignite_32x32.png        |  Bin 1203 -> 0 bytes
 .../src/main/java/media/ignite_48x48.png        |  Bin 1868 -> 0 bytes
 .../src/main/java/media/ignite_64x64.png        |  Bin 2453 -> 0 bytes
 .../src/main/java/media/information_48x48.png   |  Bin 4102 -> 0 bytes
 .../src/main/java/media/question_48x48.png      |  Bin 3857 -> 0 bytes
 .../src/main/java/media/sign_warning_48x48.png  |  Bin 2988 -> 0 bytes
 .../schema-import/src/main/java/media/style.css |  134 --
 .../src/main/java/media/text_tree_48x48.png     |  Bin 2567 -> 0 bytes
 .../ignite/schema/generator/CodeGenerator.java  |  831 -------
 .../ignite/schema/generator/GeneratorUtils.java |   70 -
 .../ignite/schema/generator/XmlGenerator.java   |  446 ----
 .../ignite/schema/model/PojoDescriptor.java     |  497 ----
 .../apache/ignite/schema/model/PojoField.java   |  461 ----
 .../ignite/schema/model/SchemaDescriptor.java   |   62 -
 .../schema/parser/DatabaseMetadataParser.java   |  115 -
 .../ignite/schema/ui/ConfirmCallable.java       |   83 -
 .../org/apache/ignite/schema/ui/Controls.java   |  697 ------
 .../org/apache/ignite/schema/ui/GridPaneEx.java |  180 --
 .../org/apache/ignite/schema/ui/MessageBox.java |  274 ---
 .../apache/ignite/schema/ui/ModalDialog.java    |   50 -
 .../ignite/schema/ui/SchemaImportApp.java       | 2115 ------------------
 .../ignite/schema/ui/TextColumnValidator.java   |   32 -
 .../schema/test/AbstractSchemaImportTest.java   |  181 --
 .../test/generator/CodeGeneratorTest.java       |   81 -
 .../schema/test/generator/XmlGeneratorTest.java |   42 -
 .../ignite/schema/test/model/CacheConfig.txt    |  409 ----
 .../apache/ignite/schema/test/model/Objects.txt |  531 -----
 .../ignite/schema/test/model/ObjectsKey.txt     |   96 -
 .../ignite/schema/test/model/Primitives.txt     |  535 -----
 .../ignite/schema/test/model/PrimitivesKey.txt  |   96 -
 .../org/apache/ignite/schema/test/model/Tst.txt |  535 -----
 .../apache/ignite/schema/test/model/TstKey.txt  |   96 -
 .../schema/test/model/ignite-type-metadata.xml  |  666 ------
 .../test/parser/DbMetadataParserTest.java       |  134 --
 .../testsuites/IgniteSchemaImportTestSuite.java |   42 -
 modules/spring/pom.xml                          |    6 +
 .../org/apache/ignite/IgniteSpringBean.java     |    7 +
 .../apache/ignite/cache/spring/SpringCache.java |    4 +-
 .../ignite/cache/spring/SpringCacheTest.java    |  177 ++
 .../ignite/internal/GridFactorySelfTest.java    |    3 +
 .../IgniteExcludeInConfigurationTest.java       |   14 +-
 .../org/apache/ignite/spring/sprint-exclude.xml |   19 +-
 .../testsuites/IgniteSpringTestSuite.java       |    3 +
 .../ant/beautifier/GridJavadocAntTask.java      |   18 +-
 .../commands/cache/VisorCacheCommand.scala      |    5 -
 .../modules/configuration/Version.service.js    |    2 +-
 .../states/configuration/clusters/general.pug   |    2 +-
 modules/web-console/web-agent/README.txt        |    2 +-
 modules/web-console/web-agent/pom.xml           |   12 -
 .../ignite/console/agent/db/DbColumn.java       |   88 +
 .../console/agent/db/DbMetadataReader.java      |  142 ++
 .../apache/ignite/console/agent/db/DbTable.java |   82 +
 .../agent/db/dialect/DB2MetadataDialect.java    |   33 +
 .../db/dialect/DatabaseMetadataDialect.java     |  102 +
 .../agent/db/dialect/JdbcMetadataDialect.java   |  199 ++
 .../agent/db/dialect/MySQLMetadataDialect.java  |   82 +
 .../agent/db/dialect/OracleMetadataDialect.java |  359 +++
 .../agent/handlers/DatabaseListener.java        |   20 +-
 modules/yardstick/README.txt                    |    2 -
 .../config/benchmark-atomic-win.properties      |    8 +-
 .../config/benchmark-atomic.properties          |   15 +-
 .../config/benchmark-cache-load.properties      |    7 +-
 .../config/benchmark-client-mode.properties     |    9 -
 .../config/benchmark-compute.properties         |   13 +-
 .../config/benchmark-failover.properties        |    4 +-
 .../config/benchmark-multicast.properties       |   13 +-
 .../config/benchmark-put-indexed-val.properties |    9 +-
 .../config/benchmark-query-win.properties       |    5 +-
 .../yardstick/config/benchmark-query.properties |   16 +-
 .../config/benchmark-remote-sample.properties   |    5 +-
 .../config/benchmark-sample.properties          |    5 +-
 .../config/benchmark-sql-dml.properties         |   19 +-
 .../yardstick/config/benchmark-store.properties |   30 +-
 .../config/benchmark-tx-win.properties          |    6 +-
 .../yardstick/config/benchmark-tx.properties    |   15 +-
 modules/yardstick/config/benchmark.properties   |   11 +-
 modules/yardstick/config/ignite-base-config.xml |   63 -
 .../config/ignite-base-load-config.xml          |   63 -
 .../config/ignite-cache-load-config.xml         |    5 -
 .../config/ignite-failover-base-config.xml      |   37 -
 .../ignite-int-max-values-offheap-config.xml    |   88 -
 .../ignite-int-max-values-swap-config.xml       |   93 -
 .../test-max-int-values-offheap.properties      |   62 -
 .../test-max-int-values-onheap.properties       |    5 +-
 .../config/test-max-int-values-swap.properties  |   61 -
 .../yardstick/IgniteBenchmarkArguments.java     |   29 -
 .../org/apache/ignite/yardstick/IgniteNode.java |   10 -
 .../cache/IgniteGetOffHeapBenchmark.java        |   32 -
 .../cache/IgniteGetOffHeapValuesBenchmark.java  |   32 -
 .../cache/IgnitePutGetOffHeapBenchmark.java     |   32 -
 .../IgnitePutGetOffHeapValuesBenchmark.java     |   32 -
 .../cache/IgnitePutGetTxOffHeapBenchmark.java   |   32 -
 .../IgnitePutGetTxOffHeapValuesBenchmark.java   |   32 -
 .../cache/IgnitePutOffHeapBenchmark.java        |   32 -
 .../cache/IgnitePutOffHeapValuesBenchmark.java  |   32 -
 .../IgnitePutRandomValueSizeBenchmark.java      |    2 +-
 .../cache/IgnitePutTxOffHeapBenchmark.java      |   32 -
 .../IgnitePutTxOffHeapValuesBenchmark.java      |   32 -
 .../IgniteSqlQueryJoinOffHeapBenchmark.java     |   32 -
 .../cache/IgniteSqlQueryOffHeapBenchmark.java   |   32 -
 .../IgniteSqlQueryPutOffHeapBenchmark.java      |   32 -
 .../dml/IgniteSqlDeleteFilteredBenchmark.java   |    5 +-
 .../dml/IgniteSqlUpdateFilteredBenchmark.java   |    5 +-
 ...IgniteAtomicOffHeapInvokeRetryBenchmark.java |   31 -
 .../IgniteAtomicOffHeapRetriesBenchmark.java    |   31 -
 ...ransactionalOffHeapInvokeRetryBenchmark.java |   33 -
 ...ransactionalOffHeapWriteInvokeBenchmark.java |   37 -
 ...eTransactionalOffHeapWriteReadBenchmark.java |   32 -
 .../IgniteCacheRandomOperationBenchmark.java    |   32 +-
 pom.xml                                         |  122 +-
 1014 files changed, 23892 insertions(+), 42621 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3c5f3422/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3c5f3422/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/3c5f3422/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/H2CacheStoreStrategy.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/internal/processors/cache/H2CacheStoreStrategy.java
index 6261366,0167b7d..72b049b
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/H2CacheStoreStrategy.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/H2CacheStoreStrategy.java
@@@ -282,11 -263,9 +282,11 @@@ public class H2CacheStoreStrategy imple
          /**
           * @return Connection pool
           */
 -        static JdbcConnectionPool createDataSource() {
 -            JdbcConnectionPool pool = JdbcConnectionPool.create("jdbc:h2:tcp://localhost/mem:TestDb;LOCK_MODE=0", "sa", "");
 +        static JdbcConnectionPool createDataSource(int port) {
 +            JdbcConnectionPool pool = JdbcConnectionPool.create("jdbc:h2:tcp://localhost:" + port +
 +                "/mem:TestDb;LOCK_MODE=0", "sa", "");
 +
-             pool.setMaxConnections(100);
+             pool.setMaxConnections(Integer.getInteger("H2_JDBC_CONNECTIONS", 100));
              return pool;
          }
  


[11/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
index 2d817be..a48c3e2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/GridCacheQueueMultiNodeConsistencySelfTest.java
@@ -25,7 +25,6 @@ import org.apache.commons.collections.CollectionUtils;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CollectionConfiguration;
 import org.apache.ignite.internal.IgniteKernal;
@@ -34,7 +33,6 @@ import org.apache.ignite.lang.IgniteCallable;
 import org.apache.ignite.resources.IgniteInstanceResource;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest.AddAllJob;
 import static org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest.QUEUE_CAPACITY;
@@ -74,11 +72,6 @@ public class GridCacheQueueMultiNodeConsistencySelfTest extends IgniteCollection
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
index fb13139..769896f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteCollectionAbstractTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.datastructures;
 
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.CollectionConfiguration;
@@ -77,7 +76,6 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
 
         colCfg.setCacheMode(collectionCacheMode());
         colCfg.setAtomicityMode(collectionCacheAtomicityMode());
-        colCfg.setMemoryMode(collectionMemoryMode());
         colCfg.setOffHeapMaxMemory(collectionOffHeapMaxMemory());
 
         if (colCfg.getCacheMode() == PARTITIONED)
@@ -97,11 +95,6 @@ public abstract class IgniteCollectionAbstractTest extends GridCommonAbstractTes
     protected abstract CacheMode collectionCacheMode();
 
     /**
-     * @return Collection cache memory mode.
-     */
-    protected abstract CacheMemoryMode collectionMemoryMode();
-
-    /**
      * @return Collection cache atomicity mode.
      */
     protected abstract CacheAtomicityMode collectionCacheAtomicityMode();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
index 5a4b89c..21c7690 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/IgniteDataStructureUniqueNameTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.IgniteLock;
 import org.apache.ignite.IgniteSemaphore;
 import org.apache.ignite.IgniteSet;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.AtomicConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -44,7 +43,6 @@ import org.apache.ignite.lang.IgniteUuid;
 import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -62,11 +60,6 @@ public class IgniteDataStructureUniqueNameTest extends IgniteCollectionAbstractT
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
deleted file mode 100644
index 45fb298..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicOffheapSetSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Set tests.
- */
-public class GridCacheLocalAtomicOffheapSetSelfTest extends GridCacheLocalAtomicSetSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
index 28e1140..38af30e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicQueueApiSelfTest.java
@@ -18,19 +18,13 @@
 package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Queue tests with local atomic cache.
  */
 public class GridCacheLocalAtomicQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
 
     /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
index 49454f4..a1f045d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalAtomicSetSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 
 /**
@@ -41,11 +39,6 @@ public class GridCacheLocalAtomicSetSelfTest extends GridCacheSetAbstractSelfTes
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
deleted file mode 100644
index efce05b..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalOffheapQueueApiSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.internal.processors.cache.datastructures.local;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue tests with local cache.
- */
-public class GridCacheLocalOffheapQueueApiSelfTest extends GridCacheLocalQueueApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
index 7e2ed26..780cb08 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalQueueApiSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 
 /**
@@ -36,11 +34,6 @@ public class GridCacheLocalQueueApiSelfTest extends GridCacheQueueApiSelfAbstrac
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
index 4933fd9..7c37360 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/local/GridCacheLocalSetSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.local;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 
 /**
@@ -41,11 +39,6 @@ public class GridCacheLocalSetSelfTest extends GridCacheSetAbstractSelfTest {
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
deleted file mode 100644
index e0397f5..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueApiSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue tests with partitioned atomic cache.
- */
-public class GridCachePartitionedAtomicOffheapQueueApiSelfTest extends GridCachePartitionedAtomicQueueApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
deleted file mode 100644
index 49d5092..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- *
- */
-public class GridCachePartitionedAtomicOffheapQueueCreateMultiNodeSelfTest
-    extends GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
deleted file mode 100644
index c8152fe..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Queue multi node test.
- */
-public class GridCachePartitionedAtomicOffheapQueueMultiNodeSelfTest extends GridCachePartitionedAtomicQueueMultiNodeSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
index 4e2631b..690f6b3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueApiSelfTest.java
@@ -18,21 +18,14 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Queue tests with partitioned atomic cache.
  */
 public class GridCachePartitionedAtomicQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
index cc24d7f..59d43a2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest.java
@@ -18,10 +18,8 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  *
@@ -29,11 +27,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 public class GridCachePartitionedAtomicQueueCreateMultiNodeSelfTest
     extends GridCachePartitionedQueueCreateMultiNodeSelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
index 8e39faa..5a67024 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest.java
@@ -18,11 +18,9 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractQueueFailoverDataConsistencySelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Queue failover test for atomic cache.
@@ -30,11 +28,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 public class GridCachePartitionedAtomicQueueFailoverDataConsistencySelfTest extends
     GridCacheAbstractQueueFailoverDataConsistencySelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
index b783ae7..97aac60 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueMultiNodeSelfTest.java
@@ -18,21 +18,14 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Queue multi node test.
  */
 public class GridCachePartitionedAtomicQueueMultiNodeSelfTest extends GridCachePartitionedQueueMultiNodeSelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
index 55c6682..37dbfa1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicQueueRotativeMultiNodeTest.java
@@ -18,10 +18,8 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Sequence multi node tests.
@@ -29,11 +27,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 public class GridCachePartitionedAtomicQueueRotativeMultiNodeTest extends
     GridCachePartitionedQueueRotativeMultiNodeTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
index 8ff95c7..c2af2b1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedAtomicSetFailoverSelfTest.java
@@ -18,22 +18,15 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Set failover tests.
  */
 public class GridCachePartitionedAtomicSetFailoverSelfTest extends GridCacheSetFailoverAbstractSelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
index 6c880a5..ecb2df9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedDataStructuresFailoverSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -37,11 +35,6 @@ public class GridCachePartitionedDataStructuresFailoverSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
deleted file mode 100644
index d46f684..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesQueueApiSelfTest.java
+++ /dev/null
@@ -1,35 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Queue tests with partitioned cache.
- */
-public class GridCachePartitionedOffHeapValuesQueueApiSelfTest extends GridCachePartitionedQueueApiSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_VALUES;
-    }
-
-    @Override public void testQueueRemoveMultithreadBounded(){
-        fail("https://issues.apache.org/jira/browse/IGNITE-1592");
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
deleted file mode 100644
index f6df67e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffHeapValuesSetSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- * Set tests with off-heap values cache memory mode.
- */
-public class GridCachePartitionedOffHeapValuesSetSelfTest extends GridCachePartitionedSetSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_VALUES;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
deleted file mode 100644
index b3ded7f..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapDataStructuresFailoverSelfTest.java
+++ /dev/null
@@ -1,33 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Failover tests for cache data structures.
- */
-public class GridCachePartitionedOffheapDataStructuresFailoverSelfTest
-    extends GridCachePartitionedDataStructuresFailoverSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
deleted file mode 100644
index f28de20..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedOffheapSetFailoverSelfTest.java
+++ /dev/null
@@ -1,32 +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.apache.ignite.internal.processors.cache.datastructures.partitioned;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-
-/**
- * Set failover tests.
- */
-public class GridCachePartitionedOffheapSetFailoverSelfTest extends GridCachePartitionedSetFailoverSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
index de2fa07..3c14a88 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueApiSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -41,11 +39,6 @@ public class GridCachePartitionedQueueApiSelfTest extends GridCacheQueueApiSelfA
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
index 78d6027..cbfee5a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueCreateMultiNodeSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -38,7 +37,6 @@ import org.apache.ignite.transactions.Transaction;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheRebalanceMode.SYNC;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -60,11 +58,6 @@ public class GridCachePartitionedQueueCreateMultiNodeSelfTest extends IgniteColl
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
index db11291..e9c1fd7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueEntryMoveSelfTest.java
@@ -26,7 +26,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.AffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
@@ -41,7 +40,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -68,11 +66,6 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
index bef2b22..694dd0b 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueFailoverDataConsistencySelfTest.java
@@ -18,11 +18,9 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractQueueFailoverDataConsistencySelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Queue failover test for transactional cache.
@@ -30,11 +28,6 @@ import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 public class GridCachePartitionedQueueFailoverDataConsistencySelfTest extends
     GridCacheAbstractQueueFailoverDataConsistencySelfTest {
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
index 221f5fc..5edf7ca 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueJoinedNodeSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueJoinedNodeSelfAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueJoinedNodeSelfTest extends GridCacheQueueJ
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
index bcc9831..82ef404 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueMultiNodeSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueMultiNodeSelfTest extends GridCacheQueueMu
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
index c3d1d02..8b112c1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedQueueRotativeMultiNodeTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueRotativeMultiNodeAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCachePartitionedQueueRotativeMultiNodeTest extends GridCacheQue
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
index 755ac91..ec57dea 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetFailoverSelfTest.java
@@ -18,11 +18,9 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetFailoverAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 
 /**
  * Set failover tests.
@@ -33,11 +31,6 @@ public class GridCachePartitionedSetFailoverSelfTest extends GridCacheSetFailove
         return TRANSACTIONAL;
     }
 
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
     @Override public void testNodeRestart(){
         fail("https://issues.apache.org/jira/browse/IGNITE-1593");
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
index 7c97bec..36a2ecc 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedSetSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.partitioned;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCachePartitionedSetSelfTest extends GridCacheSetAbstractSelfTes
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
index f57e1c9..67b7f8f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/IgnitePartitionedQueueNoBackupsTest.java
@@ -21,7 +21,6 @@ import java.util.Iterator;
 import java.util.UUID;
 import org.apache.ignite.IgniteQueue;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CollectionConfiguration;
 import org.apache.ignite.internal.IgniteKernal;
@@ -30,7 +29,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
 import org.apache.ignite.testframework.GridTestUtils;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 
 /**
@@ -43,11 +41,6 @@ public class IgnitePartitionedQueueNoBackupsTest extends GridCachePartitionedQue
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return ATOMIC;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
index 28ce901..b093d12 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedDataStructuresFailoverSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.replicated;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheAbstractDataStructuresFailoverSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
 /**
@@ -37,11 +35,6 @@ public class GridCacheReplicatedDataStructuresFailoverSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
index bad37a9..3023b7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueApiSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.replicated;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueApiSelfAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
 /**
@@ -41,11 +39,6 @@ public class GridCacheReplicatedQueueApiSelfTest extends GridCacheQueueApiSelfAb
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return OFFHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected long collectionOffHeapMaxMemory() {
         return 0;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
index 54fcb73..74c8af1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueMultiNodeSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.replicated;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueMultiNodeAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedQueueMultiNodeSelfTest extends GridCacheQueueMul
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
index 4046b56..934bbd2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedQueueRotativeMultiNodeTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.replicated;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheQueueRotativeMultiNodeAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedQueueRotativeMultiNodeTest extends GridCacheQueu
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
index 59ebb23..fe6fd3e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/replicated/GridCacheReplicatedSetSelfTest.java
@@ -18,12 +18,10 @@
 package org.apache.ignite.internal.processors.cache.datastructures.replicated;
 
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.datastructures.GridCacheSetAbstractSelfTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 
 /**
@@ -36,11 +34,6 @@ public class GridCacheReplicatedSetSelfTest extends GridCacheSetAbstractSelfTest
     }
 
     /** {@inheritDoc} */
-    @Override protected CacheMemoryMode collectionMemoryMode() {
-        return ONHEAP_TIERED;
-    }
-
-    /** {@inheritDoc} */
     @Override protected CacheAtomicityMode collectionCacheAtomicityMode() {
         return TRANSACTIONAL;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
index 2b4f520..75aadc5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractDistributedByteArrayValuesSelfTest.java
@@ -45,19 +45,11 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
     /** Regular caches. */
     private static IgniteCache<Integer, Object>[] caches;
 
-    /** Offheap values caches. */
-    private static IgniteCache<Integer, Object>[] cachesOffheap;
-
-    /** Offheap tiered caches. */
-    private static IgniteCache<Integer, Object>[] cachesOffheapTiered;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
 
-        c.setCacheConfiguration(cacheConfiguration(),
-            offheapCacheConfiguration(),
-            offheapTieredCacheConfiguration());
+        c.setCacheConfiguration(cacheConfiguration());
 
         c.setPeerClassLoadingEnabled(peerClassLoading());
 
@@ -92,38 +84,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
      */
     protected abstract CacheConfiguration cacheConfiguration0();
 
-    /**
-     * @return Offheap cache configuration.
-     */
-    protected CacheConfiguration offheapCacheConfiguration() {
-        CacheConfiguration cfg = offheapCacheConfiguration0();
-
-        cfg.setName(CACHE_OFFHEAP);
-
-        return cfg;
-    }
-
-    /**
-     * @return Offheap tiered cache configuration.
-     */
-    protected CacheConfiguration offheapTieredCacheConfiguration() {
-        CacheConfiguration cfg = offheapTieredCacheConfiguration0();
-
-        cfg.setName(CACHE_OFFHEAP_TIERED);
-
-        return cfg;
-    }
-
-    /**
-     * @return Internal offheap cache configuration.
-     */
-    protected abstract CacheConfiguration offheapCacheConfiguration0();
-
-    /**
-     * @return Internal offheap cache configuration.
-     */
-    protected abstract CacheConfiguration offheapTieredCacheConfiguration0();
-
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
     @Override protected void beforeTestsStarted() throws Exception {
@@ -134,15 +94,11 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
         ignites = new Ignite[gridCnt];
 
         caches = new IgniteCache[gridCnt];
-        cachesOffheap = new IgniteCache[gridCnt];
-        cachesOffheapTiered = new IgniteCache[gridCnt];
 
         for (int i = 0; i < gridCnt; i++) {
             ignites[i] = startGrid(i);
 
             caches[i] = ignites[i].cache(CACHE_REGULAR);
-            cachesOffheap[i] = ignites[i].cache(CACHE_OFFHEAP);
-            cachesOffheapTiered[i] = ignites[i].cache(CACHE_OFFHEAP_TIERED);
         }
     }
 
@@ -151,8 +107,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
         super.afterTestsStopped();
 
         caches = null;
-        cachesOffheap = null;
-        cachesOffheapTiered = null;
 
         ignites = null;
     }
@@ -176,42 +130,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
     }
 
     /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheap() throws Exception {
-        testTransaction0(cachesOffheap, PESSIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheapTiered() throws Exception {
-        testTransaction0(cachesOffheapTiered, PESSIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheapMixed() throws Exception {
-        testTransactionMixed0(cachesOffheap, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in PESSIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testPessimisticOffheapTieredMixed() throws Exception {
-        testTransactionMixed0(cachesOffheapTiered, PESSIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
      * Check whether cache with byte array entry works correctly in OPTIMISTIC transaction.
      *
      * @throws Exception If failed.
@@ -230,42 +148,6 @@ public abstract class GridCacheAbstractDistributedByteArrayValuesSelfTest extend
     }
 
     /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheap() throws Exception {
-        testTransaction0(cachesOffheap, OPTIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheapTiered() throws Exception {
-        testTransaction0(cachesOffheapTiered, OPTIMISTIC, KEY_1, wrap(1));
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheapMixed() throws Exception {
-        testTransactionMixed0(cachesOffheap, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
-     * Check whether offheap cache with byte array entry works correctly in OPTIMISTIC transaction.
-     *
-     * @throws Exception If failed.
-     */
-    public void testOptimisticOffheapTieredMixed() throws Exception {
-        testTransactionMixed0(cachesOffheapTiered, OPTIMISTIC, KEY_1, wrap(1), KEY_2, 1);
-    }
-
-    /**
      * Test swapping.
      *
      * @throws Exception If failed.


[23/57] [abbrv] ignite git commit: IGNITE-4534 - Added offheap evictions

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
index 190349a..9546890 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/tree/io/DataPageIO.java
@@ -18,9 +18,11 @@
 package org.apache.ignite.internal.processors.cache.database.tree.io;
 
 import java.nio.ByteBuffer;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.pagemem.PageMemory;
@@ -254,6 +256,29 @@ public class DataPageIO extends PageIO {
 
     /**
      * @param pageAddr Page address.
+     * @param c Closure.
+     * @param <T> Closure return type.
+     * @return Collection of closure results for all items in page.
+     * @throws IgniteCheckedException In case of error in closure body.
+     */
+    public <T> List<T> forAllItems(long pageAddr, CC<T> c) throws IgniteCheckedException {
+        long pageId = getPageId(pageAddr);
+
+        int cnt = getDirectCount(pageAddr);
+
+        List<T> res = new ArrayList<>(cnt);
+
+        for (int i = 0; i < cnt; i++) {
+            long link = PageIdUtils.link(pageId, i);
+
+            res.add(c.apply(link));
+        }
+
+        return res;
+    }
+
+    /**
+     * @param pageAddr Page address.
      * @param cnt Indirect count.
      */
     private void setIndirectCount(long pageAddr, int cnt) {
@@ -1007,7 +1032,8 @@ public class DataPageIO extends PageIO {
         final int keySize = row.key().valueBytesLength(null);
         final int valSize = row.value().valueBytesLength(null);
 
-        int written = writeFragment(row, buf, rowOff, payloadSize, EntryPart.KEY, keySize, valSize);
+        int written = writeFragment(row, buf, rowOff, payloadSize, EntryPart.CACHE_ID, keySize, valSize);
+        written += writeFragment(row, buf, rowOff + written, payloadSize - written, EntryPart.KEY, keySize, valSize);
         written += writeFragment(row, buf, rowOff + written, payloadSize - written, EntryPart.EXPIRE_TIME, keySize, valSize);
         written += writeFragment(row, buf, rowOff + written, payloadSize - written, EntryPart.VALUE, keySize, valSize);
         written += writeFragment(row, buf, rowOff + written, payloadSize - written, EntryPart.VERSION, keySize, valSize);
@@ -1039,28 +1065,36 @@ public class DataPageIO extends PageIO {
         final int prevLen;
         final int curLen;
 
+        int cacheIdSize = row.cacheId() == 0 ? 0 : 4;
+
         switch (type) {
-            case KEY:
+            case CACHE_ID:
                 prevLen = 0;
-                curLen = keySize;
+                curLen = cacheIdSize;
+
+                break;
+
+            case KEY:
+                prevLen = cacheIdSize;
+                curLen = cacheIdSize + keySize;
 
                 break;
 
             case EXPIRE_TIME:
-                prevLen = keySize;
-                curLen = keySize + 8;
+                prevLen = cacheIdSize + keySize;
+                curLen = cacheIdSize + keySize + 8;
 
                 break;
 
             case VALUE:
-                prevLen = keySize + 8;
-                curLen = keySize + valSize + 8;
+                prevLen = cacheIdSize + keySize + 8;
+                curLen = cacheIdSize + keySize + valSize + 8;
 
                 break;
 
             case VERSION:
-                prevLen = keySize + valSize + 8;
-                curLen = keySize + valSize + CacheVersionIO.size(row.version(), false) + 8;
+                prevLen = cacheIdSize + keySize + valSize + 8;
+                curLen = cacheIdSize + keySize + valSize + CacheVersionIO.size(row.version(), false) + 8;
 
                 break;
 
@@ -1075,6 +1109,8 @@ public class DataPageIO extends PageIO {
 
         if (type == EntryPart.EXPIRE_TIME)
             writeExpireTimeFragment(buf, row.expireTime(), rowOff, len, prevLen);
+        else if (type == EntryPart.CACHE_ID)
+            writeCacheIdFragment(buf, row.cacheId(), rowOff, len, prevLen);
         else if (type != EntryPart.VERSION) {
             // Write key or value.
             final CacheObject co = type == EntryPart.KEY ? row.key() : row.value();
@@ -1139,6 +1175,32 @@ public class DataPageIO extends PageIO {
     }
 
     /**
+     * @param buf Buffer.
+     * @param cacheId Cache ID.
+     * @param rowOff Row offset.
+     * @param len Length.
+     * @param prevLen Prev length.
+     */
+    private void writeCacheIdFragment(ByteBuffer buf, int cacheId, int rowOff, int len, int prevLen) {
+        if (cacheId == 0)
+            return;
+
+        int size = 4;
+
+        if (size <= len)
+            buf.putInt(cacheId);
+        else {
+            ByteBuffer cacheIdBuf = ByteBuffer.allocate(size);
+
+            cacheIdBuf.order(buf.order());
+
+            cacheIdBuf.putInt(cacheId);
+
+            buf.put(cacheIdBuf.array(), rowOff - prevLen, len);
+        }
+    }
+
+    /**
      *
      */
     private enum EntryPart {
@@ -1152,7 +1214,10 @@ public class DataPageIO extends PageIO {
         VERSION,
 
         /** */
-        EXPIRE_TIME
+        EXPIRE_TIME,
+
+        /** */
+        CACHE_ID
     }
 
     /**
@@ -1326,14 +1391,21 @@ public class DataPageIO extends PageIO {
     ) throws IgniteCheckedException {
         long addr = pageAddr + dataOff;
 
+        int cacheIdSize = row.cacheId() != 0 ? 4 : 0;
+
         if (newRow) {
             PageUtils.putShort(addr, 0, (short)payloadSize);
             addr += 2;
 
+            if (cacheIdSize != 0)
+                PageUtils.putInt(addr, 0, row.cacheId());
+
+            addr += cacheIdSize;
+
             addr += row.key().putValue(addr);
         }
         else
-            addr += (2 + row.key().valueBytesLength(null));
+            addr += (2 + cacheIdSize + row.key().valueBytesLength(null));
 
         addr += row.value().putValue(addr);
 
@@ -1358,4 +1430,20 @@ public class DataPageIO extends PageIO {
 
         PageUtils.putBytes(pageAddr, dataOff, payload);
     }
+
+    /**
+     * Defines closure interface for applying computations to data page items.
+     *
+     * @param <T> Closure return type.
+     */
+    public interface CC<T> {
+        /**
+         * Closure body.
+         *
+         * @param link Link to item.
+         * @return Closure return value.
+         * @throws IgniteCheckedException In case of error in closure body.
+         */
+        public T apply(long link) throws IgniteCheckedException;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index d652767..5a8dfa0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -1795,6 +1795,8 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                     // Do not check topology version if topology was locked on near node by
                     // external transaction or explicit lock.
                     if (req.topologyLocked() || !needRemap(req.topologyVersion(), top.topologyVersion())) {
+                        ctx.shared().database().ensureFreeSpace(ctx.memoryPolicy());
+
                         locked = lockEntries(req, req.topologyVersion());
 
                         boolean hasNear = ctx.discovery().cacheNearNode(node, name());

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index c257154..64f6187 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -2673,6 +2673,8 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter implements AutoClosea
                                 GridCacheEntryEx entry = cacheCtx.cache().entryEx(key, topVer);
 
                                 try {
+                                    cacheCtx.shared().database().ensureFreeSpace(cacheCtx.memoryPolicy());
+
                                     EntryGetResult verVal = entry.versionedValue(cacheVal,
                                         ver,
                                         null,

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
index 767ce84..e5cd469 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxRemote.java
@@ -334,7 +334,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
 
                 CacheObject val = cached.peek(null);
 
-                if (val == null && cached.evictInternal(xidVer, null)) {
+                if (val == null && cached.evictInternal(xidVer, null, false)) {
                     evicted.add(entry.txKey());
 
                     return false;
@@ -395,7 +395,7 @@ public class GridNearTxRemote extends GridDistributedTxRemoteAdapter {
 
                 CacheObject peek = cached.peek(null);
 
-                if (peek == null && cached.evictInternal(xidVer, null)) {
+                if (peek == null && cached.evictInternal(xidVer, null, false)) {
                     cached.context().cache().removeIfObsolete(key.key());
 
                     evicted.add(key);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
index da92692..b8c0e36 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/atomic/GridLocalAtomicCache.java
@@ -791,6 +791,8 @@ public class GridLocalAtomicCache<K, V> extends GridLocalCache<K, V> {
 
         CacheEntryPredicate[] filters = CU.filterArray(filter);
 
+        ctx.shared().database().ensureFreeSpace(ctx.memoryPolicy());
+
         if (writeThrough && keys.size() > 1) {
             return updateWithBatch(op,
                 keys,
@@ -995,8 +997,8 @@ public class GridLocalAtomicCache<K, V> extends GridLocalCache<K, V> {
                             null,
                             null,
                             /*read-through*/true,
-                            /**update-metrics*/true,
-                            /**event*/true,
+                            /*update-metrics*/true,
+                            /*event*/true,
                             subjId,
                             entryProcessor,
                             taskName,

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
index 4ec89e1..9beb296 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessor.java
@@ -180,13 +180,6 @@ public interface IgniteCacheObjectProcessor extends GridProcessor {
     public CacheObject toCacheObject(CacheObjectContext ctx, ByteBuffer buf);
 
     /**
-     * @param ctx Cache context.
-     * @param buf Buffer to read from.
-     * @return Cache object.
-     */
-    public KeyCacheObject toKeyCacheObject(CacheObjectContext ctx, ByteBuffer buf) throws IgniteCheckedException;
-
-    /**
      * @param ctx Cache object context.
      * @param buf Buffer.
      * @param incompleteObj Incomplete cache object or {@code null} if it's a first read.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
index 4726d86..a8595fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cacheobject/IgniteCacheObjectProcessorImpl.java
@@ -188,22 +188,6 @@ public class IgniteCacheObjectProcessorImpl extends GridProcessorAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public KeyCacheObject toKeyCacheObject(CacheObjectContext ctx, ByteBuffer buf) throws IgniteCheckedException {
-        int len = buf.getInt();
-
-        if (len == 0)
-            return null;
-
-        byte type = buf.get();
-
-        byte[] data = new byte[len];
-
-        buf.get(data);
-
-        return toKeyCacheObject(ctx, type, data);
-    }
-
-    /** {@inheritDoc} */
     @Override public IncompleteCacheObject toCacheObject(
         final CacheObjectContext ctx,
         final ByteBuffer buf,

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index 46dec44..adbd6f1 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -369,7 +369,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
 
     /** @inheritDoc */
     @Override public boolean evictInternal(GridCacheVersion obsoleteVer,
-        @Nullable CacheEntryPredicate[] filter) {
+        @Nullable CacheEntryPredicate[] filter, boolean evictOffheap) {
         assert false;
 
         return false;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
index bc7fffe..58c3841 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtEntrySelfTest.java
@@ -280,7 +280,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
         assert e0.readers().contains(other.id());
         assert e1 == null || e1.readers().isEmpty();
 
-        assert !e0.evictInternal(dht0.context().versions().next(), null);
+        assert !e0.evictInternal(dht0.context().versions().next(), null, false);
 
         assertEquals(1, near0.localSize(CachePeekMode.ALL));
         assertEquals(1, dht0.localSize(null));
@@ -288,7 +288,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
         assertEquals(1, near1.localSize(CachePeekMode.ALL));
         assertEquals(0, dht1.localSize(null));
 
-        assert !e0.evictInternal(dht0.context().versions().next(), null);
+        assert !e0.evictInternal(dht0.context().versions().next(), null, false);
 
         assertEquals(1, near0.localSize(CachePeekMode.ALL));
         assertEquals(1, dht0.localSize(null));

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
new file mode 100644
index 0000000..bf05146
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionAbstractTest.java
@@ -0,0 +1,124 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+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;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class PageEvictionAbstractTest extends GridCommonAbstractTest {
+    /** */
+    protected static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
+
+    /** Offheap size for memory policy. */
+    private static final int SIZE = 256 * 1024 * 1024;
+
+    /** Page size. */
+    static final int PAGE_SIZE = 2048;
+
+    /** Number of entries. */
+    static final int ENTRIES = 400_000;
+
+    /** Empty pages pool size. */
+    private static final int EMPTY_PAGES_POOL_SIZE = 100;
+
+    /** Eviction threshold. */
+    private static final double EVICTION_THRESHOLD = 0.9;
+
+    /** Default policy name. */
+    private static final String DEFAULT_POLICY_NAME = "dfltPlc";
+
+    /**
+     * @param mode Eviction mode.
+     * @param configuration Configuration.
+     * @return Configuration with given eviction mode set.
+     */
+    static IgniteConfiguration setEvictionMode(DataPageEvictionMode mode, IgniteConfiguration configuration) {
+        MemoryPolicyConfiguration[] policies = configuration.getMemoryConfiguration().getMemoryPolicies();
+
+        for (MemoryPolicyConfiguration plcCfg : policies)
+            plcCfg.setPageEvictionMode(mode);
+
+        return configuration;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
+
+        MemoryConfiguration dbCfg = new MemoryConfiguration();
+
+        MemoryPolicyConfiguration plc = new MemoryPolicyConfiguration();
+
+        plc.setSize(SIZE);
+        plc.setEmptyPagesPoolSize(EMPTY_PAGES_POOL_SIZE);
+        plc.setEvictionThreshold(EVICTION_THRESHOLD);
+        plc.setName(DEFAULT_POLICY_NAME);
+
+        dbCfg.setMemoryPolicies(plc);
+        dbCfg.setPageSize(PAGE_SIZE);
+        dbCfg.setDefaultMemoryPolicyName(DEFAULT_POLICY_NAME);
+
+        cfg.setMemoryConfiguration(dbCfg);
+
+        return cfg;
+    }
+
+    /**
+     * @param name Name.
+     * @param cacheMode Cache mode.
+     * @param atomicityMode Atomicity mode.
+     * @param writeSynchronizationMode Write synchronization mode.
+     * @param memoryPlcName Memory policy name.
+     * @return Cache configuration.
+     */
+    protected static CacheConfiguration<Object, Object> cacheConfig(
+        String name,
+        String memoryPlcName,
+        CacheMode cacheMode,
+        CacheAtomicityMode atomicityMode,
+        CacheWriteSynchronizationMode writeSynchronizationMode
+    ) {
+        CacheConfiguration<Object, Object> cacheConfiguration = new CacheConfiguration<>()
+            .setName(name)
+            .setAffinity(new RendezvousAffinityFunction(false, 32))
+            .setCacheMode(cacheMode)
+            .setAtomicityMode(atomicityMode)
+            .setMemoryPolicyName(memoryPlcName)
+            .setWriteSynchronizationMode(writeSynchronizationMode);
+
+        if (cacheMode == CacheMode.PARTITIONED)
+            cacheConfiguration.setBackups(1);
+
+        return cacheConfiguration;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
new file mode 100644
index 0000000..2302de1
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionMultinodeTest.java
@@ -0,0 +1,110 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+
+/**
+ *
+ */
+public abstract class PageEvictionMultinodeTest extends PageEvictionAbstractTest {
+    /** Cache modes. */
+    private static final CacheMode[] CACHE_MODES = {CacheMode.PARTITIONED, CacheMode.REPLICATED};
+
+    /** Atomicity modes. */
+    private static final CacheAtomicityMode[] ATOMICITY_MODES = {
+        CacheAtomicityMode.ATOMIC, CacheAtomicityMode.TRANSACTIONAL};
+
+    /** Write modes. */
+    private static final CacheWriteSynchronizationMode[] WRITE_MODES = {CacheWriteSynchronizationMode.PRIMARY_SYNC,
+        CacheWriteSynchronizationMode.FULL_SYNC, CacheWriteSynchronizationMode.FULL_ASYNC};
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTestsStarted() throws Exception {
+        startGridsMultiThreaded(4, false);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTestsStopped() throws Exception {
+        stopAllGrids();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected long getTestTimeout() {
+        return 10 * 60 * 1000;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPageEviction() throws Exception {
+        for (int i = 0; i < CACHE_MODES.length; i++) {
+            for (int j = 0; j < ATOMICITY_MODES.length; j++) {
+                for (int k = 0; k < WRITE_MODES.length; k++) {
+                    if (i + j + Math.min(k, 1) <= 1) {
+                        CacheConfiguration<Object, Object> cfg = cacheConfig(
+                            "evict" + i + j + k, null, CACHE_MODES[i], ATOMICITY_MODES[j], WRITE_MODES[k]);
+
+                        createCacheAndTestEvcition(cfg);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * @param cfg Config.
+     * @throws Exception If failed.
+     */
+    private void createCacheAndTestEvcition(CacheConfiguration<Object, Object> cfg) throws Exception {
+        IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(cfg);
+
+        for (int i = 1; i <= ENTRIES; i++) {
+            ThreadLocalRandom r = ThreadLocalRandom.current();
+
+            if (r.nextInt() % 5 == 0)
+                cache.put(i, new TestObject(PAGE_SIZE / 4 - 50 + r.nextInt(5000))); // Fragmented object.
+            else
+                cache.put(i, new TestObject(r.nextInt(PAGE_SIZE / 4 - 50))); // Fits in one page.
+
+            if (r.nextInt() % 7 == 0)
+                cache.get(r.nextInt(i)); // Touch.
+            else if (r.nextInt() % 11 == 0)
+                cache.remove(r.nextInt(i)); // Remove.
+            else if (r.nextInt() % 13 == 0)
+                cache.put(r.nextInt(i), new TestObject(r.nextInt(PAGE_SIZE / 2))); // Update.
+
+            if (i % (ENTRIES / 10) == 0)
+                System.out.println(">>> Entries put: " + i);
+        }
+
+        int resultingSize = cache.size(CachePeekMode.PRIMARY);
+
+        System.out.println(">>> Resulting size: " + resultingSize);
+
+        // More than half of entries evicted, no OutOfMemory occurred, success.
+        assertTrue(resultingSize < ENTRIES / 2);
+
+        ignite(0).destroyCache(cfg.getName());
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
new file mode 100644
index 0000000..c8cd7c9
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionReadThroughTest.java
@@ -0,0 +1,140 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import java.util.concurrent.ThreadLocalRandom;
+import javax.cache.Cache;
+import javax.cache.configuration.Factory;
+import javax.cache.integration.CacheLoaderException;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.cache.store.CacheStoreAdapter;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class PageEvictionReadThroughTest extends PageEvictionAbstractTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(DataPageEvictionMode.RANDOM_LRU, super.getConfiguration(gridName));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEvictionWithReadThroughAtomicReplicated() throws Exception {
+        testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEvictionWithReadThroughAtomicLocal() throws Exception {
+        testEvictionWithReadThrough(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEvictionWithReadThroughTxReplicated() throws Exception {
+        testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEvictionWithReadThroughTxLocal() throws Exception {
+        testEvictionWithReadThrough(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL);
+    }
+
+    /**
+     * @param atomicityMode Atomicity mode.
+     * @param cacheMode Cache mode.
+     * @throws Exception If failed.
+     */
+    private void testEvictionWithReadThrough(CacheAtomicityMode atomicityMode, CacheMode cacheMode) throws Exception {
+        startGridsMultiThreaded(4);
+
+        CacheConfiguration<Object, Object> cfg = cacheConfig("evict-rebalance", null, cacheMode, atomicityMode,
+            CacheWriteSynchronizationMode.PRIMARY_SYNC);
+        cfg.setReadThrough(true);
+        cfg.setCacheStoreFactory(new TestStoreFactory());
+
+        IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(cfg);
+
+        for (int i = 1; i <= ENTRIES; i++) {
+            cache.get(i);
+
+            if (i % (ENTRIES / 10) == 0)
+                System.out.println(">>> Entries: " + i);
+        }
+
+        int size = cache.size(CachePeekMode.PRIMARY);
+
+        System.out.println(">>> Resulting size: " + size);
+
+        assertTrue(size > 0);
+
+        assertTrue(size < ENTRIES);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+
+    /**
+     *
+     */
+    private static class TestStoreFactory implements Factory<TestCacheStore> {
+        /** {@inheritDoc} */
+        @Override public TestCacheStore create() {
+            return new TestCacheStore();
+        }
+    }
+
+    /**
+     *
+     */
+    private static class TestCacheStore extends CacheStoreAdapter<Object, Object> {
+        /** {@inheritDoc} */
+        @Override public Object load(Object key) throws CacheLoaderException {
+            ThreadLocalRandom r = ThreadLocalRandom.current();
+
+            if (r.nextInt() % 5 == 0)
+                return new TestObject(PAGE_SIZE / 4 - 50 + r.nextInt(5000)); // Fragmented object.
+            else
+                return new TestObject(r.nextInt(PAGE_SIZE / 4 - 50)); // Fits in one page.
+        }
+
+        /** {@inheritDoc} */
+        @Override public void write(Cache.Entry<?, ?> entry) {
+            throw new UnsupportedOperationException();
+        }
+
+        /** {@inheritDoc} */
+        @Override public void delete(Object key) {
+            // No-op.
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java
new file mode 100644
index 0000000..4335649
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionTouchOrderTest.java
@@ -0,0 +1,109 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class PageEvictionTouchOrderTest extends PageEvictionAbstractTest {
+    /** Test entries number. */
+    private static final int SAFE_ENTRIES = 1000;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(/* Overriden by FairFifoPageEvictionTracker */DataPageEvictionMode.RANDOM_LRU,
+            super.getConfiguration(gridName));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        System.setProperty("override.fair.fifo.page.eviction.tracker", "true");
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTouchOrderWithFairFifoEvictionAtomicReplicated() throws Exception {
+        testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.REPLICATED);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTouchOrderWithFairFifoEvictionAtomicLocal() throws Exception {
+        testTouchOrderWithFairFifoEviction(CacheAtomicityMode.ATOMIC, CacheMode.LOCAL);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTouchOrderWithFairFifoEvictionTxReplicated() throws Exception {
+        testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.REPLICATED);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTouchOrderWithFairFifoEvictionTxLocal() throws Exception {
+        testTouchOrderWithFairFifoEviction(CacheAtomicityMode.TRANSACTIONAL, CacheMode.LOCAL);
+    }
+
+    /**
+     * @param atomicityMode Atomicity mode.
+     * @param cacheMode Cache mode.
+     * @throws Exception If failed.
+     */
+    private void testTouchOrderWithFairFifoEviction(CacheAtomicityMode atomicityMode, CacheMode cacheMode)
+        throws Exception {
+        startGrid(0);
+
+        CacheConfiguration<Object, Object> cfg = cacheConfig("evict-fair", null, cacheMode, atomicityMode,
+            CacheWriteSynchronizationMode.PRIMARY_SYNC);
+
+        IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(cfg);
+
+        for (int i = 1; i <= ENTRIES; i++) {
+            cache.put(i, new TestObject(PAGE_SIZE / 6));
+            // Row size is between PAGE_SIZE / 2 and PAGE_SIZE. Enforces "one row - one page".
+
+            if (i % (ENTRIES / 10) == 0)
+                System.out.println(">>> Entries put: " + i);
+        }
+
+        for (int i = ENTRIES - SAFE_ENTRIES + 1; i <= ENTRIES; i++)
+            assertNotNull(cache.get(i));
+
+        for (int i = 1; i <= SAFE_ENTRIES; i++)
+            assertNull(cache.get(i));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+
+        System.setProperty("override.fair.fifo.page.eviction.tracker", "false");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
new file mode 100644
index 0000000..fd80201
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/PageEvictionWithRebalanceTest.java
@@ -0,0 +1,81 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.CacheAtomicityMode;
+import org.apache.ignite.cache.CacheMode;
+import org.apache.ignite.cache.CachePeekMode;
+import org.apache.ignite.cache.CacheWriteSynchronizationMode;
+import org.apache.ignite.configuration.CacheConfiguration;
+
+/**
+ *
+ */
+public abstract class PageEvictionWithRebalanceTest extends PageEvictionAbstractTest {
+    /**
+     * @throws Exception If failed.
+     */
+    public void testEvictionWithRebalance() throws Exception {
+        startGridsMultiThreaded(4);
+
+        CacheConfiguration<Object, Object> cfg = cacheConfig("evict-rebalance", null, CacheMode.PARTITIONED,
+            CacheAtomicityMode.ATOMIC, CacheWriteSynchronizationMode.PRIMARY_SYNC);
+
+        IgniteCache<Object, Object> cache = ignite(0).getOrCreateCache(cfg);
+
+        for (int i = 1; i <= ENTRIES; i++) {
+            ThreadLocalRandom r = ThreadLocalRandom.current();
+
+            if (r.nextInt() % 5 == 0)
+                cache.put(i, new TestObject(PAGE_SIZE / 4 - 50 + r.nextInt(5000))); // Fragmented object.
+            else
+                cache.put(i, new TestObject(r.nextInt(PAGE_SIZE / 4 - 50))); // Fits in one page.
+
+            if (i % (ENTRIES / 10) == 0)
+                System.out.println(">>> Entries put: " + i);
+        }
+
+        int size = cache.size(CachePeekMode.PRIMARY);
+
+        System.out.println(">>> Resulting size: " + size);
+
+        assertTrue(size < ENTRIES);
+
+        for (int i = 3; i >= 1; i--) {
+            stopGrid(i);
+
+            cache.rebalance().get();
+
+            awaitPartitionMapExchange();
+
+            int rebalanceSize = cache.size(CachePeekMode.PRIMARY);
+
+            System.out.println(">>> Size after rebalance: " + rebalanceSize);
+
+            assertTrue(rebalanceSize < size);
+
+            size = rebalanceSize;
+        }
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopAllGrids();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionMultinodeTest.java
new file mode 100644
index 0000000..b05ec43
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionMultinodeTest.java
@@ -0,0 +1,30 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class Random2LruPageEvictionMultinodeTest extends PageEvictionMultinodeTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(DataPageEvictionMode.RANDOM_2_LRU, super.getConfiguration(gridName));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionWithRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionWithRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionWithRebalanceTest.java
new file mode 100644
index 0000000..56698fb
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/Random2LruPageEvictionWithRebalanceTest.java
@@ -0,0 +1,30 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class Random2LruPageEvictionWithRebalanceTest extends PageEvictionWithRebalanceTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(DataPageEvictionMode.RANDOM_2_LRU, super.getConfiguration(gridName));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionMultinodeTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionMultinodeTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionMultinodeTest.java
new file mode 100644
index 0000000..38ca2af
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionMultinodeTest.java
@@ -0,0 +1,30 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class RandomLruPageEvictionMultinodeTest extends PageEvictionMultinodeTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(DataPageEvictionMode.RANDOM_LRU, super.getConfiguration(gridName));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionWithRebalanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionWithRebalanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionWithRebalanceTest.java
new file mode 100644
index 0000000..d961360
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/RandomLruPageEvictionWithRebalanceTest.java
@@ -0,0 +1,30 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import org.apache.ignite.configuration.DataPageEvictionMode;
+import org.apache.ignite.configuration.IgniteConfiguration;
+
+/**
+ *
+ */
+public class RandomLruPageEvictionWithRebalanceTest extends PageEvictionWithRebalanceTest {
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        return setEvictionMode(DataPageEvictionMode.RANDOM_LRU, super.getConfiguration(gridName));
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/TestObject.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/TestObject.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/TestObject.java
new file mode 100644
index 0000000..baf2414
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/eviction/paged/TestObject.java
@@ -0,0 +1,78 @@
+/*
+* 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.apache.ignite.internal.processors.cache.eviction.paged;
+
+import java.util.Arrays;
+import java.util.concurrent.ThreadLocalRandom;
+
+/**
+ *
+ */
+class TestObject {
+    /** */
+    private int b;
+
+    /** */
+    private String c;
+
+    /** */
+    private int[] arr;
+
+    /**
+     * @param intArrSize Int array size.
+     */
+    public TestObject(int intArrSize) {
+        this.b = intArrSize;
+
+        this.c = String.valueOf(2 * intArrSize);
+
+        arr = new int[intArrSize];
+
+        for (int i = 0; i < intArrSize; i++)
+            arr[i] = ThreadLocalRandom.current().nextInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public boolean equals(Object o) {
+        if (this == o)
+            return true;
+
+        if (o == null || getClass() != o.getClass())
+            return false;
+
+        TestObject testObj = (TestObject)o;
+
+        if (b != testObj.b)
+            return false;
+
+        if (c != null ? !c.equals(testObj.c) : testObj.c != null)
+            return false;
+
+        return Arrays.equals(arr, testObj.arr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public int hashCode() {
+        int res = b;
+
+        res = 31 * res + (c != null ? c.hashCode() : 0);
+
+        res = 31 * res + Arrays.hashCode(arr);
+
+        return res;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java
index 7fccef1..d5011a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/database/FreeListImplSelfTest.java
@@ -39,6 +39,8 @@ import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.MemoryMetricsImpl;
+import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
+import org.apache.ignite.internal.processors.cache.database.evict.NoOpPageEvictionTracker;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
@@ -334,7 +336,11 @@ public class FreeListImplSelfTest extends GridCommonAbstractTest {
 
         long metaPageId = pageMem.allocatePage(1, 1, PageIdAllocator.FLAG_DATA);
 
-        return new FreeListImpl(1, "freelist", pageMem, new MemoryMetricsImpl(null), null, null, metaPageId, true);
+        MemoryMetricsImpl metrics = new MemoryMetricsImpl(null);
+
+        MemoryPolicy memPlc = new MemoryPolicy(pageMem, null, metrics, new NoOpPageEvictionTracker());
+
+        return new FreeListImpl(1, "freelist", metrics, memPlc, null, null, metaPageId, true);
     }
 
     /**
@@ -407,6 +413,11 @@ public class FreeListImplSelfTest extends GridCommonAbstractTest {
         @Override public int hash() {
             throw new UnsupportedOperationException();
         }
+
+        /** {@inheritDoc} */
+        @Override public int cacheId() {
+            return 0;
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
index 94e1447..1bdfdd1 100644
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheEvictionSelfTestSuite.java
@@ -33,6 +33,12 @@ import org.apache.ignite.internal.processors.cache.eviction.fifo.FifoEvictionPol
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearEvictionPolicySelfTest;
 import org.apache.ignite.internal.processors.cache.eviction.lru.LruNearOnlyNearEvictionPolicySelfTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.PageEvictionReadThroughTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.PageEvictionTouchOrderTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.Random2LruPageEvictionMultinodeTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.Random2LruPageEvictionWithRebalanceTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.RandomLruPageEvictionMultinodeTest;
+import org.apache.ignite.internal.processors.cache.eviction.paged.RandomLruPageEvictionWithRebalanceTest;
 import org.apache.ignite.internal.processors.cache.eviction.sorted.SortedEvictionPolicySelfTest;
 
 /**
@@ -63,6 +69,13 @@ public class IgniteCacheEvictionSelfTestSuite extends TestSuite {
         suite.addTest(new TestSuite(GridCacheEmptyEntriesLocalSelfTest.class));
         suite.addTest(new TestSuite(GridCacheEvictableEntryEqualsSelfTest.class));
 
+        suite.addTest(new TestSuite(RandomLruPageEvictionMultinodeTest.class));
+        suite.addTest(new TestSuite(Random2LruPageEvictionMultinodeTest.class));
+        suite.addTest(new TestSuite(RandomLruPageEvictionWithRebalanceTest.class));
+        suite.addTest(new TestSuite(Random2LruPageEvictionWithRebalanceTest.class));
+        suite.addTest(new TestSuite(PageEvictionTouchOrderTest.class));
+        suite.addTest(new TestSuite(PageEvictionReadThroughTest.class));
+
         return suite;
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
index ce10cdb..042e163 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Row.java
@@ -174,4 +174,9 @@ public abstract class GridH2Row extends Row implements GridSearchRowPointer, Cac
     @Override public int hash() {
         throw new UnsupportedOperationException();
     }
+
+    /** {@inheritDoc} */
+    @Override public int cacheId() {
+        return 0;
+    }
 }
\ No newline at end of file


[55/57] [abbrv] ignite git commit: Fix for C++

Posted by ag...@apache.org.
Fix for C++


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

Branch: refs/heads/ignite-3477-debug
Commit: 50f9f1612d6f2b3d2f9ee1a2bd4cac3402673753
Parents: 06cee57
Author: Igor Sapego <is...@gridgain.com>
Authored: Tue Apr 11 21:51:30 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Tue Apr 11 21:51:30 2017 +0300

----------------------------------------------------------------------
 .../cpp/core-test/src/continuous_query_test.cpp | 11 ++++++---
 .../core/include/ignite/impl/module_manager.h   | 26 ++++++++++++++++++++
 .../examples/include/ignite/examples/person.h   |  1 -
 3 files changed, 33 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/50f9f161/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
index e09b403..2d1a2ee 100644
--- a/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
+++ b/modules/platforms/cpp/core-test/src/continuous_query_test.cpp
@@ -373,6 +373,13 @@ void CheckEvents(Cache<int, TestEntry>& cache, Listener<int, TestEntry>& lsnr)
     lsnr.CheckNextEvent(1, TestEntry(20), boost::none);
 }
 
+IGNITE_EXPORTED_CALL void IgniteModuleInit0(ignite::IgniteBindingContext& context)
+{
+    IgniteBinding binding = context.GetBingding();
+
+    binding.RegisterCacheEntryEventFilter< RangeFilter<int, TestEntry> >();
+}
+
 BOOST_FIXTURE_TEST_SUITE(ContinuousQueryTestSuite, ContinuousQueryTestSuiteFixture)
 
 BOOST_AUTO_TEST_CASE(TestBasic)
@@ -679,8 +686,6 @@ BOOST_AUTO_TEST_CASE(TestPublicPrivateConstantsConsistence)
 
 BOOST_AUTO_TEST_CASE(TestFilterSingleNode)
 {
-    node.GetBinding().RegisterCacheEntryEventFilter< RangeFilter<int, TestEntry> >();
-
     Listener<int, TestEntry> lsnr;
     RangeFilter<int, TestEntry> filter(100, 150);
 
@@ -726,8 +731,6 @@ BOOST_AUTO_TEST_CASE(TestFilterMultipleNodes)
     Ignite node3 = ignite_test::StartNode("cache-query-continuous.xml", "node-03");
 #endif
 
-    node.GetBinding().RegisterCacheEntryEventFilter< RangeFilter<int, TestEntry> >();
-
     Listener<int, TestEntry> lsnr;
     RangeFilter<int, TestEntry> filter(100, 150);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/50f9f161/modules/platforms/cpp/core/include/ignite/impl/module_manager.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/impl/module_manager.h b/modules/platforms/cpp/core/include/ignite/impl/module_manager.h
index 55e6943..1f9783e 100644
--- a/modules/platforms/cpp/core/include/ignite/impl/module_manager.h
+++ b/modules/platforms/cpp/core/include/ignite/impl/module_manager.h
@@ -19,6 +19,7 @@
 #define _IGNITE_IMPL_MODULE_MANAGER
 
 #include <vector>
+#include <sstream>
 
 #include <ignite/common/common.h>
 #include <ignite/common/dynamic_load_os.h>
@@ -30,6 +31,11 @@
  */
 #define IGNITE_MODULE_INIT_CALLBACK_NAME "IgniteModuleInit"
 
+/**
+ * Max number of additional init callbacks
+ */
+#define IGNITE_MODULE_ADDITIONAL_INIT_CALLBACKS_MAX_NUM 100
+
 #define IGNITE_EXPORTED_CALL \
     extern "C" IGNITE_IMPORT_EXPORT
 
@@ -102,6 +108,16 @@ namespace ignite
 
                 if (callback)
                     callback(bindingContext);
+
+                for (int i = 0; i < IGNITE_MODULE_ADDITIONAL_INIT_CALLBACKS_MAX_NUM; ++i)
+                {
+                    ModuleInitCallback* callback0 = GetAdditionalModuleInitCallback(module, i);
+
+                    if (!callback0)
+                        break;
+
+                    callback0(bindingContext);
+                }
             }
 
         private:
@@ -119,6 +135,16 @@ namespace ignite
                     module.FindSymbol(IGNITE_MODULE_INIT_CALLBACK_NAME));
             }
 
+            static ModuleInitCallback* GetAdditionalModuleInitCallback(Module& module, int num)
+            {
+                std::stringstream tmp;
+
+                tmp << IGNITE_MODULE_INIT_CALLBACK_NAME << num;
+
+                return reinterpret_cast<ModuleInitCallback*>(
+                    module.FindSymbol(tmp.str()));
+            }
+
             /** Collection of loaded modules. */
             std::vector<Module> loadedModules;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/50f9f161/modules/platforms/cpp/examples/include/ignite/examples/person.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/examples/include/ignite/examples/person.h b/modules/platforms/cpp/examples/include/ignite/examples/person.h
index 86c51c8..64693a9 100644
--- a/modules/platforms/cpp/examples/include/ignite/examples/person.h
+++ b/modules/platforms/cpp/examples/include/ignite/examples/person.h
@@ -79,7 +79,6 @@ namespace ignite
             IGNITE_BINARY_GET_TYPE_ID_AS_HASH(Person)
             IGNITE_BINARY_GET_TYPE_NAME_AS_IS(Person)
             IGNITE_BINARY_GET_FIELD_ID_AS_HASH
-            IGNITE_BINARY_GET_HASH_CODE_ZERO(Person)
             IGNITE_BINARY_IS_NULL_FALSE(Person)
             IGNITE_BINARY_GET_NULL_DEFAULT_CTOR(Person)
 


[34/57] [abbrv] ignite git commit: Merge remote-tracking branch 'origin/ignite-3477-master' into ignite-3477-master

Posted by ag...@apache.org.
Merge remote-tracking branch 'origin/ignite-3477-master' into ignite-3477-master


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

Branch: refs/heads/ignite-3477-debug
Commit: a68045f0d8871da5619e9f8f01700b6f3341a18f
Parents: f9b6424 a45dd88
Author: Sergi Vladykin <se...@gmail.com>
Authored: Tue Apr 11 12:42:49 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Tue Apr 11 12:42:49 2017 +0300

----------------------------------------------------------------------
 .../internal/pagemem/impl/PageNoStoreImpl.java     |  0
 .../distributed/dht/GridDhtLocalPartition.java     |  8 ++------
 .../cache/transactions/IgniteTxHandler.java        |  2 +-
 ...aryObjectsAtomicNearDisabledOnheapSelfTest.java | 17 +++++++++++++++++
 ...GridCacheBinaryObjectsAtomicOnheapSelfTest.java | 17 +++++++++++++++++
 ...jectsPartitionedNearDisabledOnheapSelfTest.java | 17 +++++++++++++++++
 ...acheBinaryObjectsPartitionedOnheapSelfTest.java | 17 +++++++++++++++++
 7 files changed, 71 insertions(+), 7 deletions(-)
----------------------------------------------------------------------



[49/57] [abbrv] ignite git commit: ignite-3477-master onheapCacheEnabled=true xml

Posted by ag...@apache.org.
ignite-3477-master  onheapCacheEnabled=true xml


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

Branch: refs/heads/ignite-3477-debug
Commit: 391d8d00327736a3acad0025ca1353131b3b0a64
Parents: c9fd6b9
Author: Dmitriy Govorukhin <dg...@gridgain.com>
Authored: Tue Apr 11 18:08:44 2017 +0300
Committer: Dmitriy Govorukhin <dg...@gridgain.com>
Committed: Tue Apr 11 18:08:44 2017 +0300

----------------------------------------------------------------------
 modules/core/src/test/config/spring-multicache.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/391d8d00/modules/core/src/test/config/spring-multicache.xml
----------------------------------------------------------------------
diff --git a/modules/core/src/test/config/spring-multicache.xml b/modules/core/src/test/config/spring-multicache.xml
index 6c6ecf4..7644a30 100644
--- a/modules/core/src/test/config/spring-multicache.xml
+++ b/modules/core/src/test/config/spring-multicache.xml
@@ -72,6 +72,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -94,6 +96,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -116,6 +120,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -138,6 +144,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -161,6 +169,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -183,6 +193,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -205,6 +217,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>
@@ -227,6 +241,8 @@
 
                     <property name="rebalanceMode" value="SYNC"/>
 
+                    <property name="onheapCacheEnabled" value="true"/>
+
                     <property name="evictionPolicy">
                         <bean class="org.apache.ignite.cache.eviction.lru.LruEvictionPolicy">
                             <property name="maxSize" value="100"/>


[35/57] [abbrv] ignite git commit: Merge branch 'master' into ignite-3477-master

Posted by ag...@apache.org.
Merge branch 'master' into ignite-3477-master

# Conflicts:
#	modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
#	modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
#	modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
#	modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
#	modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
#	modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
#	modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
#	modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd


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

Branch: refs/heads/ignite-3477-debug
Commit: 2210635aea0a39da7b3c9f699cbc268ef6eeece7
Parents: a68045f edfa353
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 12:57:38 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 12:57:38 2017 +0300

----------------------------------------------------------------------
 DEVNOTES.txt                                    |    3 -
 assembly/dependencies-fabric-lgpl.xml           |    3 -
 assembly/dependencies-fabric.xml                |    3 -
 assembly/dependencies-schema-import.xml         |   57 -
 assembly/release-base.xml                       |    2 -
 assembly/release-fabric-base.xml                |    9 -
 assembly/release-schema-import.xml              |   50 -
 bin/ignite-schema-import.bat                    |  110 -
 bin/ignite-schema-import.sh                     |   87 -
 examples/README-LGPL.txt                        |    4 +-
 examples/README.txt                             |    2 -
 examples/pom-standalone-lgpl.xml                |    1 -
 examples/pom-standalone.xml                     |    1 -
 examples/pom.xml                                |    1 -
 examples/schema-import/README.txt               |   38 -
 examples/schema-import/bin/db-init.sql          |   28 -
 examples/schema-import/bin/h2-server.bat        |   80 -
 examples/schema-import/bin/h2-server.sh         |   66 -
 .../schema-import/bin/schema-import.properties  |   28 -
 examples/schema-import/pom-standalone.xml       |   90 -
 examples/schema-import/pom.xml                  |  101 -
 .../org/apache/ignite/schema/CacheConfig.java   |   36 -
 .../java/org/apache/ignite/schema/Demo.java     |  134 --
 .../java/org/apache/ignite/schema/DemoNode.java |   38 -
 .../ignite/schema/H2DataSourceFactory.java      |   35 -
 .../java/org/apache/ignite/schema/Person.java   |   44 -
 .../org/apache/ignite/schema/PersonKey.java     |   37 -
 .../JettyRestProcessorAbstractSelfTest.java     |    3 +-
 .../org/apache/ignite/IgniteFileSystem.java     |   26 +-
 .../configuration/FileSystemConfiguration.java  |    6 +-
 .../configuration/IgniteConfiguration.java      |    4 +-
 .../configuration/NearCacheConfiguration.java   |   56 +-
 .../ignite/internal/IgniteEventsImpl.java       |    8 +-
 .../org/apache/ignite/internal/IgnitionEx.java  |    4 +-
 .../binary/builder/BinaryObjectBuilderImpl.java |   36 +-
 .../eventstorage/GridEventStorageManager.java   |   12 +-
 .../processors/cache/GridCacheAtomicFuture.java |    2 +-
 .../processors/cache/GridCacheMvccManager.java  |   84 +-
 .../cache/GridDeferredAckMessageSender.java     |   11 +-
 .../GridDhtAtomicAbstractUpdateFuture.java      |    4 +-
 .../GridNearAtomicAbstractUpdateFuture.java     |    2 +-
 .../GridNearAtomicSingleUpdateFuture.java       |   21 +-
 .../dht/atomic/GridNearAtomicUpdateFuture.java  |   23 +-
 .../cache/transactions/IgniteTxManager.java     |    2 +-
 .../internal/processors/igfs/IgfsAsyncImpl.java |    8 +-
 .../internal/processors/igfs/IgfsImpl.java      |   20 +-
 .../utils/PlatformConfigurationUtils.java       |   28 +
 .../org/apache/ignite/internal/util/F0.java     |  196 +-
 .../ignite/internal/util/lang/GridFunc.java     |  620 +----
 .../visor/igfs/VisorIgfsFormatTask.java         |    2 +-
 .../visor/node/VisorIgfsConfiguration.java      |    2 +-
 .../deployment/local/LocalDeploymentSpi.java    |    5 +-
 .../spi/eventstorage/NoopEventStorageSpi.java   |   53 +
 .../test/config/store/jdbc/ignite-jdbc-type.xml |    2 +-
 .../cache/store/jdbc/model/Organization.java    |    2 -
 .../cache/store/jdbc/model/OrganizationKey.java |    2 -
 .../ignite/cache/store/jdbc/model/Person.java   |    2 -
 .../store/jdbc/model/PersonComplexKey.java      |    4 +-
 .../cache/store/jdbc/model/PersonKey.java       |    2 -
 .../ignite/igfs/IgfsEventsAbstractSelfTest.java |    2 +-
 .../igfs/IgfsFragmentizerAbstractSelfTest.java  |    2 +-
 .../ignite/igfs/IgfsFragmentizerSelfTest.java   |    2 +-
 .../GridEventStorageDefaultExceptionTest.java   |   94 +
 ...faultIgfsSecondaryFileSystemTestAdapter.java |    2 +-
 .../igfs/IgfsAbstractBaseSelfTest.java          |    2 +-
 .../processors/igfs/IgfsAbstractSelfTest.java   |    4 +-
 ...sCachePerBlockLruEvictionPolicySelfTest.java |    2 +-
 .../igfs/IgfsMetaManagerSelfTest.java           |    2 +-
 .../processors/igfs/IgfsMetricsSelfTest.java    |    2 +-
 .../internal/processors/igfs/IgfsMock.java      |    4 +-
 .../processors/igfs/IgfsProcessorSelfTest.java  |    8 +-
 .../processors/igfs/IgfsStreamsSelfTest.java    |    2 +-
 .../processors/igfs/IgfsTaskSelfTest.java       |    2 +-
 .../IgfsAbstractRecordResolverSelfTest.java     |    2 +-
 .../testframework/junits/GridAbstractTest.java  |   56 +-
 .../testsuites/IgniteComputeGridTestSuite.java  |    2 +
 .../impl/HadoopTaskExecutionSelfTest.java       |    2 +-
 ...opClientProtocolMultipleServersSelfTest.java |    2 +-
 .../client/HadoopClientProtocolSelfTest.java    |    2 +-
 .../hadoop/impl/igfs/IgfsEventsTestSuite.java   |    2 +-
 modules/log4j2/pom.xml                          |    4 +-
 .../ignite/logger/log4j2/Log4J2Logger.java      |   23 +-
 .../Apache.Ignite.Core.Tests/EventsTest.cs      |   63 +-
 .../IgniteConfigurationSerializerTest.cs        |   13 +-
 .../IgniteConfigurationTest.cs                  |   15 +-
 .../Apache.Ignite.Core.csproj                   |    4 +
 .../Events/IEventStorageSpi.cs                  |   33 +
 .../Events/MemoryEventStorageSpi.cs             |  100 +
 .../Events/NoopEventStorageSpi.cs               |   27 +
 .../Apache.Ignite.Core/IgniteConfiguration.cs   |   48 +-
 .../IgniteConfigurationSection.xsd              |   22 +
 .../Plugin/IPluginConfiguration.cs              |    4 +-
 modules/schema-import-db/README.txt             |    4 -
 modules/schema-import-db/pom.xml                |   55 -
 .../apache/ignite/schema/parser/DbColumn.java   |   88 -
 .../ignite/schema/parser/DbMetadataReader.java  |  147 --
 .../apache/ignite/schema/parser/DbTable.java    |   82 -
 .../parser/dialect/DB2MetadataDialect.java      |   33 -
 .../parser/dialect/DatabaseMetadataDialect.java |  102 -
 .../parser/dialect/JdbcMetadataDialect.java     |  199 --
 .../parser/dialect/MySQLMetadataDialect.java    |   82 -
 .../parser/dialect/OracleMetadataDialect.java   |  360 ---
 modules/schema-import/README.txt                |  216 --
 modules/schema-import/pom.xml                   |  119 -
 .../main/java/media/data_connection_48x48.png   |  Bin 4443 -> 0 bytes
 .../src/main/java/media/error_48x48.png         |  Bin 4349 -> 0 bytes
 .../src/main/java/media/ignite_128x128.png      |  Bin 4917 -> 0 bytes
 .../src/main/java/media/ignite_16x16.png        |  Bin 608 -> 0 bytes
 .../src/main/java/media/ignite_24x24.png        |  Bin 930 -> 0 bytes
 .../src/main/java/media/ignite_32x32.png        |  Bin 1203 -> 0 bytes
 .../src/main/java/media/ignite_48x48.png        |  Bin 1868 -> 0 bytes
 .../src/main/java/media/ignite_64x64.png        |  Bin 2453 -> 0 bytes
 .../src/main/java/media/information_48x48.png   |  Bin 4102 -> 0 bytes
 .../src/main/java/media/question_48x48.png      |  Bin 3857 -> 0 bytes
 .../src/main/java/media/sign_warning_48x48.png  |  Bin 2988 -> 0 bytes
 .../schema-import/src/main/java/media/style.css |  134 --
 .../src/main/java/media/text_tree_48x48.png     |  Bin 2567 -> 0 bytes
 .../ignite/schema/generator/CodeGenerator.java  |  831 -------
 .../ignite/schema/generator/GeneratorUtils.java |   70 -
 .../ignite/schema/generator/XmlGenerator.java   |  446 ----
 .../ignite/schema/model/PojoDescriptor.java     |  497 ----
 .../apache/ignite/schema/model/PojoField.java   |  461 ----
 .../ignite/schema/model/SchemaDescriptor.java   |   62 -
 .../schema/parser/DatabaseMetadataParser.java   |  115 -
 .../ignite/schema/ui/ConfirmCallable.java       |   83 -
 .../org/apache/ignite/schema/ui/Controls.java   |  697 ------
 .../org/apache/ignite/schema/ui/GridPaneEx.java |  180 --
 .../org/apache/ignite/schema/ui/MessageBox.java |  274 ---
 .../apache/ignite/schema/ui/ModalDialog.java    |   50 -
 .../ignite/schema/ui/SchemaImportApp.java       | 2115 ------------------
 .../ignite/schema/ui/TextColumnValidator.java   |   32 -
 .../schema/test/AbstractSchemaImportTest.java   |  181 --
 .../test/generator/CodeGeneratorTest.java       |   81 -
 .../schema/test/generator/XmlGeneratorTest.java |   42 -
 .../ignite/schema/test/model/CacheConfig.txt    |  409 ----
 .../apache/ignite/schema/test/model/Objects.txt |  531 -----
 .../ignite/schema/test/model/ObjectsKey.txt     |   96 -
 .../ignite/schema/test/model/Primitives.txt     |  535 -----
 .../ignite/schema/test/model/PrimitivesKey.txt  |   96 -
 .../org/apache/ignite/schema/test/model/Tst.txt |  535 -----
 .../apache/ignite/schema/test/model/TstKey.txt  |   96 -
 .../schema/test/model/ignite-type-metadata.xml  |  666 ------
 .../test/parser/DbMetadataParserTest.java       |  134 --
 .../testsuites/IgniteSchemaImportTestSuite.java |   42 -
 .../ignite/internal/GridFactorySelfTest.java    |    3 +
 modules/web-console/web-agent/pom.xml           |   12 -
 .../ignite/console/agent/db/DbColumn.java       |   88 +
 .../console/agent/db/DbMetadataReader.java      |  142 ++
 .../apache/ignite/console/agent/db/DbTable.java |   82 +
 .../agent/db/dialect/DB2MetadataDialect.java    |   33 +
 .../db/dialect/DatabaseMetadataDialect.java     |  102 +
 .../agent/db/dialect/JdbcMetadataDialect.java   |  199 ++
 .../agent/db/dialect/MySQLMetadataDialect.java  |   82 +
 .../agent/db/dialect/OracleMetadataDialect.java |  359 +++
 .../agent/handlers/DatabaseListener.java        |   20 +-
 .../dml/IgniteSqlDeleteFilteredBenchmark.java   |    5 +-
 .../dml/IgniteSqlUpdateFilteredBenchmark.java   |    5 +-
 pom.xml                                         |  121 -
 158 files changed, 1879 insertions(+), 13246 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/assembly/dependencies-fabric.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/clients/src/test/java/org/apache/ignite/internal/processors/rest/JettyRestProcessorAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/configuration/IgniteConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/managers/eventstorage/GridEventStorageManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicAbstractUpdateFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicSingleUpdateFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridNearAtomicUpdateFuture.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 46a9899,f1ef625..9c67b56
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@@ -79,6 -67,11 +79,9 @@@ import org.apache.ignite.spi.discovery.
  import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
  import org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder;
  import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
+ import org.apache.ignite.spi.eventstorage.EventStorageSpi;
+ import org.apache.ignite.spi.eventstorage.NoopEventStorageSpi;
+ import org.apache.ignite.spi.eventstorage.memory.MemoryEventStorageSpi;
 -import org.apache.ignite.spi.swapspace.SwapSpaceSpi;
 -import org.apache.ignite.spi.swapspace.file.FileSwapSpaceSpi;
  import org.apache.ignite.transactions.TransactionConcurrency;
  import org.apache.ignite.transactions.TransactionIsolation;
  
@@@ -598,6 -654,39 +601,18 @@@ public class PlatformConfigurationUtil
              cfg.setTransactionConfiguration(tx);
          }
  
 -        byte swapType = in.readByte();
 -
 -        switch (swapType) {
 -            case SWAP_TYP_FILE: {
 -                FileSwapSpaceSpi swap = new FileSwapSpaceSpi();
 -
 -                swap.setBaseDirectory(in.readString());
 -                swap.setMaximumSparsity(in.readFloat());
 -                swap.setMaxWriteQueueSize(in.readInt());
 -                swap.setReadStripesNumber(in.readInt());
 -                swap.setWriteBufferSize(in.readInt());
 -
 -                cfg.setSwapSpaceSpi(swap);
 -
 -                break;
 -            }
 -
 -            default:
 -                assert swapType == SWAP_TYP_NONE;
 -        }
 -
+         switch (in.readByte()) {
+             case 1:
+                 cfg.setEventStorageSpi(new NoopEventStorageSpi());
+                 break;
+ 
+             case 2:
+                 cfg.setEventStorageSpi(new MemoryEventStorageSpi()
+                         .setExpireCount(in.readLong())
+                         .setExpireAgeMs(in.readLong()));
+                 break;
+         }
+ 
          readPluginConfiguration(cfg, in);
      }
  
@@@ -1001,6 -1113,36 +1016,19 @@@
          else
              w.writeBoolean(false);
  
 -        SwapSpaceSpi swap = cfg.getSwapSpaceSpi();
 -
 -        if (swap instanceof FileSwapSpaceSpi) {
 -            w.writeByte(SWAP_TYP_FILE);
 -
 -            FileSwapSpaceSpi fileSwap = (FileSwapSpaceSpi)swap;
 -
 -            w.writeString(fileSwap.getBaseDirectory());
 -            w.writeFloat(fileSwap.getMaximumSparsity());
 -            w.writeInt(fileSwap.getMaxWriteQueueSize());
 -            w.writeInt(fileSwap.getReadStripesNumber());
 -            w.writeInt(fileSwap.getWriteBufferSize());
 -        }
 -        else {
 -            w.writeByte(SWAP_TYP_NONE);
 -        }
 -
+         EventStorageSpi eventStorageSpi = cfg.getEventStorageSpi();
+ 
+         if (eventStorageSpi == null) {
+             w.writeByte((byte) 0);
+         } else if (eventStorageSpi instanceof NoopEventStorageSpi) {
+             w.writeByte((byte) 1);
+         } else if (eventStorageSpi instanceof MemoryEventStorageSpi) {
+             w.writeByte((byte) 2);
+ 
+             w.writeLong(((MemoryEventStorageSpi)eventStorageSpi).getExpireCount());
+             w.writeLong(((MemoryEventStorageSpi)eventStorageSpi).getExpireAgeMs());
+         }
+ 
          w.writeString(cfg.getIgniteHome());
  
          w.writeLong(ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getInit());

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorIgfsConfiguration.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractBaseSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsCachePerBlockLruEvictionPolicySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsProcessorSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteComputeGridTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/EventsTest.cs
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
index 58fda7c,1d39e69..89e0d3d
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationSerializerTest.cs
@@@ -769,7 -794,20 +775,12 @@@ namespace Apache.Ignite.Core.Test
                  SpringConfigUrl = "test",
                  Logger = new IgniteNLogLogger(),
                  FailureDetectionTimeout = TimeSpan.FromMinutes(2),
-                 PluginConfigurations = new[] {new TestIgnitePluginConfiguration() }
 -                SwapSpaceSpi = new FileSwapSpaceSpi
 -                {
 -                    MaximumSparsity = 0.1f,
 -                    MaximumWriteQueueSize = 55,
 -                    WriteBufferSize = 66,
 -                    ReadStripesNumber = 77,
 -                    BaseDirectory = "test"
 -                },
+                 PluginConfigurations = new[] {new TestIgnitePluginConfiguration() },
+                 EventStorageSpi = new MemoryEventStorageSpi
+                 {
+                     ExpirationTimeout = TimeSpan.FromMilliseconds(12345),
+                     MaxEventCount = 257
+                 }
              };
          }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
index 8358f69,f9f8a61..f642976
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/IgniteConfigurationTest.cs
@@@ -80,6 -82,8 +80,7 @@@ namespace Apache.Ignite.Core.Test
              CheckDefaultValueAttributes(new LruEvictionPolicy());
              CheckDefaultValueAttributes(new AtomicConfiguration());
              CheckDefaultValueAttributes(new TransactionConfiguration());
 -            CheckDefaultValueAttributes(new FileSwapSpaceSpi());
+             CheckDefaultValueAttributes(new MemoryEventStorageSpi());
          }
  
          /// <summary>
@@@ -182,8 -194,18 +183,15 @@@
                  Assert.AreEqual("affKey", typ.AffinityKeyFieldName);
                  Assert.AreEqual(false, typ.KeepDeserialized);
  
 -                CollectionAssert.AreEqual(new[] {"fld1", "fld2"},
 -                    ((BinaryFieldEqualityComparer)typ.EqualityComparer).FieldNames);
 -
                  Assert.IsNotNull(resCfg.PluginConfigurations);
                  Assert.AreEqual(cfg.PluginConfigurations, resCfg.PluginConfigurations);
+ 
+                 var eventCfg = cfg.EventStorageSpi as MemoryEventStorageSpi;
+                 var resEventCfg = resCfg.EventStorageSpi as MemoryEventStorageSpi;
+                 Assert.IsNotNull(eventCfg);
+                 Assert.IsNotNull(resEventCfg);
+                 Assert.AreEqual(eventCfg.ExpirationTimeout, resEventCfg.ExpirationTimeout);
+                 Assert.AreEqual(eventCfg.MaxEventCount, resEventCfg.MaxEventCount);
              }
          }
  

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index 1a758ce,6553f1a..b52f968
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@@ -91,7 -91,12 +91,11 @@@
      <Reference Include="System.Xml" />
    </ItemGroup>
    <ItemGroup>
 -    <Compile Include="Binary\BinaryArrayEqualityComparer.cs" />
      <Compile Include="Common\ExceptionFactory.cs" />
+     <Compile Include="Events\IEventStorageSpi.cs" />
+     <Compile Include="Events\MemoryEventStorageSpi.cs" />
+     <Compile Include="Events\NoopEventStorageSpi.cs" />
+     <Compile Include="Impl\Binary\BinaryFieldEqualityComparer.cs" />
      <Compile Include="Binary\BinaryReflectiveSerializer.cs" />
      <Compile Include="Common\JavaException.cs" />
      <Compile Include="DataStructures\Configuration\Package-Info.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
index a3f5daf,20e2be8..c40fc6e
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfiguration.cs
@@@ -319,7 -346,36 +320,33 @@@ namespace Apache.Ignite.Cor
              else
                  writer.WriteBoolean(false);
  
-             // Plugins
 -            // Swap space
 -            SwapSpaceSerializer.Write(writer, SwapSpaceSpi);
 -
+             // Event storage
+             if (EventStorageSpi == null)
+             {
+                 writer.WriteByte(0);
+             }
+             else if (EventStorageSpi is NoopEventStorageSpi)
+             {
+                 writer.WriteByte(1);
+             }
+             else
+             {
+                 var memEventStorage = EventStorageSpi as MemoryEventStorageSpi;
+ 
+                 if (memEventStorage == null)
+                 {
+                     throw new IgniteException(string.Format(
+                         "Unsupported IgniteConfiguration.EventStorageSpi: '{0}'. " +
+                         "Supported implementations: '{1}', '{2}'.",
+                         EventStorageSpi.GetType(), typeof(NoopEventStorageSpi), typeof(MemoryEventStorageSpi)));
+                 }
+ 
+                 writer.WriteByte(2);
+ 
+                 memEventStorage.Write(writer);
+             }
+ 
+             // Plugins (should be last)
              if (PluginConfigurations != null)
              {
                  var pos = writer.Stream.Position;
@@@ -433,6 -508,20 +460,17 @@@
                      PessimisticTransactionLogLinger = TimeSpan.FromMilliseconds(r.ReadInt())
                  };
              }
+ 
 -            // Swap
 -            SwapSpaceSpi = SwapSpaceSerializer.Read(r);
 -
+             // Event storage
+             switch (r.ReadByte())
+             {
+                 case 1: EventStorageSpi = new NoopEventStorageSpi();
+                     break;
+ 
+                 case 2:
+                     EventStorageSpi = MemoryEventStorageSpi.Read(r);
+                     break;
+             }
          }
  
          /// <summary>
@@@ -867,5 -961,13 +905,13 @@@
          /// </summary>
          [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
          public ICollection<IPluginConfiguration> PluginConfigurations { get; set; }
+ 
+         /// <summary>
+         /// Gets or sets the event storage interface.
+         /// <para />
 -        /// Only predefined implementations are supported: 
++        /// Only predefined implementations are supported:
+         /// <see cref="NoopEventStorageSpi"/>, <see cref="MemoryEventStorageSpi"/>.
+         /// </summary>
+         public IEventStorageSpi EventStorageSpi { get; set; }
      }
  }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
----------------------------------------------------------------------
diff --cc modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
index f041a8f,3691aa0..569925f
--- a/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/IgniteConfigurationSection.xsd
@@@ -1139,6 -1171,65 +1139,28 @@@
                          </xs:attribute>
                      </xs:complexType>
                  </xs:element>
 -                <xs:element name="swapSpaceSpi" minOccurs="0">
 -                    <xs:annotation>
 -                        <xs:documentation>Swap space SPI.</xs:documentation>
 -                    </xs:annotation>
 -                    <xs:complexType>
 -                        <xs:attribute name="type" type="xs:string" use="required">
 -                            <xs:annotation>
 -                                <xs:documentation>Assembly-qualified type name.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                        <xs:attribute name="baseDirectory" type="xs:string">
 -                            <xs:annotation>
 -                                <xs:documentation>Base directory.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                        <xs:attribute name="maximumSparsity" type="xs:decimal">
 -                            <xs:annotation>
 -                                <xs:documentation>Maximum sparsity. This property defines maximum acceptable wasted file space to whole file size ratio. When this ratio becomes higher than specified number compacting thread starts working.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                        <xs:attribute name="maximumWriteQueueSize" type="xs:int">
 -                            <xs:annotation>
 -                                <xs:documentation>Maximum size of the write queue in bytes. If there are more values are waiting to be written to disk then specified size, SPI will block on write operation.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                        <xs:attribute name="readStripesNumber" type="xs:int">
 -                            <xs:annotation>
 -                                <xs:documentation>Read stripes number. Defines number of file channels to be used concurrently. Defaults to Environment.ProcessorCount.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                        <xs:attribute name="writeBufferSize" type="xs:int">
 -                            <xs:annotation>
 -                                <xs:documentation>Size of the write buffer, in bytes. Write to disk occurs only when this buffer is full.</xs:documentation>
 -                            </xs:annotation>
 -                        </xs:attribute>
 -                    </xs:complexType>
 -                </xs:element>
+                 <xs:element name="eventStorageSpi" minOccurs="0">
+                     <xs:annotation>
+                         <xs:documentation>Event storage space SPI.</xs:documentation>
+                     </xs:annotation>
+                     <xs:complexType>
+                         <xs:attribute name="type" type="xs:string" use="required">
+                             <xs:annotation>
+                                 <xs:documentation>Assembly-qualified type name.</xs:documentation>
+                             </xs:annotation>
+                         </xs:attribute>
+                         <xs:attribute name="expirationTimeout" type="xs:string">
+                             <xs:annotation>
+                                 <xs:documentation>Expiration timeout for stored events. Negative for unlimited.</xs:documentation>
+                             </xs:annotation>
+                         </xs:attribute>
+                         <xs:attribute name="maxEventCount" type="xs:long">
+                             <xs:annotation>
+                                 <xs:documentation>Maximum event count to store.</xs:documentation>
+                             </xs:annotation>
+                         </xs:attribute>
+                     </xs:complexType>
+                 </xs:element>
                  <xs:element name="pluginConfigurations" minOccurs="0">
                      <xs:annotation>
                          <xs:documentation>Plugin configurations.</xs:documentation>

http://git-wip-us.apache.org/repos/asf/ignite/blob/2210635a/pom.xml
----------------------------------------------------------------------


[37/57] [abbrv] ignite git commit: Fix .NET merge

Posted by ag...@apache.org.
Fix .NET merge


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

Branch: refs/heads/ignite-3477-debug
Commit: 8122099f01f7d0d1e5f4418e0d15d9cdff74972c
Parents: 2210635
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Tue Apr 11 13:07:00 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Tue Apr 11 13:07:00 2017 +0300

----------------------------------------------------------------------
 .../platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj   | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8122099f/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
index b52f968..a383ef2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Apache.Ignite.Core.csproj
@@ -95,7 +95,6 @@
     <Compile Include="Events\IEventStorageSpi.cs" />
     <Compile Include="Events\MemoryEventStorageSpi.cs" />
     <Compile Include="Events\NoopEventStorageSpi.cs" />
-    <Compile Include="Impl\Binary\BinaryFieldEqualityComparer.cs" />
     <Compile Include="Binary\BinaryReflectiveSerializer.cs" />
     <Compile Include="Common\JavaException.cs" />
     <Compile Include="DataStructures\Configuration\Package-Info.cs" />


[15/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
index 2564787..b81be12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java
@@ -342,11 +342,8 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         String msg = "Disable eviction policy (remove from configuration)";
 
-        if (cfg.getEvictionPolicy() != null) {
+        if (cfg.getEvictionPolicy() != null)
             perf.add(msg, false);
-
-            perf.add("Disable synchronized evictions (set 'evictSynchronized' to false)", !cfg.isEvictSynchronized());
-        }
         else
             perf.add(msg, true);
 
@@ -514,6 +511,10 @@ public class GridCacheProcessor extends GridProcessorAdapter {
         if (cc.getAtomicityMode() == ATOMIC)
             assertParameter(cc.getTransactionManagerLookupClassName() == null,
                 "transaction manager can not be used with ATOMIC cache");
+
+        if (cc.getEvictionPolicy() != null && !cc.isOnheapCacheEnabled())
+            throw new IgniteCheckedException("Onheap cache must be enabled if eviction policy is configured [cacheName="
+                + U.maskName(cc.getName()) + "]");
     }
 
     /**
@@ -1476,7 +1477,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
 
         GridCacheAffinityManager affMgr = new GridCacheAffinityManager();
         GridCacheEventManager evtMgr = new GridCacheEventManager();
-        CacheEvictionManager evictMgr = nearEnabled ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
+        CacheEvictionManager evictMgr = (nearEnabled || cfg.isOnheapCacheEnabled()) ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
         GridCacheQueryManager qryMgr = queryManager(cfg);
         CacheContinuousQueryManager contQryMgr = new CacheContinuousQueryManager();
         CacheDataStructuresManager dataStructuresMgr = new CacheDataStructuresManager();
@@ -1623,7 +1624,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
              * 7. GridCacheTtlManager.
              * ===============================================
              */
-            evictMgr = new CacheOffheapEvictionManager();
+            evictMgr = cfg.isOnheapCacheEnabled() ? new GridCacheEvictionManager() : new CacheOffheapEvictionManager();
             evtMgr = new GridCacheEventManager();
             pluginMgr = new CachePluginManager(ctx, cfg);
             drMgr = pluginMgr.createComponent(GridCacheDrManager.class);
@@ -3332,15 +3333,7 @@ public class GridCacheProcessor extends GridProcessorAdapter {
                 "Write behind flush thread count", locAttr.writeBehindFlushThreadCount(),
                 rmtAttr.writeBehindFlushThreadCount(), false);
 
-            CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "evictMaxOverflowRatio",
-                "Eviction max overflow ratio", locAttr.evictMaxOverflowRatio(),
-                rmtAttr.evictMaxOverflowRatio(), true);
-
             if (locAttr.cacheMode() == PARTITIONED) {
-                CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "evictSynchronized",
-                    "Eviction synchronized", locAttr.evictSynchronized(), rmtAttr.evictSynchronized(),
-                    true);
-
                 CU.checkAttributeMismatch(log, rmtAttr.cacheName(), rmt, "nearEvictionPolicy",
                     "Near eviction policy", locAttr.nearEvictionPolicyClassName(),
                     rmtAttr.nearEvictionPolicyClassName(), false);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
index 823988c..457c895 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheUtils.java
@@ -920,14 +920,6 @@ public class GridCacheUtils {
     public static void unwindEvicts(GridCacheContext ctx) {
         assert ctx != null;
 
-        ctx.evicts().unwind();
-
-        if (ctx.isNear()) {
-            GridCacheContext dhtCtx = ctx.near().dht().context();
-
-            dhtCtx.evicts().unwind();
-        }
-
         ctx.ttl().expire();
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
index d49b016..db3533d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridNoStorageCacheMap.java
@@ -22,6 +22,7 @@ import java.util.Collections;
 import java.util.Set;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
+import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartitionException;
 import org.jetbrains.annotations.Nullable;
 
 /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index 9b10d71..ae42784 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -250,7 +250,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
             for (GridDhtLocalPartition locPart : cctx.topology().currentLocalPartitions()) {
                 if (primary) {
                     if (cctx.affinity().primaryByPartition(locNode, locPart.id(), topVer)) {
-                        cnt += locPart.size();
+                        cnt += locPart.dataStore().size();
 
                         continue;
                     }
@@ -258,7 +258,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
 
                 if (backup) {
                     if (cctx.affinity().backupByPartition(locNode, locPart.id(), topVer))
-                        cnt += locPart.size();
+                        cnt += locPart.dataStore().size();
                 }
             }
 
@@ -276,7 +276,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
         else {
             GridDhtLocalPartition locPart = cctx.topology().localPartition(part, AffinityTopologyVersion.NONE, false);
 
-            return locPart == null ? 0 : locPart.size();
+            return locPart == null ? 0 : locPart.dataStore().size();
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
index 942462a..096ca9f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedCacheAdapter.java
@@ -280,6 +280,12 @@ public abstract class GridDistributedCacheAdapter<K, V> extends GridCacheAdapter
 
             if (modes.offheap)
                 size += offheap.entriesCount(modes.primary, modes.backup, topVer);
+            else if (modes.heap) {
+                for (GridDhtLocalPartition locPart : ctx.topology().currentLocalPartitions()) {
+                    if ((modes.primary && locPart.primary(topVer)) || (modes.backup && locPart.backup(topVer)))
+                        size += locPart.publicSize();
+                }
+            }
         }
 
         return size;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index ac6eee3..7e6ae81 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -398,16 +398,6 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
      *
      * @throws GridDhtInvalidPartitionException If partition for the key is no longer valid.
      */
-    @Override public GridCacheEntryEx entryEx(KeyCacheObject key, boolean touch)
-        throws GridDhtInvalidPartitionException {
-        return super.entryEx(key, touch);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * @throws GridDhtInvalidPartitionException If partition for the key is no longer valid.
-     */
     @Override public GridCacheEntryEx entryEx(KeyCacheObject key,
         AffinityTopologyVersion topVer) throws GridDhtInvalidPartitionException {
         return super.entryEx(key, topVer);
@@ -543,7 +533,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
                     CacheObject cacheVal = ctx.toCacheObject(val);
 
-                    entry = entryEx(key, false);
+                    entry = entryEx(key);
 
                     entry.initialValue(cacheVal,
                         ver,
@@ -579,6 +569,21 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
     }
 
     /** {@inheritDoc} */
+    @Override public int size() {
+        return (int)sizeLong();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long sizeLong() {
+        long sum = 0;
+
+        for (GridDhtLocalPartition p : topology().currentLocalPartitions())
+            sum += p.dataStore().size();
+
+        return sum;
+    }
+
+    /** {@inheritDoc} */
     @Override public int primarySize() {
         return (int)primarySizeLong();
     }
@@ -591,7 +596,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
 
         for (GridDhtLocalPartition p : topology().currentLocalPartitions()) {
             if (p.primary(topVer))
-                sum += p.publicSize();
+                sum += p.dataStore().size();
         }
 
         return sum;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index e2c05cc..46b2bf8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -78,7 +78,7 @@ import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDh
 /**
  * Key partition.
  */
-public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>, GridReservable, GridCacheConcurrentMap {
+public class GridDhtLocalPartition extends GridCacheConcurrentMapImpl implements Comparable<GridDhtLocalPartition>, GridReservable {
     /** Maximum size for delete queue. */
     public static final int MAX_DELETE_QUEUE_SIZE = Integer.getInteger(IGNITE_ATOMIC_CACHE_DELETE_HISTORY_SIZE, 200_000);
 
@@ -109,9 +109,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
     @GridToStringExclude
     private final GridFutureAdapter<?> rent;
 
-    /** Entries map. */
-    private final GridCacheConcurrentMap map;
-
     /** Context. */
     private final GridCacheContext cctx;
 
@@ -151,7 +148,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
      */
     @SuppressWarnings("ExternalizableWithoutPublicNoArgConstructor")
     GridDhtLocalPartition(GridCacheContext cctx, int id, GridCacheMapEntryFactory entryFactory) {
-        assert cctx != null;
+        super(cctx, entryFactory, cctx.config().getStartSize() / cctx.affinity().partitions());
 
         this.id = id;
         this.cctx = cctx;
@@ -160,12 +157,10 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
 
         rent = new GridFutureAdapter<Object>() {
             @Override public String toString() {
-                return "PartitionRentFuture [part=" + GridDhtLocalPartition.this + ", map=" + map + ']';
+                return "PartitionRentFuture [part=" + GridDhtLocalPartition.this + ']';
             }
         };
 
-        map = new GridCacheConcurrentMapImpl(cctx, entryFactory, cctx.config().getStartSize() / cctx.affinity().partitions());
-
         int delQueueSize = CU.isSystemCache(cctx.name()) ? 100 :
             Math.max(MAX_DELETE_QUEUE_SIZE / cctx.affinity().partitions(), 20);
 
@@ -240,20 +235,13 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
     }
 
     /**
-     * @return Keys belonging to partition.
-     */
-    public Set<KeyCacheObject> keySet() {
-        return map.keySet();
-    }
-
-    /**
      * @return {@code True} if partition is empty.
      */
     public boolean isEmpty() {
         if (cctx.allowFastEviction())
-            return map.size() == 0;
+            return size() == 0;
 
-        return size() == 0 && map.size() == 0;
+        return store.size() == 0 && size() == 0;
     }
 
     /**
@@ -294,26 +282,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
         }
     }
 
-    /** {@inheritDoc} */
-    @Override public int size() {
-        return (int)store.size();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int publicSize() {
-        return (int)store.size();
-    }
-
-    /** {@inheritDoc} */
-    @Override public void incrementPublicSize(GridCacheEntryEx e) {
-        map.incrementPublicSize(e);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void decrementPublicSize(GridCacheEntryEx e) {
-        map.decrementPublicSize(e);
-    }
-
     /**
      * @return If partition is moving or owning or renting.
      */
@@ -323,52 +291,6 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
         return state == MOVING || state == OWNING || state == RENTING;
     }
 
-    /** {@inheritDoc} */
-    @Override @Nullable public GridCacheMapEntry getEntry(KeyCacheObject key) {
-        return map.getEntry(key);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean removeEntry(GridCacheEntryEx entry) {
-        return map.removeEntry(entry);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Iterable<GridCacheMapEntry> entries(
-        CacheEntryPredicate... filter) {
-        return map.entries(filter);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Iterable<GridCacheMapEntry> allEntries(CacheEntryPredicate... filter) {
-        return map.allEntries(filter);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Set<GridCacheMapEntry> entrySet(CacheEntryPredicate... filter) {
-        return map.entrySet(filter);
-    }
-
-    /** {@inheritDoc} */
-    @Override @Nullable public GridCacheMapEntry randomEntry() {
-        return map.randomEntry();
-    }
-
-    /** {@inheritDoc} */
-    @Override public GridCacheMapEntry putEntryIfObsoleteOrAbsent(
-        AffinityTopologyVersion topVer,
-        KeyCacheObject key,
-        @Nullable CacheObject val,
-        boolean create,
-        boolean touch) {
-        return map.putEntryIfObsoleteOrAbsent(topVer, key, val, create, touch);
-    }
-
-    /** {@inheritDoc} */
-    @Override public Set<KeyCacheObject> keySet(CacheEntryPredicate... filter) {
-        return map.keySet(filter);
-    }
-
     /**
      * @param entry Entry to remove.
      */
@@ -376,7 +298,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
         assert entry.obsolete() : entry;
 
         // Make sure to remove exactly this entry.
-        map.removeEntry(entry);
+        removeEntry(entry);
 
         // Attempt to evict.
         try {
@@ -895,20 +817,20 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
 
         boolean rec = cctx.events().isRecordable(EVT_CACHE_REBALANCE_OBJECT_UNLOADED);
 
-        Iterator<GridDhtCacheEntry> it = (Iterator)map.allEntries().iterator();
+        Iterator<GridCacheMapEntry> it = allEntries().iterator();
 
         GridCacheObsoleteEntryExtras extras = new GridCacheObsoleteEntryExtras(clearVer);
 
         while (it.hasNext()) {
-            GridDhtCacheEntry cached = null;
+            GridCacheMapEntry cached = null;
 
             cctx.shared().database().checkpointReadLock();
 
             try {
                 cached = it.next();
 
-                if (cached.clearInternal(clearVer, extras)) {
-                    map.removeEntry(cached);
+                if (cached instanceof GridDhtCacheEntry && ((GridDhtCacheEntry)cached).clearInternal(clearVer, extras)) {
+                    removeEntry(cached);
 
                     if (!cached.isInternal()) {
                         if (rec) {
@@ -961,9 +883,10 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>,
                     try {
                         CacheDataRow row = it0.next();
 
-                        GridDhtCacheEntry cached = (GridDhtCacheEntry)cctx.cache().entryEx(row.key());
+                        GridCacheMapEntry cached = putEntryIfObsoleteOrAbsent(cctx.affinity().affinityTopologyVersion(),
+                            row.key(), null, true, false);
 
-                        if (cached.clearInternal(clearVer, extras)) {
+                        if (cached instanceof GridDhtCacheEntry && ((GridDhtCacheEntry)cached).clearInternal(clearVer, extras)) {
                             if (rec) {
                                 cctx.events().addEvent(cached.partition(),
                                     cached.key(),

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index bf2ab29..38cbb8c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@ -1960,7 +1960,7 @@ class GridDhtPartitionTopologyImpl implements GridDhtPartitionTopology {
                 if (part == null)
                     continue;
 
-                int size = part.size();
+                int size = part.dataStore().size();
 
                 if (size >= threshold)
                     X.println(">>>   Local partition [part=" + part.id() + ", size=" + size + ']');

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
index 872afee..7c1c38b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearCacheAdapter.java
@@ -134,24 +134,6 @@ public abstract class GridNearCacheAdapter<K, V> extends GridDistributedCacheAda
         return dht().preloader();
     }
 
-    /** {@inheritDoc} */
-    @Override public GridCacheMapEntry entryEx(KeyCacheObject key, boolean touch) {
-        GridNearCacheEntry entry = null;
-
-        while (true) {
-            try {
-                entry = (GridNearCacheEntry)super.entryEx(key, touch);
-
-                entry.initializeFromDht(ctx.affinity().affinityTopologyVersion());
-
-                return entry;
-            }
-            catch (GridCacheEntryRemovedException ignore) {
-                if (log.isDebugEnabled())
-                    log.debug("Got removed near entry while initializing from DHT entry (will retry): " + entry);
-            }
-        }
-    }
 
     /** {@inheritDoc} */
     @Override public GridCacheMapEntry entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
index c29e01e..b72a7fb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/DataStructuresProcessor.java
@@ -973,7 +973,6 @@ public final class DataStructuresProcessor extends GridProcessorAdapter implemen
         ccfg.setBackups(cfg.getBackups());
         ccfg.setCacheMode(cfg.getCacheMode());
         ccfg.setAtomicityMode(cfg.getAtomicityMode());
-        ccfg.setOffHeapMaxMemory(cfg.getOffHeapMaxMemory());
         ccfg.setNodeFilter(cfg.getNodeFilter());
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index 1753cfd..d7395df 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -144,19 +144,13 @@ public class PlatformConfigurationUtils {
         ccfg.setCacheMode(CacheMode.fromOrdinal(in.readInt()));
         ccfg.setCopyOnRead(in.readBoolean());
         ccfg.setEagerTtl(in.readBoolean());
-        ccfg.setEvictSynchronized(in.readBoolean());
-        ccfg.setEvictSynchronizedConcurrencyLevel(in.readInt());
-        ccfg.setEvictSynchronizedKeyBufferSize(in.readInt());
-        ccfg.setEvictSynchronizedTimeout(in.readLong());
         ccfg.setInvalidate(in.readBoolean());
         ccfg.setStoreKeepBinary(in.readBoolean());
         ccfg.setLoadPreviousValue(in.readBoolean());
         ccfg.setDefaultLockTimeout(in.readLong());
         ccfg.setLongQueryWarningTimeout(in.readLong());
         ccfg.setMaxConcurrentAsyncOperations(in.readInt());
-        ccfg.setEvictMaxOverflowRatio(in.readFloat());
         ccfg.setName(in.readString());
-        ccfg.setOffHeapMaxMemory(in.readLong());
         ccfg.setReadFromBackup(in.readBoolean());
         ccfg.setRebalanceBatchSize(in.readInt());
         ccfg.setRebalanceDelay(in.readLong());
@@ -164,7 +158,6 @@ public class PlatformConfigurationUtils {
         ccfg.setRebalanceThrottle(in.readLong());
         ccfg.setRebalanceTimeout(in.readLong());
         ccfg.setSqlEscapeAll(in.readBoolean());
-        ccfg.setSqlOnheapRowCacheSize(in.readInt());
         ccfg.setStartSize(in.readInt());
         ccfg.setWriteBehindBatchSize(in.readInt());
         ccfg.setWriteBehindEnabled(in.readBoolean());
@@ -197,6 +190,9 @@ public class PlatformConfigurationUtils {
             ccfg.setNearConfiguration(readNearConfiguration(in));
 
         ccfg.setEvictionPolicy(readEvictionPolicy(in));
+        if (ccfg.getEvictionPolicy() != null)
+            ccfg.setOnheapCacheEnabled(true);
+
         ccfg.setAffinity(readAffinityFunction(in));
         ccfg.setExpiryPolicyFactory(readExpiryPolicyFactory(in));
 
@@ -755,19 +751,13 @@ public class PlatformConfigurationUtils {
         writeEnumInt(writer, ccfg.getCacheMode(), CacheConfiguration.DFLT_CACHE_MODE);
         writer.writeBoolean(ccfg.isCopyOnRead());
         writer.writeBoolean(ccfg.isEagerTtl());
-        writer.writeBoolean(ccfg.isEvictSynchronized());
-        writer.writeInt(ccfg.getEvictSynchronizedConcurrencyLevel());
-        writer.writeInt(ccfg.getEvictSynchronizedKeyBufferSize());
-        writer.writeLong(ccfg.getEvictSynchronizedTimeout());
         writer.writeBoolean(ccfg.isInvalidate());
         writer.writeBoolean(ccfg.isStoreKeepBinary());
         writer.writeBoolean(ccfg.isLoadPreviousValue());
         writer.writeLong(ccfg.getDefaultLockTimeout());
         writer.writeLong(ccfg.getLongQueryWarningTimeout());
         writer.writeInt(ccfg.getMaxConcurrentAsyncOperations());
-        writer.writeFloat(ccfg.getEvictMaxOverflowRatio());
         writer.writeString(ccfg.getName());
-        writer.writeLong(ccfg.getOffHeapMaxMemory());
         writer.writeBoolean(ccfg.isReadFromBackup());
         writer.writeInt(ccfg.getRebalanceBatchSize());
         writer.writeLong(ccfg.getRebalanceDelay());
@@ -775,7 +765,6 @@ public class PlatformConfigurationUtils {
         writer.writeLong(ccfg.getRebalanceThrottle());
         writer.writeLong(ccfg.getRebalanceTimeout());
         writer.writeBoolean(ccfg.isSqlEscapeAll());
-        writer.writeInt(ccfg.getSqlOnheapRowCacheSize());
         writer.writeInt(ccfg.getStartSize());
         writer.writeInt(ccfg.getWriteBehindBatchSize());
         writer.writeBoolean(ccfg.isWriteBehindEnabled());

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index 0f5cd46..e087881 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -127,7 +127,6 @@ public class VisorCacheConfiguration implements Serializable, LessNamingBean {
         writeSynchronizationMode = ccfg.getWriteSynchronizationMode();
         invalidate = ccfg.isInvalidate();
         startSize = ccfg.getStartSize();
-        offHeapMaxMemory = ccfg.getOffHeapMaxMemory();
         maxConcurrentAsyncOps = ccfg.getMaxConcurrentAsyncOperations();
         interceptor = compactClass(ccfg.getInterceptor());
         typeMeta = VisorCacheTypeMetadata.list(ccfg.getQueryEntities(), ccfg.getCacheStoreFactory());

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
index 05d5c38..b6f72c4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheEvictionConfiguration.java
@@ -43,21 +43,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
     /** Eviction filter to specify which entries should not be evicted. */
     private String filter;
 
-    /** Synchronous eviction concurrency level. */
-    private int syncConcurrencyLvl;
-
-    /** Synchronous eviction timeout. */
-    private long syncTimeout;
-
-    /** Synchronized key buffer size. */
-    private int syncKeyBufSize;
-
-    /** Synchronous evicts flag. */
-    private boolean evictSynchronized;
-
-    /** Eviction max overflow ratio. */
-    private float maxOverflowRatio;
-
     /**
      * @param ccfg Cache configuration.
      * @return Data transfer object for eviction configuration properties.
@@ -70,11 +55,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
         cfg.plc = compactClass(plc);
         cfg.plcMaxSize = evictionPolicyMaxSize(plc);
         cfg.filter = compactClass(ccfg.getEvictionFilter());
-        cfg.syncConcurrencyLvl = ccfg.getEvictSynchronizedConcurrencyLevel();
-        cfg.syncTimeout = ccfg.getEvictSynchronizedTimeout();
-        cfg.syncKeyBufSize = ccfg.getEvictSynchronizedKeyBufferSize();
-        cfg.evictSynchronized = ccfg.isEvictSynchronized();
-        cfg.maxOverflowRatio = ccfg.getEvictMaxOverflowRatio();
 
         return cfg;
     }
@@ -100,41 +80,6 @@ public class VisorCacheEvictionConfiguration implements Serializable, LessNaming
         return filter;
     }
 
-    /**
-     * @return synchronized eviction concurrency level.
-     */
-    public int synchronizedConcurrencyLevel() {
-        return syncConcurrencyLvl;
-    }
-
-    /**
-     * @return synchronized eviction timeout.
-     */
-    public long synchronizedTimeout() {
-        return syncTimeout;
-    }
-
-    /**
-     * @return Synchronized key buffer size.
-     */
-    public int synchronizedKeyBufferSize() {
-        return syncKeyBufSize;
-    }
-
-    /**
-     * @return Synchronous evicts flag.
-     */
-    public boolean evictSynchronized() {
-        return evictSynchronized;
-    }
-
-    /**
-     * @return Eviction max overflow ratio.
-     */
-    public float maxOverflowRatio() {
-        return maxOverflowRatio;
-    }
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorCacheEvictionConfiguration.class, this);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
index d753b76..a21cf43 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheQueryConfiguration.java
@@ -73,7 +73,6 @@ public class VisorCacheQueryConfiguration implements Serializable, LessNamingBea
         longQryWarnTimeout = ccfg.getLongQueryWarningTimeout();
         sqlEscapeAll = ccfg.isSqlEscapeAll();
         indexedTypes = compactClasses(ccfg.getIndexedTypes());
-        sqlOnheapRowCacheSize = ccfg.getSqlOnheapRowCacheSize();
         sqlSchema = ccfg.getSqlSchema();
 
         return this;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
index 80c0887..2cb36f9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
@@ -23,7 +23,6 @@ import java.util.concurrent.CountDownLatch;
 import org.apache.ignite.GridTestTask;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
 import org.apache.ignite.cluster.ClusterMetrics;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -62,11 +61,8 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
     /** Amount of cache entries. */
     private static final int MAX_VALS_AMOUNT = 400;
 
-    /** With OFFHEAP_VALUES policy. */
-    private final String OFF_HEAP_VALUE_NAME = "offHeapValuesCfg";
-
-    /** With ONHEAP_TIERED policy. */
-    private final String ON_HEAP_TIERED_NAME = "onHeapTieredCfg";
+    /** Cache name. */
+    private final String CACHE_NAME = "cache1";
 
     /** {@inheritDoc} */
     @Override protected void beforeTest() throws Exception {
@@ -91,25 +87,18 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
         cfg.setCacheConfiguration();
         cfg.setMetricsUpdateFrequency(0);
 
-        CacheConfiguration<Integer, Object> offHeapValuesCfg = defaultCacheConfiguration();
-        offHeapValuesCfg.setName(OFF_HEAP_VALUE_NAME);
-        offHeapValuesCfg.setStatisticsEnabled(true);
-        offHeapValuesCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_VALUES);
-        offHeapValuesCfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE);
-
-        CacheConfiguration<Integer, Object> onHeapTieredCfg = defaultCacheConfiguration();
-        onHeapTieredCfg.setName(ON_HEAP_TIERED_NAME);
-        onHeapTieredCfg.setStatisticsEnabled(true);
-        onHeapTieredCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
-        onHeapTieredCfg.setOffHeapMaxMemory(MAX_VALS_AMOUNT * VAL_SIZE);
+        CacheConfiguration<Integer, Object> ccfg = defaultCacheConfiguration();
+        ccfg.setName(CACHE_NAME);
+        ccfg.setStatisticsEnabled(true);
 
         FifoEvictionPolicy plc = new FifoEvictionPolicy();
         plc.setMaxMemorySize(MAX_VALS_AMOUNT * VAL_SIZE);
         plc.setMaxSize(0);
 
-        onHeapTieredCfg.setEvictionPolicy(plc);
+        ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
 
-        return cfg.setCacheConfiguration(offHeapValuesCfg, onHeapTieredCfg);
+        return cfg.setCacheConfiguration(ccfg);
     }
 
     /**
@@ -120,32 +109,25 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
 
         Ignite ignite = grid();
 
-        final IgniteCache onHeapCache = ignite.getOrCreateCache(ON_HEAP_TIERED_NAME);
-        final IgniteCache offHeapCache = ignite.getOrCreateCache(OFF_HEAP_VALUE_NAME);
+        final IgniteCache cache = ignite.getOrCreateCache(CACHE_NAME);
 
-        long prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize();
-        long prevValuesOffHeapSize = offHeapCache.metrics().getOffHeapAllocatedSize();
+        long prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize();
 
         assertEquals(0, prevTieredOffHeapSize);
-        assertEquals(0, prevValuesOffHeapSize);
 
         long prevClusterNonHeapMemoryUsed = ignite.cluster().metrics().getNonHeapMemoryUsed();
 
-        fillCache(onHeapCache);
+        fillCache(cache);
 
-        assertTrue(onHeapCache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5)
+        assertTrue(cache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5)
             * VAL_SIZE + prevTieredOffHeapSize);
-        assertEquals(0, offHeapCache.metrics().getOffHeapAllocatedSize());
 
         assertTrue(prevClusterNonHeapMemoryUsed < ignite.cluster().metrics().getNonHeapMemoryUsed());
 
         prevClusterNonHeapMemoryUsed = ignite.cluster().metrics().getNonHeapMemoryUsed();
-        prevTieredOffHeapSize = onHeapCache.metrics().getOffHeapAllocatedSize();
-
-        fillCache(offHeapCache);
+        prevTieredOffHeapSize = cache.metrics().getOffHeapAllocatedSize();
 
-        assertTrue(offHeapCache.metrics().getOffHeapAllocatedSize() > (MAX_VALS_AMOUNT - 5) * VAL_SIZE);
-        assertEquals(prevTieredOffHeapSize, onHeapCache.metrics().getOffHeapAllocatedSize());
+        assertEquals(prevTieredOffHeapSize, cache.metrics().getOffHeapAllocatedSize());
         assertTrue((MAX_VALS_AMOUNT - 5) * VAL_SIZE + prevClusterNonHeapMemoryUsed <
             ignite.cluster().metrics().getNonHeapMemoryUsed());
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
deleted file mode 100644
index 99133b8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/BinaryObjectOffHeapUnswapTemporaryTest.java
+++ /dev/null
@@ -1,365 +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.apache.ignite.internal.processors.cache;
-
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-import javax.cache.processor.EntryProcessorException;
-import javax.cache.processor.MutableEntry;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.binary.BinaryObject;
-import org.apache.ignite.binary.BinaryObjectBuilder;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheEntry;
-import org.apache.ignite.cache.CacheEntryProcessor;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.binary.BinaryObjectOffheapImpl;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-import org.apache.ignite.transactions.Transaction;
-import org.apache.ignite.transactions.TransactionConcurrency;
-import org.apache.ignite.transactions.TransactionIsolation;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-
-/**
- *
- */
-public class BinaryObjectOffHeapUnswapTemporaryTest extends GridCommonAbstractTest {
-    /** */
-    private static final int CNT = 20;
-
-    /** Cache name. */
-    private static final String CACHE_NAME = "cache";
-
-    /** */
-    @SuppressWarnings("serial")
-    private static final CacheEntryProcessor PROC = new CacheEntryProcessor() {
-        @Override public Object process(MutableEntry entry, Object... arguments) throws EntryProcessorException {
-            return entry.getValue();
-        }
-    };
-
-    /** */
-    private CacheAtomicityMode atomicityMode;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration c = super.getConfiguration(igniteInstanceName);
-
-        c.setMarshaller(new BinaryMarshaller());
-
-        return c;
-    }
-
-    /**
-     * @param atomicityMode Atomicity mode.
-     * @param memoryMode Memory mode.
-     * @return Cache configuration.
-     */
-    private CacheConfiguration<Object, Object> cacheConfiguration(CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
-        this.atomicityMode = atomicityMode;
-
-        CacheConfiguration<Object, Object>  cfg = new CacheConfiguration<>();
-
-        cfg.setName(CACHE_NAME);
-        cfg.setCacheMode(CacheMode.PARTITIONED);
-        cfg.setAtomicityMode(atomicityMode);
-        cfg.setMemoryMode(memoryMode);
-        cfg.setBackups(1);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        super.beforeTestsStarted();
-
-        startGridsMultiThreaded(3);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        super.afterTestsStopped();
-
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTiered() throws Exception {
-        ignite(0).getOrCreateCache(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED));
-
-        try {
-            doTest();
-        }
-        finally {
-            ignite(0).destroyCache(null);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValues() throws Exception {
-        ignite(0).getOrCreateCache(cacheConfiguration(TRANSACTIONAL, OFFHEAP_VALUES));
-
-        try {
-            doTest();
-        }
-        finally {
-            ignite(0).destroyCache(null);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTiered() throws Exception {
-        ignite(0).getOrCreateCache(cacheConfiguration(ATOMIC, OFFHEAP_TIERED));
-
-        try {
-            doTest();
-        }
-        finally {
-            ignite(0).destroyCache(null);
-        }
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValues() throws Exception {
-        ignite(0).getOrCreateCache(cacheConfiguration(ATOMIC, OFFHEAP_VALUES));
-
-        try {
-            doTest();
-        }
-        finally {
-            ignite(0).destroyCache(null);
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("serial")
-    private void doTest() {
-        final IgniteCache<Integer, BinaryObject> cache = jcache(0, CACHE_NAME).withKeepBinary();
-
-        for (int key = 0; key < CNT; key++)
-            jcache(0, CACHE_NAME).put(key, new TestObject(key));
-
-        for (int key = CNT; key < 2 * CNT; key++) {
-            BinaryObjectBuilder builder = ignite(0).binary().builder("SomeType");
-            builder.setField("field1", key);
-            builder.setField("field2", "name_" + key);
-
-            cache.put(key, builder.build());
-        }
-
-        Set<Integer> keys = new LinkedHashSet<>();
-
-        for (int i = 0; i < 2 * CNT; i++)
-            keys.add(i);
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.get(key) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.getEntry(key).getValue() instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.getAndPut(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.getAndReplace(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.getAndPutIfAbsent(key, cache.get(key)) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.localPeek(key) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.getAndRemove(key) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        check(new IgniteInClosure<Integer>() {
-            @Override public void apply(Integer key) {
-                assertFalse(cache.invoke(key, PROC) instanceof BinaryObjectOffheapImpl);
-            }
-        });
-
-        // GetAll.
-        Map<Integer, BinaryObject> res = cache.getAll(keys);
-
-        for (BinaryObject val : res.values())
-            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-        if (atomicityMode == TRANSACTIONAL) {
-            for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                    try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
-                        res = cache.getAll(keys);
-
-                        for (BinaryObject val : res.values())
-                            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-                        tx.commit();
-                    }
-                }
-            }
-        }
-
-        // GetAllOutTx.
-        res = cache.getAllOutTx(keys);
-
-        for (BinaryObject val : res.values())
-            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-        if (atomicityMode == TRANSACTIONAL) {
-            for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                    try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
-                        res = cache.getAllOutTx(keys);
-
-                        for (BinaryObject val : res.values())
-                            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-                        tx.commit();
-                    }
-                }
-            }
-        }
-
-        // InvokeAll.
-        res = cache.invokeAll(keys, PROC);
-
-        for (BinaryObject val : res.values())
-            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-        if (atomicityMode == TRANSACTIONAL) {
-            for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                    try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
-                        res = cache.invokeAll(keys, PROC);
-
-                        for (BinaryObject val : res.values())
-                            assertFalse(val instanceof BinaryObjectOffheapImpl);
-
-                        tx.commit();
-                    }
-                }
-            }
-        }
-
-        // GetEntries.
-        Collection<CacheEntry<Integer, BinaryObject>> entries = cache.getEntries(keys);
-
-        for (CacheEntry<Integer, BinaryObject> e : entries)
-            assertFalse(e.getValue() instanceof BinaryObjectOffheapImpl);
-
-        if (atomicityMode == TRANSACTIONAL) {
-            for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                    try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
-                        entries = cache.getEntries(keys);
-
-                        for (CacheEntry<Integer, BinaryObject> e : entries)
-                            assertFalse(e.getValue() instanceof BinaryObjectOffheapImpl);
-
-                        tx.commit();
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     *
-     */
-    private void check(IgniteInClosure<Integer> checkOp) {
-        for (int key = 0; key < 2 * CNT; key++) {
-            checkOp.apply(key);
-
-            if (atomicityMode == TRANSACTIONAL) {
-                for (TransactionIsolation isolation : TransactionIsolation.values()) {
-                    for (TransactionConcurrency concurrency : TransactionConcurrency.values()) {
-                        try (Transaction tx = ignite(0).transactions().txStart(concurrency, isolation)) {
-                            checkOp.apply(key);
-
-                            tx.commit();
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("PackageVisibleField")
-    private static class TestObject {
-        /** */
-        String field;
-
-        /** */
-        int field2;
-
-        /**
-         * @param key Key.
-         */
-        TestObject(int key) {
-            field = "str" + key;
-            field2 = key;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
index 5c85d01..df9fbd5 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheConfigurationLeakTest.java
@@ -70,6 +70,7 @@ public class CacheConfigurationLeakTest extends GridCommonAbstractTest {
                     CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
                     ccfg.setName("cache-" + idx + "-" + i);
                     ccfg.setEvictionPolicy(new LruEvictionPolicy(1000));
+                    ccfg.setOnheapCacheEnabled(true);
 
                     IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
index b764d5b..37d3f4d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDeferredDeleteQueueTest.java
@@ -116,7 +116,7 @@ public class CacheDeferredDeleteQueueTest extends GridCommonAbstractTest {
                         for (GridDhtLocalPartition p : top.currentLocalPartitions()) {
                             Collection<Object> rmvQueue = GridTestUtils.getFieldValue(p, "rmvQueue");
 
-                            if (!rmvQueue.isEmpty() || p.size() != 0)
+                            if (!rmvQueue.isEmpty() || p.dataStore().size() != 0)
                                 return false;
                         }
                     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
index 32c31d3..1da94d4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheDhtLocalPartitionAfterRemoveSelfTest.java
@@ -76,7 +76,7 @@ public class CacheDhtLocalPartitionAfterRemoveSelfTest extends GridCommonAbstrac
             cache = grid(g).cache(null);
 
             for (GridDhtLocalPartition p : dht(cache).topology().localPartitions()) {
-                int size = p.size();
+                int size = p.dataStore().size();
 
                 assertTrue("Unexpected size: " + size, size <= 32);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
index 5829724..2017365 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheEnumOperationsAbstractTest.java
@@ -22,7 +22,6 @@ import javax.cache.processor.MutableEntry;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -37,9 +36,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -95,25 +91,7 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
      * @throws Exception If failed.
      */
     public void testAtomic() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED);
-
-        enumOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_VALUES);
-
-        enumOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
 
         enumOperations(ccfg);
     }
@@ -122,25 +100,7 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
      * @throws Exception If failed.
      */
     public void testTx() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, ONHEAP_TIERED);
-
-        enumOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_VALUES);
-
-        enumOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC, OFFHEAP_TIERED);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED, 1, ATOMIC);
 
         enumOperations(ccfg);
     }
@@ -269,25 +229,19 @@ public abstract class CacheEnumOperationsAbstractTest extends GridCommonAbstract
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @return Cache configuration.
      */
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         int backups,
-        CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode) {
+        CacheAtomicityMode atomicityMode) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 
-        if (memoryMode == OFFHEAP_TIERED)
-            ccfg.setOffHeapMaxMemory(0);
-
         if (cacheMode == PARTITIONED)
             ccfg.setBackups(backups);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
index daec5a9..0ddac75 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheGetEntryAbstractTest.java
@@ -171,6 +171,8 @@ public abstract class CacheGetEntryAbstractTest extends GridCacheAbstractSelfTes
      * @throws Exception If failed.
      */
     public void testLocalTransactional() throws Exception {
+        // TODO: fails since d13520e9a05bd9e9b987529472d6317951b72f96, need to review changes.
+
         CacheConfiguration cfg = new CacheConfiguration();
 
         cfg.setWriteSynchronizationMode(FULL_SYNC);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
index 5ca0e29..5fe7d70 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterLocalSanityTest.java
@@ -33,7 +33,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheInterceptorAdapter;
 import org.apache.ignite.cache.CacheInterceptorEntry;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.store.CacheStore;
 import org.apache.ignite.cache.store.CacheStoreAdapter;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -53,7 +52,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.transactions.TransactionIsolation.READ_COMMITTED;
 import static org.apache.ignite.transactions.TransactionIsolation.REPEATABLE_READ;
@@ -114,10 +112,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
      * @throws Exception If failed.
      */
     public void testLocal() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
-            ATOMIC,
-            ONHEAP_TIERED,
-            false);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(ATOMIC,false);
 
         doTestPartitionCounterOperation(ccfg);
     }
@@ -126,10 +121,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
      * @throws Exception If failed.
      */
     public void testLocalWithStore() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
-            ATOMIC,
-            ONHEAP_TIERED,
-            true);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(ATOMIC,true);
 
         doTestPartitionCounterOperation(ccfg);
     }
@@ -138,10 +130,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
      * @throws Exception If failed.
      */
     public void testLocalTx() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
-            TRANSACTIONAL,
-            ONHEAP_TIERED,
-            false);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(TRANSACTIONAL,false);
 
         doTestPartitionCounterOperation(ccfg);
     }
@@ -150,10 +139,7 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
      * @throws Exception If failed.
      */
     public void testLocalTxWithStore() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
-            TRANSACTIONAL,
-            ONHEAP_TIERED,
-            true);
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(TRANSACTIONAL,true);
 
         doTestPartitionCounterOperation(ccfg);
     }
@@ -488,18 +474,15 @@ public class CacheInterceptorPartitionCounterLocalSanityTest extends GridCommonA
 
     /**
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param store If {@code true} configures dummy cache store.
      * @return Cache configuration.
      */
     protected CacheConfiguration<Object, Object> cacheConfiguration(
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         boolean store) {
         CacheConfiguration<TestKey, TestValue> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setCacheMode(LOCAL);
 
         if (store) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
index 97a815b..5b7769e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheInterceptorPartitionCounterRandomOperationsTest.java
@@ -39,7 +39,6 @@ import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheInterceptorAdapter;
 import org.apache.ignite.cache.CacheInterceptorEntry;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
 import org.apache.ignite.cache.store.CacheStore;
@@ -64,9 +63,6 @@ import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -153,7 +149,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -166,7 +161,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             ATOMIC,
-            ONHEAP_TIERED,
             true);
 
         doTestPartitionCounterOperation(ccfg);
@@ -179,7 +173,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -192,7 +185,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             true);
 
         doTestPartitionCounterOperation(ccfg);
@@ -201,50 +193,10 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
     /**
      * @throws Exception If failed.
      */
-    public void testAtomicOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapValuesWithStore() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_VALUES,
-            true);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testAtomicNoBackups() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             ATOMIC,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -257,7 +209,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -270,7 +221,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             true);
 
         doTestPartitionCounterOperation(ccfg);
@@ -283,7 +233,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             1,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -296,7 +245,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -309,7 +257,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(REPLICATED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             true);
 
         doTestPartitionCounterOperation(ccfg);
@@ -318,63 +265,10 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
     /**
      * @throws Exception If failed.
      */
-    public void testTxOffheapValues() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapValuesExplicit() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_VALUES,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTieredExplicit() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            1,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            false);
-
-        doTestPartitionCounterOperation(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testTxNoBackups() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -387,7 +281,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             true);
 
         doTestPartitionCounterOperation(ccfg);
@@ -400,7 +293,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             0,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             false);
 
         doTestPartitionCounterOperation(ccfg);
@@ -824,7 +716,6 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
      * @param cacheMode Cache mode.
      * @param backups Number of backups.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param store If {@code true} configures dummy cache store.
      * @return Cache configuration.
      */
@@ -832,13 +723,11 @@ public class CacheInterceptorPartitionCounterRandomOperationsTest extends GridCo
         CacheMode cacheMode,
         int backups,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         boolean store) {
         CacheConfiguration<TestKey, TestValue> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
index 4ea74ca..9bd7a8c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
@@ -145,17 +145,6 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void testOneBackupOffheap() throws Exception {
-        CacheConfiguration<Integer, Integer> ccfg = cacheConfiguration(PARTITIONED, FULL_SYNC, 1, false, false);
-
-        GridTestUtils.setMemoryMode(null, ccfg, GridTestUtils.TestMemoryMode.OFFHEAP_TIERED, 0, 0);
-
-        testGetUpdateMultithreaded(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testGetUpdateMultithreaded(CacheConfiguration<Integer, Integer> ccfg) throws Exception {
         final List<Ignite> putNodes = new ArrayList<>();
 
@@ -327,7 +316,6 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest {
             ", near=" + (ccfg.getNearConfiguration() != null) +
             ", store=" + ccfg.isWriteThrough() +
             ", evictPlc=" + (ccfg.getEvictionPolicy() != null) +
-            ", maxOffheap=" + ccfg.getOffHeapMaxMemory()  +
             ']');
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
index 1cb52c3..06fafb3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapMapEntrySelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.IgniteKernal;
@@ -30,9 +29,6 @@ import org.apache.ignite.internal.processors.cache.local.GridLocalCacheEntry;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_VALUES;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.LOCAL;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
@@ -67,26 +63,23 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
     }
 
     /**
-     * @param igniteInstanceName Ignite instance name.
-     * @param memoryMode Memory mode.
+     * @param gridName Grid name.
      * @param atomicityMode Atomicity mode.
      * @param cacheMode Cache mode.
      * @param cacheName Cache name.
      * @return Cache configuration.
      * @throws Exception If failed.
      */
-    private CacheConfiguration cacheConfiguration(String igniteInstanceName,
-        CacheMemoryMode memoryMode,
+    private CacheConfiguration cacheConfiguration(String gridName,
         CacheAtomicityMode atomicityMode,
         CacheMode cacheMode,
         String cacheName)
         throws Exception
     {
-        CacheConfiguration cfg = super.cacheConfiguration(igniteInstanceName);
+        CacheConfiguration cfg = super.cacheConfiguration(gridName);
 
         cfg.setCacheMode(cacheMode);
         cfg.setAtomicityMode(atomicityMode);
-        cfg.setMemoryMode(memoryMode);
         cfg.setName(cacheName);
 
         return cfg;
@@ -96,46 +89,33 @@ public class CacheOffheapMapEntrySelfTest extends GridCacheAbstractSelfTest {
      * @throws Exception If failed.
      */
     public void testCacheMapEntry() throws Exception {
-        checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, LOCAL, GridLocalCacheEntry.class);
+        checkCacheMapEntry(ATOMIC, LOCAL, GridLocalCacheEntry.class);
 
-        checkCacheMapEntry(OFFHEAP_TIERED, ATOMIC, LOCAL, GridLocalCacheEntry.class);
+        checkCacheMapEntry(TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
 
-        checkCacheMapEntry(OFFHEAP_VALUES, ATOMIC, LOCAL, GridLocalCacheEntry.class);
+        checkCacheMapEntry(ATOMIC, PARTITIONED, GridNearCacheEntry.class);
 
-        checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
+        checkCacheMapEntry(TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class);
 
-        checkCacheMapEntry(OFFHEAP_TIERED, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
+        checkCacheMapEntry(ATOMIC, REPLICATED, GridDhtAtomicCacheEntry.class);
 
-        checkCacheMapEntry(OFFHEAP_VALUES, TRANSACTIONAL, LOCAL, GridLocalCacheEntry.class);
-
-        checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, PARTITIONED, GridNearCacheEntry.class);
-
-        checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, PARTITIONED, GridNearCacheEntry.class);
-
-        checkCacheMapEntry(ONHEAP_TIERED, ATOMIC, REPLICATED, GridDhtAtomicCacheEntry.class);
-
-        checkCacheMapEntry(ONHEAP_TIERED, TRANSACTIONAL, REPLICATED, GridDhtColocatedCacheEntry.class);
+        checkCacheMapEntry(TRANSACTIONAL, REPLICATED, GridDhtColocatedCacheEntry.class);
     }
 
     /**
-     * @param memoryMode Cache memory mode.
      * @param atomicityMode Cache atomicity mode.
      * @param cacheMode Cache mode.
      * @param entryCls Class of cache map entry.
      * @throws Exception If failed.
      */
-    private void checkCacheMapEntry(CacheMemoryMode memoryMode,
-        CacheAtomicityMode atomicityMode,
+    private void checkCacheMapEntry(CacheAtomicityMode atomicityMode,
         CacheMode cacheMode,
         Class<?> entryCls)
         throws Exception
     {
-        log.info("Test cache [memMode=" + memoryMode +
-            ", atomicityMode=" + atomicityMode +
-            ", cacheMode=" + cacheMode + ']');
+        log.info("Test cache [atomicityMode=" + atomicityMode + ", cacheMode=" + cacheMode + ']');
 
         CacheConfiguration cfg = cacheConfiguration(grid(0).name(),
-            memoryMode,
             atomicityMode,
             cacheMode,
             "Cache");

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java
index bd43956..f609af3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CachePutEventListenerErrorSelfTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.Ignition;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -96,65 +95,36 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest {
      * @throws Exception If failed.
      */
     public void testPartitionedAtomicOnHeap() throws Exception {
-        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionedAtomicOffHeap() throws Exception {
-        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.OFFHEAP_TIERED);
+        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.ATOMIC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testPartitionedTransactionalOnHeap() throws Exception {
-        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testPartitionedTransactionalOffHeap() throws Exception {
-        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED);
+        doTest(CacheMode.PARTITIONED, CacheAtomicityMode.TRANSACTIONAL);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicatedAtomicOnHeap() throws Exception {
-        doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.ONHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedAtomicOffHeap() throws Exception {
-        doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC, CacheMemoryMode.OFFHEAP_TIERED);
+        doTest(CacheMode.REPLICATED, CacheAtomicityMode.ATOMIC);
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testReplicatedTransactionalOnHeap() throws Exception {
-        doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.ONHEAP_TIERED);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testReplicatedTransactionalOffHeap() throws Exception {
-        doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL, CacheMemoryMode.OFFHEAP_TIERED);
+        doTest(CacheMode.REPLICATED, CacheAtomicityMode.TRANSACTIONAL);
     }
 
     /**
      * @param cacheMode Cache mode.
      * @param atomicityMode Atomicity mode.
-     * @param memMode Memory mode.
      * @throws Exception If failed.
      */
-    private void doTest(CacheMode cacheMode, CacheAtomicityMode atomicityMode, CacheMemoryMode memMode)
+    private void doTest(CacheMode cacheMode, CacheAtomicityMode atomicityMode)
         throws Exception {
         Ignite ignite = grid("client");
 
@@ -164,7 +134,6 @@ public class CachePutEventListenerErrorSelfTest extends GridCommonAbstractTest {
             cfg.setName("cache");
             cfg.setCacheMode(cacheMode);
             cfg.setAtomicityMode(atomicityMode);
-            cfg.setMemoryMode(memMode);
 
             IgniteCache<Integer, Integer> cache = ignite.createCache(cfg);
 


[16/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 1d7fb9e..26f37a7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -19,148 +19,46 @@ package org.apache.ignite.internal.processors.cache;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
 import java.util.Set;
-import java.util.UUID;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.eviction.EvictionFilter;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
-import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.Event;
-import org.apache.ignite.internal.IgniteFutureCancelledCheckedException;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.IgniteInterruptedCheckedException;
-import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException;
-import org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtInvalidPartitionException;
-import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
 import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.processors.timeout.GridTimeoutObject;
-import org.apache.ignite.internal.processors.timeout.GridTimeoutObjectAdapter;
-import org.apache.ignite.internal.util.F0;
 import org.apache.ignite.internal.util.GridBusyLock;
-import org.apache.ignite.internal.util.GridConcurrentHashSet;
 import org.apache.ignite.internal.util.GridUnsafe;
-import org.apache.ignite.internal.util.future.GridFutureAdapter;
-import org.apache.ignite.internal.util.lang.GridMetadataAwareAdapter;
-import org.apache.ignite.internal.util.lang.IgnitePair;
-import org.apache.ignite.internal.util.tostring.GridToStringExclude;
-import org.apache.ignite.internal.util.typedef.C1;
-import org.apache.ignite.internal.util.typedef.CI1;
-import org.apache.ignite.internal.util.typedef.CI2;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.P1;
 import org.apache.ignite.internal.util.typedef.X;
-import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.internal.util.worker.GridWorker;
-import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteUuid;
-import org.apache.ignite.thread.IgniteThread;
 import org.jetbrains.annotations.Nullable;
-import org.jsr166.ConcurrentHashMap8;
-import org.jsr166.ConcurrentLinkedDeque8;
 
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.apache.ignite.cache.CacheMode.LOCAL;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_EVICTED;
-import static org.apache.ignite.events.EventType.EVT_NODE_FAILED;
-import static org.apache.ignite.events.EventType.EVT_NODE_JOINED;
-import static org.apache.ignite.events.EventType.EVT_NODE_LEFT;
-import static org.apache.ignite.internal.processors.cache.GridCacheUtils.isNearEnabled;
-import static org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtPartitionState.MOVING;
-import static org.jsr166.ConcurrentLinkedDeque8.Node;
 
 /**
- * TODO GG-11140 (old evictions implementation, now created for near cache, evictions to be reconsidered as part of GG-11140).
+ *
  */
 public class GridCacheEvictionManager extends GridCacheManagerAdapter implements CacheEvictionManager {
-    /** Attribute name used to queue node in entry metadata. */
-    private static final int META_KEY = GridMetadataAwareAdapter.EntryKey.CACHE_EVICTION_MANAGER_KEY.key();
-
     /** Eviction policy. */
     private EvictionPolicy plc;
 
     /** Eviction filter. */
     private EvictionFilter filter;
 
-    /** Eviction buffer. */
-    private final ConcurrentLinkedDeque8<EvictionInfo> bufEvictQ = new ConcurrentLinkedDeque8<>();
-
-    /** Active eviction futures. */
-    private final Map<Long, EvictionFuture> futs = new ConcurrentHashMap8<>();
-
-    /** Futures count modification lock. */
-    private final Lock futsCntLock = new ReentrantLock();
-
-    /** Futures count condition. */
-    private final Condition futsCntCond = futsCntLock.newCondition();
-
-    /** Active futures count. */
-    private volatile int activeFutsCnt;
-
-    /** Max active futures count. */
-    private int maxActiveFuts;
-
-    /** Generator of future IDs. */
-    private final AtomicLong idGen = new AtomicLong();
-
-    /** Evict backup synchronized flag. */
-    private boolean evictSync;
-
-    /** Evict near synchronized flag. */
-    private boolean nearSync;
-
-    /** Flag to hold {@code evictSync || nearSync} result. */
-    private boolean evictSyncAgr;
-
     /** Policy enabled. */
     private boolean plcEnabled;
 
-    /** Backup entries worker. */
-    private BackupWorker backupWorker;
-
-    /** Backup entries worker thread. */
-    private IgniteThread backupWorkerThread;
-
     /** Busy lock. */
     private final GridBusyLock busyLock = new GridBusyLock();
 
-    /** Stopping flag. */
-    private volatile boolean stopping;
-
     /** Stopped flag. */
     private boolean stopped;
 
-    /** Current future. */
-    private final AtomicReference<EvictionFuture> curEvictFut = new AtomicReference<>();
-
     /** First eviction flag. */
     private volatile boolean firstEvictWarn;
 
@@ -170,157 +68,21 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
 
         plc = cctx.isNear() ? cfg.getNearConfiguration().getNearEvictionPolicy() : cfg.getEvictionPolicy();
 
-        plcEnabled = plc != null && cctx.isNear();
+        plcEnabled = plc != null;
 
         filter = cfg.getEvictionFilter();
 
-        if (cfg.getEvictMaxOverflowRatio() < 0)
-            throw new IgniteCheckedException("Configuration parameter 'maxEvictOverflowRatio' cannot be negative.");
-
-        if (cfg.getEvictSynchronizedKeyBufferSize() < 0)
-            throw new IgniteCheckedException("Configuration parameter 'evictSynchronizedKeyBufferSize' cannot be negative.");
-
-        if (!cctx.isLocal()) {
-            evictSync = cfg.isEvictSynchronized() && !cctx.isNear();
-
-            nearSync = isNearEnabled(cctx) && !cctx.isNear() && cfg.isEvictSynchronized();
-        }
-        else {
-            if (cfg.isEvictSynchronized())
-                U.warn(log, "Ignored 'evictSynchronized' configuration property for LOCAL cache: " + cctx.namexx());
-
-            if (cfg.getNearConfiguration() != null && cfg.isEvictSynchronized())
-                U.warn(log, "Ignored 'evictNearSynchronized' configuration property for LOCAL cache: " + cctx.namexx());
-        }
-
-        if (cctx.isDht() && !nearSync && evictSync && isNearEnabled(cctx))
-            throw new IgniteCheckedException("Illegal configuration (may lead to data inconsistency) " +
-                "[evictSync=true, evictNearSync=false]");
-
-        reportConfigurationProblems();
-
-        evictSyncAgr = evictSync || nearSync;
-
-        if (evictSync && !cctx.isNear() && plcEnabled) {
-            backupWorker = new BackupWorker();
-
-            cctx.events().addListener(
-                new GridLocalEventListener() {
-                    @Override public void onEvent(Event evt) {
-                        assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT ||
-                            evt.type() == EVT_NODE_JOINED;
-
-                        DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
-
-                        // Notify backup worker on each topology change.
-                        if (cctx.discovery().cacheAffinityNode(discoEvt.eventNode(), cctx.name()))
-                            backupWorker.addEvent(discoEvt);
-                    }
-                },
-                EVT_NODE_FAILED, EVT_NODE_LEFT, EVT_NODE_JOINED);
-        }
-
-        if (evictSyncAgr) {
-            if (cfg.getEvictSynchronizedTimeout() <= 0)
-                throw new IgniteCheckedException("Configuration parameter 'evictSynchronousTimeout' should be positive.");
-
-            if (cfg.getEvictSynchronizedConcurrencyLevel() <= 0)
-                throw new IgniteCheckedException("Configuration parameter 'evictSynchronousConcurrencyLevel' " +
-                    "should be positive.");
-
-            maxActiveFuts = cfg.getEvictSynchronizedConcurrencyLevel();
-
-            cctx.io().addHandler(cctx.cacheId(), GridCacheEvictionRequest.class, new CI2<UUID, GridCacheEvictionRequest>() {
-                @Override public void apply(UUID nodeId, GridCacheEvictionRequest msg) {
-                    processEvictionRequest(nodeId, msg);
-                }
-            });
-
-            cctx.io().addHandler(cctx.cacheId(), GridCacheEvictionResponse.class, new CI2<UUID, GridCacheEvictionResponse>() {
-                @Override public void apply(UUID nodeId, GridCacheEvictionResponse msg) {
-                    processEvictionResponse(nodeId, msg);
-                }
-            });
-
-            cctx.events().addListener(
-                new GridLocalEventListener() {
-                    @Override public void onEvent(Event evt) {
-                        assert evt.type() == EVT_NODE_FAILED || evt.type() == EVT_NODE_LEFT;
-
-                        DiscoveryEvent discoEvt = (DiscoveryEvent)evt;
-
-                        for (EvictionFuture fut : futs.values())
-                            fut.onNodeLeft(discoEvt.eventNode().id());
-                    }
-                },
-                EVT_NODE_FAILED, EVT_NODE_LEFT);
-        }
-
         if (log.isDebugEnabled())
             log.debug("Eviction manager started on node: " + cctx.nodeId());
     }
 
-    /**
-     * Outputs warnings if potential configuration problems are detected.
-     */
-    private void reportConfigurationProblems() {
-        CacheMode mode = cctx.config().getCacheMode();
-
-        if (plcEnabled && !cctx.isNear() && mode == PARTITIONED) {
-            if (!evictSync) {
-                U.warn(log, "Evictions are not synchronized with other nodes in topology " +
-                    "which provides 2x-3x better performance but may cause data inconsistency if cache store " +
-                    "is not configured (consider changing 'evictSynchronized' configuration property).",
-                    "Evictions are not synchronized for cache: " + cctx.namexx());
-            }
-
-            if (!nearSync && isNearEnabled(cctx)) {
-                U.warn(log, "Evictions on primary node are not synchronized with near caches on other nodes " +
-                    "which provides 2x-3x better performance but may cause data inconsistency (consider changing " +
-                    "'nearEvictSynchronized' configuration property).",
-                    "Evictions are not synchronized with near caches on other nodes for cache: " + cctx.namexx());
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void onKernalStart0() throws IgniteCheckedException {
-        super.onKernalStart0();
-
-        if (plcEnabled && evictSync && !cctx.isNear()) {
-            // Add dummy event to worker.
-            DiscoveryEvent evt = cctx.discovery().localJoinEvent();
-
-            backupWorker.addEvent(evt);
-
-            backupWorkerThread = new IgniteThread(backupWorker);
-            backupWorkerThread.start();
-        }
-    }
-
     /** {@inheritDoc} */
     @Override protected void onKernalStop0(boolean cancel) {
         super.onKernalStop0(cancel);
 
-        // Change stopping first.
-        stopping = true;
-
         busyLock.block();
 
         try {
-            // Stop backup worker.
-            if (evictSync && !cctx.isNear() && backupWorker != null) {
-                backupWorker.cancel();
-
-                U.join(
-                    backupWorkerThread,
-                    log);
-            }
-
-            // Cancel all active futures.
-            for (EvictionFuture fut : futs.values())
-                fut.cancel();
-
             if (log.isDebugEnabled())
                 log.debug("Eviction manager stopped on node: " + cctx.nodeId());
         }
@@ -332,42 +94,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
     }
 
     /**
-     * @return Current size of evict queue.
-     */
-    public int evictQueueSize() {
-        return bufEvictQ.sizex();
-    }
-
-    /**
-     * @param nodeId Sender node ID.
-     * @param res Response.
-     */
-    private void processEvictionResponse(UUID nodeId, GridCacheEvictionResponse res) {
-        assert nodeId != null;
-        assert res != null;
-
-        if (log.isDebugEnabled())
-            log.debug("Processing eviction response [node=" + nodeId + ", localNode=" + cctx.nodeId() +
-                ", res=" + res + ']');
-
-        if (!enterBusy())
-            return;
-
-        try {
-            EvictionFuture fut = futs.get(res.futureId());
-
-            if (fut != null)
-                fut.onResponse(nodeId, res);
-            else if (log.isDebugEnabled())
-                log.debug("Eviction future for response is not found [res=" + res + ", node=" + nodeId +
-                    ", localNode=" + cctx.nodeId() + ']');
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
      * @return {@code True} if entered busy.
      */
     private boolean enterBusy() {
@@ -384,324 +110,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
     }
 
     /**
-     * @param nodeId Sender node ID.
-     * @param req Request.
-     */
-    private void processEvictionRequest(UUID nodeId, GridCacheEvictionRequest req) {
-        assert nodeId != null;
-        assert req != null;
-
-        if (!enterBusy())
-            return;
-
-        try {
-            if (req.classError() != null) {
-                if (log.isDebugEnabled())
-                    log.debug("Class got undeployed during eviction: " + req.classError());
-
-                sendEvictionResponse(nodeId, new GridCacheEvictionResponse(cctx.cacheId(), req.futureId(), true));
-
-                return;
-            }
-
-            AffinityTopologyVersion topVer = lockTopology();
-
-            try {
-                if (!topVer.equals(req.topologyVersion())) {
-                    if (log.isDebugEnabled())
-                        log.debug("Topology version is different [locTopVer=" + topVer +
-                            ", rmtTopVer=" + req.topologyVersion() + ']');
-
-                    sendEvictionResponse(nodeId,
-                        new GridCacheEvictionResponse(cctx.cacheId(), req.futureId(), true));
-
-                    return;
-                }
-
-                processEvictionRequest0(nodeId, req);
-            }
-            finally {
-                unlockTopology();
-            }
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
-     * @param nodeId Sender node ID.
-     * @param req Request.
-     */
-    private void processEvictionRequest0(UUID nodeId, GridCacheEvictionRequest req) {
-        if (log.isDebugEnabled())
-            log.debug("Processing eviction request [node=" + nodeId + ", localNode=" + cctx.nodeId() +
-                ", reqSize=" + req.entries().size() + ']');
-
-        // Partition -> {{Key, Version}, ...}.
-        // Group DHT and replicated cache entries by their partitions.
-        Map<Integer, Collection<CacheEvictionEntry>> dhtEntries = new HashMap<>();
-
-        Collection<CacheEvictionEntry> nearEntries = new LinkedList<>();
-
-        for (CacheEvictionEntry e : req.entries()) {
-            boolean near = e.near();
-
-            if (!near) {
-                // Lock is required.
-                Collection<CacheEvictionEntry> col =
-                    F.addIfAbsent(dhtEntries, cctx.affinity().partition(e.key()),
-                        new LinkedList<CacheEvictionEntry>());
-
-                assert col != null;
-
-                col.add(e);
-            }
-            else
-                nearEntries.add(e);
-        }
-
-        GridCacheEvictionResponse res = new GridCacheEvictionResponse(cctx.cacheId(), req.futureId());
-
-        GridCacheVersion obsoleteVer = cctx.versions().next();
-
-        // DHT and replicated cache entries.
-        for (Map.Entry<Integer, Collection<CacheEvictionEntry>> e : dhtEntries.entrySet()) {
-            int part = e.getKey();
-
-            boolean locked = lockPartition(part); // Will return false if preloading is disabled.
-
-            try {
-                for (CacheEvictionEntry t : e.getValue()) {
-                    KeyCacheObject key = t.key();
-                    GridCacheVersion ver = t.version();
-                    boolean near = t.near();
-
-                    assert !near;
-
-                    boolean evicted = evictLocally(key, ver, near, obsoleteVer);
-
-                    if (log.isDebugEnabled())
-                        log.debug("Evicted key [key=" + key + ", ver=" + ver + ", near=" + near +
-                            ", evicted=" + evicted +']');
-
-                    if (locked && evicted)
-                        // Preloading is in progress, we need to save eviction info.
-                        saveEvictionInfo(key, ver, part);
-
-                    if (!evicted)
-                        res.addRejected(key);
-                }
-            }
-            finally {
-                if (locked)
-                    unlockPartition(part);
-            }
-        }
-
-        // Near entries.
-        for (CacheEvictionEntry t : nearEntries) {
-            KeyCacheObject key = t.key();
-            GridCacheVersion ver = t.version();
-            boolean near = t.near();
-
-            assert near;
-
-            boolean evicted = evictLocally(key, ver, near, obsoleteVer);
-
-            if (log.isDebugEnabled())
-                log.debug("Evicted key [key=" + key + ", ver=" + ver + ", near=" + near +
-                    ", evicted=" + evicted +']');
-
-            if (!evicted)
-                res.addRejected(key);
-        }
-
-        sendEvictionResponse(nodeId, res);
-    }
-
-    /**
-     * @param nodeId Node ID.
-     * @param res Response.
-     */
-    private void sendEvictionResponse(UUID nodeId, GridCacheEvictionResponse res) {
-        try {
-            cctx.io().send(nodeId, res, cctx.ioPolicy());
-
-            if (log.isDebugEnabled())
-                log.debug("Sent eviction response [node=" + nodeId + ", localNode=" + cctx.nodeId() +
-                    ", res" + res + ']');
-        }
-        catch (ClusterTopologyCheckedException ignored) {
-            if (log.isDebugEnabled())
-                log.debug("Failed to send eviction response since initiating node left grid " +
-                    "[node=" + nodeId + ", localNode=" + cctx.nodeId() + ']');
-        }
-        catch (IgniteCheckedException e) {
-            U.error(log, "Failed to send eviction response to node [node=" + nodeId +
-                ", localNode=" + cctx.nodeId() + ", res" + res + ']', e);
-        }
-    }
-
-    /**
-     * @param key Key.
-     * @param ver Version.
-     * @param p Partition ID.
-     */
-    private void saveEvictionInfo(KeyCacheObject key, GridCacheVersion ver, int p) {
-        assert cctx.rebalanceEnabled();
-
-        if (!cctx.isNear()) {
-            try {
-                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p,
-                    AffinityTopologyVersion.NONE, false);
-
-                assert part != null;
-
-                part.onEntryEvicted(key, ver);
-            }
-            catch (GridDhtInvalidPartitionException ignored) {
-                if (log.isDebugEnabled())
-                    log.debug("Partition does not belong to local node [part=" + p +
-                        ", nodeId" + cctx.localNode().id() + ']');
-            }
-        }
-        else
-            assert false : "Failed to save eviction info: " + cctx.namexx();
-    }
-
-    /**
-     * @param p Partition ID.
-     * @return {@code True} if partition has been actually locked,
-     *      {@code false} if preloading is finished or disabled and no lock is needed.
-     */
-    private boolean lockPartition(int p) {
-        if (!cctx.rebalanceEnabled())
-            return false;
-
-        if (!cctx.isNear()) {
-            try {
-                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, AffinityTopologyVersion.NONE,
-                    false);
-
-                if (part != null && part.reserve()) {
-                    part.lock();
-
-                    if (part.state() != MOVING) {
-                        part.unlock();
-
-                        part.release();
-
-                        return false;
-                    }
-
-                    return true;
-                }
-            }
-            catch (GridDhtInvalidPartitionException ignored) {
-                if (log.isDebugEnabled())
-                    log.debug("Partition does not belong to local node [part=" + p +
-                        ", nodeId" + cctx.localNode().id() + ']');
-            }
-        }
-
-        // No lock is needed.
-        return false;
-    }
-
-    /**
-     * @param p Partition ID.
-     */
-    private void unlockPartition(int p) {
-        if (!cctx.rebalanceEnabled())
-            return;
-
-        if (!cctx.isNear()) {
-            try {
-                GridDhtLocalPartition part = cctx.dht().topology().localPartition(p, AffinityTopologyVersion.NONE,
-                    false);
-
-                if (part != null) {
-                    part.unlock();
-
-                    part.release();
-                }
-            }
-            catch (GridDhtInvalidPartitionException ignored) {
-                if (log.isDebugEnabled())
-                    log.debug("Partition does not belong to local node [part=" + p +
-                        ", nodeId" + cctx.localNode().id() + ']');
-            }
-        }
-    }
-
-    /**
-     * Locks topology (for DHT cache only) and returns its version.
-     *
-     * @return Topology version after lock.
-     */
-    private AffinityTopologyVersion lockTopology() {
-        if (!cctx.isNear()) {
-            cctx.dht().topology().readLock();
-
-            return cctx.dht().topology().topologyVersion();
-        }
-
-        return AffinityTopologyVersion.ZERO;
-    }
-
-    /**
-     * Unlocks topology.
-     */
-    private void unlockTopology() {
-        if (!cctx.isNear())
-            cctx.dht().topology().readUnlock();
-    }
-
-    /**
-     * @param key Key to evict.
-     * @param ver Entry version on initial node.
-     * @param near {@code true} if entry should be evicted from near cache.
-     * @param obsoleteVer Obsolete version.
-     * @return {@code true} if evicted successfully, {@code false} if could not be evicted.
-     */
-    private boolean evictLocally(KeyCacheObject key,
-        final GridCacheVersion ver,
-        boolean near,
-        GridCacheVersion obsoleteVer)
-    {
-        assert key != null;
-        assert ver != null;
-        assert obsoleteVer != null;
-        assert evictSyncAgr;
-        assert !cctx.isNear() || cctx.isReplicated();
-
-        if (log.isDebugEnabled())
-            log.debug("Evicting key locally [key=" + key + ", ver=" + ver + ", obsoleteVer=" + obsoleteVer +
-                ", localNode=" + cctx.localNode() + ']');
-
-        GridCacheAdapter cache = near ? cctx.dht().near() : cctx.cache();
-
-        GridCacheEntryEx entry = cache.peekEx(key);
-
-        if (entry == null)
-            return true;
-
-        try {
-            // If entry should be evicted from near cache it can be done safely
-            // without any consistency risks. We don't use filter in this case.
-            // If entry should be evicted from DHT cache, we do not compare versions
-            // as well because versions may change outside the transaction.
-            return evict0(cache, entry, obsoleteVer, null, false);
-        }
-        catch (IgniteCheckedException e) {
-            U.error(log, "Failed to evict entry on remote node [key=" + key + ", localNode=" + cctx.nodeId() + ']', e);
-
-            return false;
-        }
-    }
-
-    /**
      * @param cache Cache from which to evict entry.
      * @param entry Entry to evict.
      * @param obsoleteVer Obsolete version.
@@ -762,9 +170,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         if (!loc) {
             if (cctx.isNear())
                 return;
-
-            if (evictSync)
-                return;
         }
 
         GridCacheEntryEx e = txEntry.cached();
@@ -781,13 +186,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         }
 
         notifyPolicy(e);
-
-        if (evictSyncAgr)
-            waitForEvictionFutures();
     }
 
     /** {@inheritDoc} */
-    @Override  public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
+    @Override public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer) {
         if (e.detached() || e.isInternal())
             return;
 
@@ -802,18 +204,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         if (!plcEnabled)
             return;
 
-        // Don't track non-primary entries if evicts are synchronized.
-        if (!cctx.isNear() && evictSync && !cctx.affinity().primaryByPartition(cctx.localNode(), e.partition(), topVer))
-            return;
-
         if (!enterBusy())
             return;
 
         try {
-            // Wait for futures to finish.
-            if (evictSyncAgr)
-                waitForEvictionFutures();
-
             if (log.isDebugEnabled())
                 log.debug("Touching entry [entry=" + e + ", localNode=" + cctx.nodeId() + ']');
 
@@ -825,39 +219,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
     }
 
     /**
-     * @param e Entry for eviction policy notification.
-     */
-    private void touch0(GridCacheEntryEx e) {
-        assert evictSyncAgr;
-        assert plcEnabled;
-
-        // Do not wait for futures here since only limited number
-        // of entries can be passed to this method.
-        notifyPolicy(e);
-    }
-
-    /**
-     * @param entries Entries for eviction policy notification.
-     */
-    private void touchOnTopologyChange(Iterable<? extends GridCacheEntryEx> entries) {
-        assert evictSync;
-        assert plcEnabled;
-
-        if (log.isDebugEnabled())
-            log.debug("Touching entries [entries=" + entries + ", localNode=" + cctx.nodeId() + ']');
-
-        for (GridCacheEntryEx e : entries) {
-            if (e.key() instanceof GridCacheInternal)
-                // Skip internal entry.
-                continue;
-
-            // Do not wait for futures here since only limited number
-            // of entries can be passed to this method.
-            notifyPolicy(e);
-        }
-    }
-
-    /**
      * Warns on first eviction.
      */
     private void warnFirstEvict() {
@@ -870,16 +231,11 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         }
 
         U.warn(log, "Evictions started (cache may have reached its capacity)." +
-            " You may wish to increase 'maxSize' on eviction policy being used for cache: " + cctx.name(),
+                " You may wish to increase 'maxSize' on eviction policy being used for cache: " + cctx.name(),
             "Evictions started (cache may have reached its capacity): " + cctx.name());
     }
 
     /** {@inheritDoc} */
-    @Override public boolean evictSyncOrNearSync() {
-        return evictSyncAgr;
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean evict(@Nullable GridCacheEntryEx entry, @Nullable GridCacheVersion obsoleteVer,
         boolean explicit, @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException {
         if (entry == null)
@@ -892,51 +248,19 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         if (!cctx.isNear() && !explicit && !firstEvictWarn)
             warnFirstEvict();
 
-        if (evictSyncAgr) {
-            assert !cctx.isNear(); // Make sure cache is not NEAR.
+        if (obsoleteVer == null)
+            obsoleteVer = cctx.versions().next();
 
-            if (cctx.affinity().backupsByKey(
-                    entry.key(),
-                    cctx.topology().topologyVersion()).contains(cctx.localNode()) &&
-                evictSync)
-                // Do not track backups if evicts are synchronized.
-                return !explicit;
+        // Do not touch entry if not evicted:
+        // 1. If it is call from policy, policy tracks it on its own.
+        // 2. If it is explicit call, entry is touched on tx commit.
+        return evict0(cctx.cache(), entry, obsoleteVer, filter, explicit);
+    }
 
-            try {
-                if (!cctx.isAll(entry, filter))
-                    return false;
-
-                if (entry.lockedByAny())
-                    return false;
-
-                // Add entry to eviction queue.
-                enqueue(entry, filter);
-            }
-            catch (GridCacheEntryRemovedException ignored) {
-                if (log.isDebugEnabled())
-                    log.debug("Entry got removed while evicting [entry=" + entry +
-                        ", localNode=" + cctx.nodeId() + ']');
-            }
-        }
-        else {
-            if (obsoleteVer == null)
-                obsoleteVer = cctx.versions().next();
-
-            // Do not touch entry if not evicted:
-            // 1. If it is call from policy, policy tracks it on its own.
-            // 2. If it is explicit call, entry is touched on tx commit.
-            return evict0(cctx.cache(), entry, obsoleteVer, filter, explicit);
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer)
-        throws IgniteCheckedException {
-        assert !evictSyncAgr;
-
-        List<GridCacheEntryEx> locked = new ArrayList<>(keys.size());
+    /** {@inheritDoc} */
+    @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer)
+        throws IgniteCheckedException {
+        List<GridCacheEntryEx> locked = new ArrayList<>(keys.size());
 
         Set<GridCacheEntryEx> notRmv = null;
 
@@ -1005,7 +329,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
         }
         finally {
             // Unlock entries in reverse order.
-            for (ListIterator<GridCacheEntryEx> it = locked.listIterator(locked.size()); it.hasPrevious();) {
+            for (ListIterator<GridCacheEntryEx> it = locked.listIterator(locked.size()); it.hasPrevious(); ) {
                 GridCacheEntryEx e = it.previous();
 
                 GridUnsafe.monitorExit(e);
@@ -1031,332 +355,6 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
     }
 
     /**
-     * Enqueues entry for synchronized eviction.
-     *
-     * @param entry Entry.
-     * @param filter Filter.
-     * @throws GridCacheEntryRemovedException If entry got removed.
-     */
-    private void enqueue(GridCacheEntryEx entry, CacheEntryPredicate[] filter)
-        throws GridCacheEntryRemovedException {
-        Node<EvictionInfo> node = entry.meta(META_KEY);
-
-        if (node == null) {
-            node = bufEvictQ.addLastx(new EvictionInfo(entry, entry.version(), filter));
-
-            if (entry.putMetaIfAbsent(META_KEY, node) != null)
-                // Was concurrently added, need to clear it from queue.
-                bufEvictQ.unlinkx(node);
-            else if (log.isDebugEnabled())
-                log.debug("Added entry to eviction queue: " + entry);
-        }
-    }
-
-    /**
-     * Checks eviction queue.
-     */
-    private void checkEvictionQueue() {
-        int maxSize = maxQueueSize();
-
-        int bufSize = bufEvictQ.sizex();
-
-        if (bufSize >= maxSize) {
-            if (log.isDebugEnabled())
-                log.debug("Processing eviction queue: " + bufSize);
-
-            Collection<EvictionInfo> evictInfos = new ArrayList<>(bufSize);
-
-            for (int i = 0; i < bufSize; i++) {
-                EvictionInfo info = bufEvictQ.poll();
-
-                if (info == null)
-                    break;
-
-                evictInfos.add(info);
-            }
-
-            if (!evictInfos.isEmpty())
-                addToCurrentFuture(evictInfos);
-        }
-    }
-
-    /**
-     * @return Max queue size.
-     */
-    private int maxQueueSize() {
-        int size = (int)(cctx.cache().size() * cctx.config().getEvictMaxOverflowRatio()) / 100;
-
-        if (size <= 0)
-            size = 500;
-
-        return Math.min(size, cctx.config().getEvictSynchronizedKeyBufferSize());
-    }
-
-    /**
-     * Processes eviction queue (sends required requests, etc.).
-     *
-     * @param evictInfos Eviction information to create future with.
-     */
-    private void addToCurrentFuture(Collection<EvictionInfo> evictInfos) {
-        assert !evictInfos.isEmpty();
-
-        while (true) {
-            EvictionFuture fut = curEvictFut.get();
-
-            if (fut == null) {
-                curEvictFut.compareAndSet(null, new EvictionFuture());
-
-                continue;
-            }
-
-            if (fut.prepareLock()) {
-                boolean added;
-
-                try {
-                    added = fut.add(evictInfos);
-                }
-                finally {
-                    fut.prepareUnlock();
-                }
-
-                if (added) {
-                    if (fut.prepare()) {
-                        // Thread that prepares future should remove it and install listener.
-                        curEvictFut.compareAndSet(fut, null);
-
-                        fut.listen(new CI1<IgniteInternalFuture<?>>() {
-                            @Override public void apply(IgniteInternalFuture<?> f) {
-                                if (!enterBusy()) {
-                                    if (log.isDebugEnabled())
-                                        log.debug("Will not notify eviction future completion (grid is stopping): " +
-                                            f);
-
-                                    return;
-                                }
-
-                                try {
-                                    AffinityTopologyVersion topVer = lockTopology();
-
-                                    try {
-                                        onFutureCompleted((EvictionFuture)f, topVer);
-                                    }
-                                    finally {
-                                        unlockTopology();
-                                    }
-                                }
-                                finally {
-                                    busyLock.leaveBusy();
-                                }
-                            }
-                        });
-                    }
-
-                    break;
-                }
-                else
-                    // Infos were not added, create another future for next iteration.
-                    curEvictFut.compareAndSet(fut, new EvictionFuture());
-            }
-            else
-                // Future has not been locked, create another future for next iteration.
-                curEvictFut.compareAndSet(fut, new EvictionFuture());
-        }
-    }
-
-    /**
-     * @param fut Completed eviction future.
-     * @param topVer Topology version on future complete.
-     */
-    private void onFutureCompleted(EvictionFuture fut, AffinityTopologyVersion topVer) {
-        if (!enterBusy())
-            return;
-
-        try {
-            IgniteBiTuple<Collection<EvictionInfo>, Collection<EvictionInfo>> t;
-
-            try {
-                t = fut.get();
-            }
-            catch (IgniteFutureCancelledCheckedException ignored) {
-                assert false : "Future has been cancelled, but manager is not stopping: " + fut;
-
-                return;
-            }
-            catch (IgniteCheckedException e) {
-                U.error(log, "Eviction future finished with error (all entries will be touched): " + fut, e);
-
-                if (plcEnabled) {
-                    for (EvictionInfo info : fut.entries())
-                        touch0(info.entry());
-                }
-
-                return;
-            }
-
-            // Check if topology version is different.
-            if (!fut.topologyVersion().equals(topVer)) {
-                if (log.isDebugEnabled())
-                    log.debug("Topology has changed, all entries will be touched: " + fut);
-
-                if (plcEnabled) {
-                    for (EvictionInfo info : fut.entries())
-                        touch0(info.entry());
-                }
-
-                return;
-            }
-
-            // Evict remotely evicted entries.
-            GridCacheVersion obsoleteVer = null;
-
-            Collection<EvictionInfo> evictedEntries = t.get1();
-
-            for (EvictionInfo info : evictedEntries) {
-                GridCacheEntryEx entry = info.entry();
-
-                try {
-                    // Remove readers on which the entry was evicted.
-                    for (IgniteBiTuple<ClusterNode, Long> r : fut.evictedReaders(entry.key())) {
-                        UUID readerId = r.get1().id();
-                        Long msgId = r.get2();
-
-                        ((GridDhtCacheEntry)entry).removeReader(readerId, msgId);
-                    }
-
-                    if (obsoleteVer == null)
-                        obsoleteVer = cctx.versions().next();
-
-                    // Do not touch primary entries, if not evicted.
-                    // They will be touched within updating transactions.
-                    evict0(cctx.cache(), entry, obsoleteVer, versionFilter(info), false);
-                }
-                catch (IgniteCheckedException e) {
-                    U.error(log, "Failed to evict entry [entry=" + entry +
-                        ", localNode=" + cctx.nodeId() + ']', e);
-                }
-                catch (GridCacheEntryRemovedException ignored) {
-                    if (log.isDebugEnabled())
-                        log.debug("Entry was concurrently removed while evicting [entry=" + entry +
-                            ", localNode=" + cctx.nodeId() + ']');
-                }
-            }
-
-            Collection<EvictionInfo> rejectedEntries = t.get2();
-
-            // Touch remotely rejected entries (only if policy is enabled).
-            if (plcEnabled && !rejectedEntries.isEmpty()) {
-                for (EvictionInfo info : rejectedEntries)
-                    touch0(info.entry());
-            }
-        }
-        finally {
-            busyLock.leaveBusy();
-
-            // Signal on future completion.
-            signal();
-        }
-    }
-
-    /**
-     * This method should be called when eviction future is processed
-     * and unwind may continue.
-     */
-    private void signal() {
-        futsCntLock.lock();
-
-        try {
-            // Avoid volatile read on assertion.
-            int cnt = --activeFutsCnt;
-
-            assert cnt >= 0 : "Invalid futures count: " + cnt;
-
-            if (cnt < maxActiveFuts)
-                futsCntCond.signalAll();
-        }
-        finally {
-            futsCntLock.unlock();
-        }
-    }
-
-    /**
-     * @param info Eviction info.
-     * @return Version aware filter.
-     */
-    private CacheEntryPredicate[] versionFilter(final EvictionInfo info) {
-        // If version has changed since we started the whole process
-        // then we should not evict entry.
-        return new CacheEntryPredicate[]{new CacheEntryPredicateAdapter() {
-            @Override public boolean apply(GridCacheEntryEx e) {
-                try {
-                    GridCacheVersion ver = e.version();
-
-                    return info.version().equals(ver) && F.isAll(info.filter());
-                }
-                catch (GridCacheEntryRemovedException ignored) {
-                    return false;
-                }
-            }
-        }};
-    }
-
-    /**
-     * Gets a collection of nodes to send eviction requests to.
-     *
-     *
-     * @param entry Entry.
-     * @param topVer Topology version.
-     * @return Tuple of two collections: dht (in case of partitioned cache) nodes
-     *      and readers (empty for replicated cache).
-     * @throws GridCacheEntryRemovedException If entry got removed during method
-     *      execution.
-     */
-    @SuppressWarnings( {"IfMayBeConditional"})
-    private IgniteBiTuple<Collection<ClusterNode>, Collection<ClusterNode>> remoteNodes(GridCacheEntryEx entry,
-        AffinityTopologyVersion topVer)
-        throws GridCacheEntryRemovedException {
-        assert entry != null;
-
-        assert cctx.config().getCacheMode() != LOCAL;
-
-        Collection<ClusterNode> backups;
-
-        if (evictSync)
-            backups = F.view(cctx.dht().topology().nodes(entry.partition(), topVer), F0.notEqualTo(cctx.localNode()));
-        else
-            backups = Collections.emptySet();
-
-        Collection<ClusterNode> readers;
-
-        if (nearSync) {
-            readers = F.transform(((GridDhtCacheEntry)entry).readers(), new C1<UUID, ClusterNode>() {
-                @Nullable @Override public ClusterNode apply(UUID nodeId) {
-                    return cctx.node(nodeId);
-                }
-            });
-        }
-        else
-            readers = Collections.emptySet();
-
-        return new IgnitePair<>(backups, readers);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void unwind() {
-        if (!evictSyncAgr)
-            return;
-
-        if (!enterBusy())
-            return;
-
-        try {
-            checkEvictionQueue();
-        }
-        finally {
-            busyLock.leaveBusy();
-        }
-    }
-
-    /**
      * @param e Entry to notify eviction policy.
      */
     @SuppressWarnings({"IfMayBeConditional", "RedundantIfStatement"})
@@ -1372,731 +370,10 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
             plc.onEntryAccessed(e.obsoleteOrDeleted(), e.wrapEviction());
     }
 
-    /**
-     *
-     */
-    @SuppressWarnings("TooBroadScope")
-    private void waitForEvictionFutures() {
-        if (activeFutsCnt >= maxActiveFuts) {
-            boolean interrupted = false;
-
-            futsCntLock.lock();
-
-            try {
-                while(!stopping && activeFutsCnt >= maxActiveFuts) {
-                    try {
-                        futsCntCond.await(2000, MILLISECONDS);
-                    }
-                    catch (InterruptedException ignored) {
-                        interrupted = true;
-                    }
-                }
-            }
-            finally {
-                futsCntLock.unlock();
-
-                if (interrupted)
-                    Thread.currentThread().interrupt();
-            }
-        }
-    }
-
-    /**
-     * Prints out eviction stats.
-     */
-    public void printStats() {
-        X.println("Eviction stats [igniteInstanceName=" + cctx.igniteInstanceName() +
-            ", cache=" + cctx.cache().name() + ", buffEvictQ=" + bufEvictQ.sizex() + ']');
-    }
-
     /** {@inheritDoc} */
     @Override public void printMemoryStats() {
         X.println(">>> ");
         X.println(">>> Eviction manager memory stats [igniteInstanceName=" + cctx.igniteInstanceName() +
             ", cache=" + cctx.name() + ']');
-        X.println(">>>   buffEvictQ size: " + bufEvictQ.sizex());
-        X.println(">>>   futsSize: " + futs.size());
-        X.println(">>>   futsCreated: " + idGen.get());
-    }
-
-    /**
-     *
-     */
-    private class BackupWorker extends GridWorker {
-        /** */
-        private final BlockingQueue<DiscoveryEvent> evts = new LinkedBlockingQueue<>();
-
-        /** */
-        private final Collection<Integer> primaryParts = new HashSet<>();
-
-        /**
-         *
-         */
-        private BackupWorker() {
-            super(cctx.igniteInstanceName(), "cache-eviction-backup-worker", GridCacheEvictionManager.this.log);
-
-            assert plcEnabled;
-        }
-
-        /**
-         * @param evt New event.
-         */
-        void addEvent(DiscoveryEvent evt) {
-            assert evt != null;
-
-            evts.add(evt);
-        }
-
-        /** {@inheritDoc} */
-        @Override protected void body() throws InterruptedException, IgniteInterruptedCheckedException {
-            try {
-                assert !cctx.isNear() && evictSync;
-
-                ClusterNode loc = cctx.localNode();
-
-                AffinityTopologyVersion initTopVer =
-                    new AffinityTopologyVersion(cctx.discovery().localJoinEvent().topologyVersion(), 0);
-
-                AffinityTopologyVersion cacheStartVer = cctx.startTopologyVersion();
-
-                if (cacheStartVer != null && cacheStartVer.compareTo(initTopVer) > 0)
-                    initTopVer = cacheStartVer;
-
-                // Initialize.
-                primaryParts.addAll(cctx.affinity().primaryPartitions(cctx.localNodeId(), initTopVer));
-
-                while (!isCancelled()) {
-                    DiscoveryEvent evt = evts.take();
-
-                    if (log.isDebugEnabled())
-                        log.debug("Processing event: " + evt);
-
-                    AffinityTopologyVersion topVer = new AffinityTopologyVersion(evt.topologyVersion());
-
-                    // Remove partitions that are no longer primary.
-                    for (Iterator<Integer> it = primaryParts.iterator(); it.hasNext();) {
-                        if (!evts.isEmpty())
-                            break;
-
-                        if (!cctx.affinity().primaryByPartition(loc, it.next(), topVer))
-                            it.remove();
-                    }
-
-                    // Move on to next event.
-                    if (!evts.isEmpty())
-                        continue;
-
-                    for (GridDhtLocalPartition part : cctx.topology().localPartitions()) {
-                        if (!evts.isEmpty())
-                            break;
-
-                        if (part.primary(topVer) && primaryParts.add(part.id())) {
-                            if (log.isDebugEnabled())
-                                log.debug("Touching partition entries: " + part);
-
-                            touchOnTopologyChange(part.allEntries());
-                        }
-                    }
-                }
-            }
-            catch (InterruptedException ignored) {
-                // No-op.
-            }
-            catch (IgniteException e) {
-                if (!e.hasCause(InterruptedException.class))
-                    throw e;
-            }
-        }
-    }
-
-    /**
-     * Wrapper around an entry to be put into queue.
-     */
-    private class EvictionInfo {
-        /** Cache entry. */
-        private GridCacheEntryEx entry;
-
-        /** Start version. */
-        private GridCacheVersion ver;
-
-        /** Filter to pass before entry will be evicted. */
-        private CacheEntryPredicate[] filter;
-
-        /**
-         * @param entry Entry.
-         * @param ver Version.
-         * @param filter Filter.
-         */
-        EvictionInfo(GridCacheEntryEx entry, GridCacheVersion ver,
-            CacheEntryPredicate[] filter) {
-            assert entry != null;
-            assert ver != null;
-
-            this.entry = entry;
-            this.ver = ver;
-            this.filter = filter;
-        }
-
-        /**
-         * @return Entry.
-         */
-        GridCacheEntryEx entry() {
-            return entry;
-        }
-
-        /**
-         * @return Version.
-         */
-        GridCacheVersion version() {
-            return ver;
-        }
-
-        /**
-         * @return Filter.
-         */
-        CacheEntryPredicate[] filter() {
-            return filter;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(EvictionInfo.class, this);
-        }
-    }
-
-    /**
-     * Future for synchronized eviction. Result is a tuple: {evicted entries, rejected entries}.
-     */
-    private class EvictionFuture extends GridFutureAdapter<IgniteBiTuple<Collection<EvictionInfo>,
-        Collection<EvictionInfo>>> {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** */
-        private final long id = idGen.incrementAndGet();
-
-        /** */
-        private ConcurrentLinkedDeque8<EvictionInfo> evictInfos = new ConcurrentLinkedDeque8<>();
-
-        /** */
-        private final ConcurrentMap<KeyCacheObject, EvictionInfo> entries = new ConcurrentHashMap8<>();
-
-        /** */
-        private final ConcurrentMap<KeyCacheObject, Collection<ClusterNode>> readers =
-            new ConcurrentHashMap8<>();
-
-        /** */
-        private final Collection<EvictionInfo> evictedEntries = new GridConcurrentHashSet<>();
-
-        /** */
-        private final ConcurrentMap<KeyCacheObject, EvictionInfo> rejectedEntries = new ConcurrentHashMap8<>();
-
-        /** Request map. */
-        private final ConcurrentMap<UUID, GridCacheEvictionRequest> reqMap =
-            new ConcurrentHashMap8<>();
-
-        /** Response map. */
-        private final ConcurrentMap<UUID, GridCacheEvictionResponse> resMap =
-            new ConcurrentHashMap8<>();
-
-        /** To make sure that future is completing within a single thread. */
-        private final AtomicBoolean finishPrepare = new AtomicBoolean();
-
-        /** Lock to use when future is being initialized. */
-        @GridToStringExclude
-        private final ReadWriteLock prepareLock = new ReentrantReadWriteLock();
-
-        /** To make sure that future is completing within a single thread. */
-        private final AtomicBoolean completing = new AtomicBoolean();
-
-        /** Lock to use after future is initialized. */
-        @GridToStringExclude
-        private final ReadWriteLock lock = new ReentrantReadWriteLock();
-
-        /** Object to force future completion on elapsing eviction timeout. */
-        @GridToStringExclude
-        private GridTimeoutObject timeoutObj;
-
-        /** Topology version future is processed on. */
-        private AffinityTopologyVersion topVer = AffinityTopologyVersion.ZERO;
-
-        /**
-         * @return {@code True} if prepare lock was acquired.
-         */
-        boolean prepareLock() {
-            return prepareLock.readLock().tryLock();
-        }
-
-        /**
-         *
-         */
-        void prepareUnlock() {
-            prepareLock.readLock().unlock();
-        }
-
-        /**
-         * @param infos Infos to add.
-         * @return {@code False} if entries were not added due to capacity restrictions.
-         */
-        boolean add(Collection<EvictionInfo> infos) {
-            assert infos != null && !infos.isEmpty();
-
-            if (evictInfos.sizex() > maxQueueSize())
-                return false;
-
-            evictInfos.addAll(infos);
-
-            return true;
-        }
-
-        /**
-         * @return {@code True} if future has been prepared by this call.
-         */
-        @SuppressWarnings("LockAcquiredButNotSafelyReleased")
-        boolean prepare() {
-            if (evictInfos.sizex() >= maxQueueSize() && finishPrepare.compareAndSet(false, true)) {
-                // Lock will never be released intentionally.
-                prepareLock.writeLock().lock();
-
-                futsCntLock.lock();
-
-                try {
-                    activeFutsCnt++;
-                }
-                finally {
-                    futsCntLock.unlock();
-                }
-
-                // Put future in map.
-                futs.put(id, this);
-
-                prepare0();
-
-                return true;
-            }
-
-            return false;
-        }
-
-        /**
-         * Prepares future (sends all required requests).
-         */
-        private void prepare0() {
-            if (log.isDebugEnabled())
-                log.debug("Preparing eviction future [futId=" + id + ", localNode=" + cctx.nodeId() +
-                    ", infos=" + evictInfos + ']');
-
-            assert evictInfos != null && !evictInfos.isEmpty();
-
-            topVer = lockTopology();
-
-            try {
-                Collection<EvictionInfo> locals = null;
-
-                for (EvictionInfo info : evictInfos) {
-                    // Queue node may have been stored in entry metadata concurrently, but we don't care
-                    // about it since we are currently processing this entry.
-                    Node<EvictionInfo> queueNode = info.entry().removeMeta(META_KEY);
-
-                    if (queueNode != null)
-                        bufEvictQ.unlinkx(queueNode);
-
-                    IgniteBiTuple<Collection<ClusterNode>, Collection<ClusterNode>> tup;
-
-                    try {
-                        tup = remoteNodes(info.entry(), topVer);
-                    }
-                    catch (GridCacheEntryRemovedException ignored) {
-                        if (log.isDebugEnabled())
-                            log.debug("Entry got removed while preparing eviction future (ignoring) [entry=" +
-                                info.entry() + ", nodeId=" + cctx.nodeId() + ']');
-
-                        continue;
-                    }
-
-                    Collection<ClusterNode> entryReaders =
-                        F.addIfAbsent(readers, info.entry().key(), new GridConcurrentHashSet<ClusterNode>());
-
-                    assert entryReaders != null;
-
-                    // Add entry readers so that we could remove them right before local eviction.
-                    entryReaders.addAll(tup.get2());
-
-                    Collection<ClusterNode> nodes = F.concat(true, tup.get1(), tup.get2());
-
-                    if (!nodes.isEmpty()) {
-                        entries.put(info.entry().key(), info);
-
-                        // There are remote participants.
-                        for (ClusterNode node : nodes) {
-                            GridCacheEvictionRequest req = F.addIfAbsent(reqMap, node.id(),
-                                new GridCacheEvictionRequest(cctx.cacheId(), id, evictInfos.size(), topVer,
-                                    cctx.deploymentEnabled()));
-
-                            assert req != null;
-
-                            req.addKey(info.entry().key(), info.version(), entryReaders.contains(node));
-                        }
-                    }
-                    else {
-                        if (locals == null)
-                            locals = new HashSet<>(evictInfos.size(), 1.0f);
-
-                        // There are no remote participants, need to keep the entry as local.
-                        locals.add(info);
-                    }
-                }
-
-                if (locals != null) {
-                    // Evict entries without remote participant nodes immediately.
-                    GridCacheVersion obsoleteVer = cctx.versions().next();
-
-                    for (EvictionInfo info : locals) {
-                        if (log.isDebugEnabled())
-                            log.debug("Evicting key without remote participant nodes: " + info);
-
-                        try {
-                            // Touch primary entry (without backup nodes) if not evicted
-                            // to keep tracking.
-                            if (!evict0(cctx.cache(), info.entry(), obsoleteVer, versionFilter(info), false) &&
-                                plcEnabled)
-                                touch0(info.entry());
-                        }
-                        catch (IgniteCheckedException e) {
-                            U.error(log, "Failed to evict entry: " + info.entry(), e);
-                        }
-                    }
-                }
-
-                // If there were only local entries.
-                if (entries.isEmpty()) {
-                    complete(false);
-
-                    return;
-                }
-            }
-            finally {
-                unlockTopology();
-            }
-
-            // Send eviction requests.
-            for (Map.Entry<UUID, GridCacheEvictionRequest> e : reqMap.entrySet()) {
-                UUID nodeId = e.getKey();
-
-                GridCacheEvictionRequest req = e.getValue();
-
-                if (log.isDebugEnabled())
-                    log.debug("Sending eviction request [node=" + nodeId + ", req=" + req + ']');
-
-                try {
-                    cctx.io().send(nodeId, req, cctx.ioPolicy());
-                }
-                catch (ClusterTopologyCheckedException ignored) {
-                    // Node left the topology.
-                    onNodeLeft(nodeId);
-                }
-                catch (IgniteCheckedException ex) {
-                    U.error(log, "Failed to send eviction request to node [node=" + nodeId + ", req=" + req + ']', ex);
-
-                    rejectEntries(nodeId);
-                }
-            }
-
-            registerTimeoutObject();
-        }
-
-        /**
-         *
-         */
-        private void registerTimeoutObject() {
-            // Check whether future has not been completed yet.
-            if (lock.readLock().tryLock()) {
-                try {
-                    timeoutObj = new GridTimeoutObjectAdapter(cctx.config().getEvictSynchronizedTimeout()) {
-                        @Override public void onTimeout() {
-                            complete(true);
-                        }
-                    };
-
-                    cctx.time().addTimeoutObject(timeoutObj);
-                }
-                finally {
-                    lock.readLock().unlock();
-                }
-            }
-        }
-
-        /**
-         * @return Future ID.
-         */
-        long id() {
-            return id;
-        }
-
-        /**
-         * @return Topology version.
-         */
-        AffinityTopologyVersion topologyVersion() {
-            return topVer;
-        }
-
-        /**
-         * @return Keys to readers mapping.
-         */
-        Map<KeyCacheObject, Collection<ClusterNode>> readers() {
-            return readers;
-        }
-
-        /**
-         * @return All entries associated with future that should be evicted (or rejected).
-         */
-        Collection<EvictionInfo> entries() {
-            return entries.values();
-        }
-
-        /**
-         * Reject all entries on behalf of specified node.
-         *
-         * @param nodeId Node ID.
-         */
-        private void rejectEntries(UUID nodeId) {
-            assert nodeId != null;
-
-            if (lock.readLock().tryLock()) {
-                try {
-                    if (log.isDebugEnabled())
-                        log.debug("Rejecting entries for node: " + nodeId);
-
-                    GridCacheEvictionRequest req = reqMap.remove(nodeId);
-
-                    for (CacheEvictionEntry t : req.entries()) {
-                        EvictionInfo info = entries.get(t.key());
-
-                        assert info != null;
-
-                        rejectedEntries.put(t.key(), info);
-                    }
-                }
-                finally {
-                    lock.readLock().unlock();
-                }
-            }
-
-            checkDone();
-        }
-
-        /**
-         * @param nodeId Node id that left the topology.
-         */
-        void onNodeLeft(UUID nodeId) {
-            assert nodeId != null;
-
-            if (lock.readLock().tryLock()) {
-                try {
-                    // Stop waiting response from this node.
-                    reqMap.remove(nodeId);
-
-                    resMap.remove(nodeId);
-                }
-                finally {
-                    lock.readLock().unlock();
-                }
-
-                checkDone();
-            }
-        }
-
-        /**
-         * @param nodeId Sender node ID.
-         * @param res Response.
-         */
-        void onResponse(UUID nodeId, GridCacheEvictionResponse res) {
-            assert nodeId != null;
-            assert res != null;
-
-            if (lock.readLock().tryLock()) {
-                try {
-                    if (log.isDebugEnabled())
-                        log.debug("Entered to eviction future onResponse() [fut=" + this + ", node=" + nodeId +
-                            ", res=" + res + ']');
-
-                    ClusterNode node = cctx.node(nodeId);
-
-                    if (node != null)
-                        resMap.put(nodeId, res);
-                    else
-                        // Sender node left grid.
-                        reqMap.remove(nodeId);
-                }
-                finally {
-                    lock.readLock().unlock();
-                }
-
-                if (res.evictError())
-                    // Complete future, since there was a class loading error on at least one node.
-                    complete(false);
-                else
-                    checkDone();
-            }
-            else {
-                if (log.isDebugEnabled())
-                    log.debug("Ignored eviction response [fut=" + this + ", node=" + nodeId + ", res=" + res + ']');
-            }
-        }
-
-        /**
-         *
-         */
-        private void checkDone() {
-            if (reqMap.isEmpty() || resMap.keySet().containsAll(reqMap.keySet()))
-                complete(false);
-        }
-
-        /**
-         * Completes future.
-         *
-         * @param timedOut {@code True} if future is being forcibly completed on timeout.
-         */
-        @SuppressWarnings({"LockAcquiredButNotSafelyReleased"})
-        private void complete(boolean timedOut) {
-            if (completing.compareAndSet(false, true)) {
-                // Lock will never be released intentionally.
-                lock.writeLock().lock();
-
-                futs.remove(id);
-
-                if (timeoutObj != null && !timedOut)
-                    // If future is timed out, corresponding object is already removed.
-                    cctx.time().removeTimeoutObject(timeoutObj);
-
-                if (log.isDebugEnabled())
-                    log.debug("Building eviction future result [fut=" + this + ", timedOut=" + timedOut + ']');
-
-                boolean err = false;
-
-                for (GridCacheEvictionResponse res : resMap.values()) {
-                    if (res.evictError()) {
-                        err = true;
-
-                        break;
-                    }
-                }
-
-                if (err) {
-                    Collection<UUID> ids = F.view(resMap.keySet(), new P1<UUID>() {
-                        @Override public boolean apply(UUID e) {
-                            return resMap.get(e).evictError();
-                        }
-                    });
-
-                    assert !ids.isEmpty();
-
-                    U.warn(log, "Remote node(s) failed to process eviction request " +
-                        "due to topology changes " +
-                        "(some backup or remote values maybe lost): " + ids);
-                }
-
-                if (timedOut)
-                    U.warn(log, "Timed out waiting for eviction future " +
-                        "(consider changing 'evictSynchronousTimeout' and 'evictSynchronousConcurrencyLevel' " +
-                        "configuration parameters).");
-
-                if (err || timedOut) {
-                    // Future has not been completed successfully, all entries should be rejected.
-                    assert evictedEntries.isEmpty();
-
-                    rejectedEntries.putAll(entries);
-                }
-                else {
-                    // Copy map to filter remotely rejected entries,
-                    // as they will be touched within corresponding txs.
-                    Map<KeyCacheObject, EvictionInfo> rejectedEntries0 = new HashMap<>(rejectedEntries);
-
-                    // Future has been completed successfully - build result.
-                    for (EvictionInfo info : entries.values()) {
-                        KeyCacheObject key = info.entry().key();
-
-                        if (rejectedEntries0.containsKey(key))
-                            // Was already rejected.
-                            continue;
-
-                        boolean rejected = false;
-
-                        for (GridCacheEvictionResponse res : resMap.values()) {
-                            if (res.rejectedKeys().contains(key)) {
-                                // Modify copied map.
-                                rejectedEntries0.put(key, info);
-
-                                rejected = true;
-
-                                break;
-                            }
-                        }
-
-                        if (!rejected)
-                            evictedEntries.add(info);
-                    }
-                }
-
-                // Pass entries that were rejected due to topology changes
-                // or due to timeout or class loading issues.
-                // Remotely rejected entries will be touched within corresponding txs.
-                onDone(F.t(evictedEntries, rejectedEntries.values()));
-            }
-        }
-
-        /**
-         * @param key Key.
-         * @return Reader nodes on which given key was evicted.
-         */
-        Collection<IgniteBiTuple<ClusterNode, Long>> evictedReaders(KeyCacheObject key) {
-            Collection<ClusterNode> mappedReaders = readers.get(key);
-
-            if (mappedReaders == null)
-                return Collections.emptyList();
-
-            Collection<IgniteBiTuple<ClusterNode, Long>> col = new LinkedList<>();
-
-            for (Map.Entry<UUID, GridCacheEvictionResponse> e : resMap.entrySet()) {
-                ClusterNode node = cctx.node(e.getKey());
-
-                // If node has left or response did not arrive from near node
-                // then just skip it.
-                if (node == null || !mappedReaders.contains(node))
-                    continue;
-
-                GridCacheEvictionResponse res = e.getValue();
-
-                if (!res.rejectedKeys().contains(key))
-                    col.add(F.t(node, res.messageId()));
-            }
-
-            return col;
-        }
-
-        /** {@inheritDoc} */
-        @SuppressWarnings("LockAcquiredButNotSafelyReleased")
-        @Override public boolean cancel() {
-            if (completing.compareAndSet(false, true)) {
-                // Lock will never be released intentionally.
-                lock.writeLock().lock();
-
-                if (timeoutObj != null)
-                    cctx.time().removeTimeoutObject(timeoutObj);
-
-                boolean b = onCancelled();
-
-                assert b;
-
-                return true;
-            }
-
-            return false;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(EvictionFuture.class, this);
-        }
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
deleted file mode 100644
index cb454f8..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionRequest.java
+++ /dev/null
@@ -1,248 +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.apache.ignite.internal.processors.cache;
-
-import java.io.Externalizable;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collection;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
-import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-import org.jetbrains.annotations.NotNull;
-
-/**
- * Cache eviction request.
- */
-public class GridCacheEvictionRequest extends GridCacheMessage implements GridCacheDeployable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Future id. */
-    private long futId;
-
-    /** Entries to clear from near and backup nodes. */
-    @GridToStringInclude
-    @GridDirectCollection(CacheEvictionEntry.class)
-    private Collection<CacheEvictionEntry> entries;
-
-    /** Topology version. */
-    private AffinityTopologyVersion topVer;
-
-    /**
-     * Required by {@link Externalizable}.
-     */
-    public GridCacheEvictionRequest() {
-        // No-op.
-    }
-
-    /**
-     * @param cacheId Cache ID.
-     * @param futId Future id.
-     * @param size Size.
-     * @param topVer Topology version.
-     * @param addDepInfo Deployment info flag.
-     */
-    GridCacheEvictionRequest(int cacheId, long futId, int size, @NotNull AffinityTopologyVersion topVer,
-        boolean addDepInfo) {
-        assert futId > 0;
-        assert size > 0;
-        assert topVer.topologyVersion() > 0;
-
-        this.cacheId = cacheId;
-        this.futId = futId;
-        this.addDepInfo = addDepInfo;
-
-        entries = new ArrayList<>(size);
-
-        this.topVer = topVer;
-    }
-
-    /** {@inheritDoc}
-     * @param ctx*/
-    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
-        super.prepareMarshal(ctx);
-
-        if (entries != null) {
-            GridCacheContext cctx = ctx.cacheContext(cacheId);
-
-            for (CacheEvictionEntry e : entries) {
-                e.prepareMarshal(cctx);
-
-                if (addDepInfo)
-                    prepareObject(e.key().value(cctx.cacheObjectContext(), false), cctx);
-            }
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
-        super.finishUnmarshal(ctx, ldr);
-
-        if (entries != null) {
-            GridCacheContext cctx = ctx.cacheContext(cacheId);
-
-            for (CacheEvictionEntry e : entries)
-                e.finishUnmarshal(cctx, ldr);
-        }
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean addDeploymentInfo() {
-        return addDepInfo;
-    }
-
-    /**
-     * @return Future id.
-     */
-    long futureId() {
-        return futId;
-    }
-
-    /**
-     * @return Entries - {{Key, Version, Boolean (near or not)}, ...}.
-     */
-    Collection<CacheEvictionEntry> entries() {
-        return entries;
-    }
-
-    /**
-     * @return Topology version.
-     */
-    @Override public AffinityTopologyVersion topologyVersion() {
-        return topVer;
-    }
-
-    /**
-     * Add key to request.
-     *
-     * @param key Key to evict.
-     * @param ver Entry version.
-     * @param near {@code true} if key should be evicted from near cache.
-     */
-    void addKey(KeyCacheObject key, GridCacheVersion ver, boolean near) {
-        assert key != null;
-        assert ver != null;
-
-        entries.add(new CacheEvictionEntry(key, ver, near));
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean ignoreClassErrors() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
-        writer.setBuffer(buf);
-
-        if (!super.writeTo(buf, writer))
-            return false;
-
-        if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(directType(), fieldsCount()))
-                return false;
-
-            writer.onHeaderWritten();
-        }
-
-        switch (writer.state()) {
-            case 3:
-                if (!writer.writeCollection("entries", entries, MessageCollectionItemType.MSG))
-                    return false;
-
-                writer.incrementState();
-
-            case 4:
-                if (!writer.writeLong("futId", futId))
-                    return false;
-
-                writer.incrementState();
-
-            case 5:
-                if (!writer.writeMessage("topVer", topVer))
-                    return false;
-
-                writer.incrementState();
-
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!reader.beforeMessageRead())
-            return false;
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 3:
-                entries = reader.readCollection("entries", MessageCollectionItemType.MSG);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 4:
-                futId = reader.readLong("futId");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 5:
-                topVer = reader.readMessage("topVer");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-        }
-
-        return reader.afterMessageRead(GridCacheEvictionRequest.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public short directType() {
-        return 14;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte fieldsCount() {
-        return 6;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridCacheEvictionRequest.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
deleted file mode 100644
index 69ec09f..0000000
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionResponse.java
+++ /dev/null
@@ -1,225 +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.apache.ignite.internal.processors.cache;
-
-import java.io.Externalizable;
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.HashSet;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.internal.GridDirectCollection;
-import org.apache.ignite.internal.util.tostring.GridToStringInclude;
-import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.plugin.extensions.communication.MessageCollectionItemType;
-import org.apache.ignite.plugin.extensions.communication.MessageReader;
-import org.apache.ignite.plugin.extensions.communication.MessageWriter;
-
-/**
- * Cache eviction response.
- */
-public class GridCacheEvictionResponse extends GridCacheMessage {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Future ID. */
-    private long futId;
-
-    /** Rejected keys. */
-    @GridToStringInclude
-    @GridDirectCollection(KeyCacheObject.class)
-    private Collection<KeyCacheObject> rejectedKeys = new HashSet<>();
-
-    /** Flag to indicate whether request processing has finished with error. */
-    private boolean err;
-
-    /**
-     * Required by {@link Externalizable}.
-     */
-    public GridCacheEvictionResponse() {
-        // No-op.
-    }
-
-    /**
-     * @param cacheId Cache ID.
-     * @param futId Future ID.
-     */
-    GridCacheEvictionResponse(int cacheId, long futId) {
-        this(cacheId, futId, false);
-    }
-
-    /**
-     * @param cacheId Cache ID.
-     * @param futId Future ID.
-     * @param err {@code True} if request processing has finished with error.
-     */
-    GridCacheEvictionResponse(int cacheId, long futId, boolean err) {
-        this.cacheId = cacheId;
-        this.futId = futId;
-        this.err = err;
-    }
-
-    /** {@inheritDoc}
-     * @param ctx*/
-    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {
-        super.prepareMarshal(ctx);
-
-        prepareMarshalCacheObjects(rejectedKeys, ctx.cacheContext(cacheId));
-    }
-
-    /** {@inheritDoc} */
-    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
-        super.finishUnmarshal(ctx, ldr);
-
-        finishUnmarshalCacheObjects(rejectedKeys, ctx.cacheContext(cacheId), ldr);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean addDeploymentInfo() {
-        return false;
-    }
-
-    /**
-     * @return Future ID.
-     */
-    long futureId() {
-        return futId;
-    }
-
-    /**
-     * @return Rejected keys.
-     */
-    Collection<KeyCacheObject> rejectedKeys() {
-        return rejectedKeys;
-    }
-
-    /**
-     * Add rejected key to response.
-     *
-     * @param key Evicted key.
-     */
-    void addRejected(KeyCacheObject key) {
-        assert key != null;
-
-        rejectedKeys.add(key);
-    }
-
-    /**
-     * @return {@code True} if request processing has finished with error.
-     */
-    boolean evictError() {
-        return err;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean ignoreClassErrors() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
-        writer.setBuffer(buf);
-
-        if (!super.writeTo(buf, writer))
-            return false;
-
-        if (!writer.isHeaderWritten()) {
-            if (!writer.writeHeader(directType(), fieldsCount()))
-                return false;
-
-            writer.onHeaderWritten();
-        }
-
-        switch (writer.state()) {
-            case 3:
-                if (!writer.writeBoolean("err", err))
-                    return false;
-
-                writer.incrementState();
-
-            case 4:
-                if (!writer.writeLong("futId", futId))
-                    return false;
-
-                writer.incrementState();
-
-            case 5:
-                if (!writer.writeCollection("rejectedKeys", rejectedKeys, MessageCollectionItemType.MSG))
-                    return false;
-
-                writer.incrementState();
-
-        }
-
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
-        reader.setBuffer(buf);
-
-        if (!reader.beforeMessageRead())
-            return false;
-
-        if (!super.readFrom(buf, reader))
-            return false;
-
-        switch (reader.state()) {
-            case 3:
-                err = reader.readBoolean("err");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 4:
-                futId = reader.readLong("futId");
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-            case 5:
-                rejectedKeys = reader.readCollection("rejectedKeys", MessageCollectionItemType.MSG);
-
-                if (!reader.isLastRead())
-                    return false;
-
-                reader.incrementState();
-
-        }
-
-        return reader.afterMessageRead(GridCacheEvictionResponse.class);
-    }
-
-    /** {@inheritDoc} */
-    @Override public short directType() {
-        return 15;
-    }
-
-    /** {@inheritDoc} */
-    @Override public byte fieldsCount() {
-        return 6;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(GridCacheEvictionResponse.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
index 99878ec..fdd29e4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheIoManager.java
@@ -523,20 +523,6 @@ public class GridCacheIoManager extends GridCacheSharedManagerAdapter {
         GridCacheContext ctx = cctx.cacheContext(msg.cacheId());
 
         switch (msg.directType()) {
-            case 14: {
-                GridCacheEvictionRequest req = (GridCacheEvictionRequest)msg;
-
-                GridCacheEvictionResponse res = new GridCacheEvictionResponse(
-                    ctx.cacheId(),
-                    req.futureId(),
-                    req.classError() != null
-                );
-
-                sendResponseOnFailedMessage(nodeId, res, cctx, ctx.ioPolicy());
-            }
-
-            break;
-
             case 30: {
                 GridDhtLockRequest req = (GridDhtLockRequest)msg;
 


[24/57] [abbrv] ignite git commit: IGNITE-4534 - Added offheap evictions

Posted by ag...@apache.org.
IGNITE-4534 - Added offheap evictions


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

Branch: refs/heads/ignite-3477-debug
Commit: ff5b3e16850e503b79a13c44b667140d23c1f080
Parents: baa3835
Author: Ivan Rakov <iv...@gmail.com>
Authored: Mon Apr 10 19:23:43 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 19:23:43 2017 +0300

----------------------------------------------------------------------
 .../configuration/DataPageEvictionMode.java     |  32 +++
 .../MemoryPolicyConfiguration.java              |  70 ++++++
 .../ignite/internal/pagemem/PageSupport.java    |  10 +
 .../pagemem/impl/PageMemoryNoStoreImpl.java     |   8 +
 .../internal/pagemem/impl/PageNoStoreImpl.java  |   0
 .../cache/CacheOffheapEvictionManager.java      |   6 +-
 .../processors/cache/GridCacheAdapter.java      |   2 +
 .../processors/cache/GridCacheEntryEx.java      |   5 +-
 .../cache/GridCacheEvictionManager.java         |   2 +-
 .../processors/cache/GridCacheMapEntry.java     |  32 ++-
 .../cache/IgniteCacheOffheapManagerImpl.java    |  34 ++-
 .../processors/cache/database/CacheDataRow.java |   5 +
 .../cache/database/CacheDataRowAdapter.java     | 116 ++++++++-
 .../IgniteCacheDatabaseSharedManager.java       | 126 ++++++++--
 .../processors/cache/database/MemoryPolicy.java |  19 +-
 .../evict/FairFifoPageEvictionTracker.java      |  74 ++++++
 .../database/evict/NoOpPageEvictionTracker.java |  50 ++++
 .../evict/PageAbstractEvictionTracker.java      | 243 +++++++++++++++++++
 .../database/evict/PageEvictionTracker.java     |  52 ++++
 .../evict/Random2LruPageEvictionTracker.java    | 180 ++++++++++++++
 .../evict/RandomLruPageEvictionTracker.java     | 157 ++++++++++++
 .../cache/database/freelist/FreeListImpl.java   |  62 +++--
 .../cache/database/tree/io/DataPageIO.java      | 110 ++++++++-
 .../dht/atomic/GridDhtAtomicCache.java          |   2 +
 .../cache/distributed/near/GridNearTxLocal.java |   2 +
 .../distributed/near/GridNearTxRemote.java      |   4 +-
 .../local/atomic/GridLocalAtomicCache.java      |   6 +-
 .../cacheobject/IgniteCacheObjectProcessor.java |   7 -
 .../IgniteCacheObjectProcessorImpl.java         |  16 --
 .../processors/cache/GridCacheTestEntryEx.java  |   2 +-
 .../dht/GridCacheDhtEntrySelfTest.java          |   4 +-
 .../paged/PageEvictionAbstractTest.java         | 124 ++++++++++
 .../paged/PageEvictionMultinodeTest.java        | 110 +++++++++
 .../paged/PageEvictionReadThroughTest.java      | 140 +++++++++++
 .../paged/PageEvictionTouchOrderTest.java       | 109 +++++++++
 .../paged/PageEvictionWithRebalanceTest.java    |  81 +++++++
 .../Random2LruPageEvictionMultinodeTest.java    |  30 +++
 ...Random2LruPageEvictionWithRebalanceTest.java |  30 +++
 .../RandomLruPageEvictionMultinodeTest.java     |  30 +++
 .../RandomLruPageEvictionWithRebalanceTest.java |  30 +++
 .../cache/eviction/paged/TestObject.java        |  78 ++++++
 .../database/FreeListImplSelfTest.java          |  13 +-
 .../IgniteCacheEvictionSelfTestSuite.java       |  13 +
 .../processors/query/h2/opt/GridH2Row.java      |   5 +
 44 files changed, 2130 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java b/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
new file mode 100644
index 0000000..bada68e
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/DataPageEvictionMode.java
@@ -0,0 +1,32 @@
+/*
+* 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.apache.ignite.configuration;
+
+/**
+ * Enumeration defines data page eviction modes.
+ */
+public enum DataPageEvictionMode {
+    /** Disabled. */
+    DISABLED,
+
+    /** Random lru. */
+    RANDOM_LRU,
+
+    /** Random 2-lru. */
+    RANDOM_2_LRU
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
index 2add64f..d6203c6 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
@@ -19,6 +19,8 @@ package org.apache.ignite.configuration;
 import java.io.Serializable;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
+import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
+import org.apache.ignite.internal.processors.cache.database.tree.io.DataPageIO;
 
 /**
  * Configuration bean used for creating {@link MemoryPolicy} instances.
@@ -43,6 +45,18 @@ public final class MemoryPolicyConfiguration implements Serializable {
         return name;
     }
 
+    /** Algorithm for per-page eviction. If {@link DataPageEvictionMode#DISABLED} set, eviction is not performed. */
+    private DataPageEvictionMode pageEvictionMode = DataPageEvictionMode.DISABLED;
+
+    /** Allocation of new {@link DataPageIO} pages is stopped when this percentage of pages are allocated. */
+    private double evictionThreshold = 0.9;
+
+    /** Allocation of new {@link DataPageIO} pages is stopped by maintaining this amount of empty pages in
+     * corresponding {@link FreeList} bucket. Pages get into the bucket through evicting all data entries one by one.
+     * Higher load and contention require larger pool size.
+     */
+    private int emptyPagesPoolSize = 100;
+
     /**
      * @param name Unique name of MemoryPolicy.
      */
@@ -83,4 +97,60 @@ public final class MemoryPolicyConfiguration implements Serializable {
 
         return this;
     }
+
+    /**
+     * Gets data page eviction mode.
+     */
+    public DataPageEvictionMode getPageEvictionMode() {
+        return pageEvictionMode;
+    }
+
+    /**
+     * Sets data page eviction mode.
+     *
+     * @param evictionMode Eviction mode.
+     */
+    public MemoryPolicyConfiguration setPageEvictionMode(DataPageEvictionMode evictionMode) {
+        pageEvictionMode = evictionMode;
+
+        return this;
+    }
+
+    /**
+     * Gets data page eviction threshold.
+     *
+     * @return Data page eviction threshold.
+     */
+    public double getEvictionThreshold() {
+        return evictionThreshold;
+    }
+
+    /**
+     * Sets data page eviction threshold.
+     *
+     * @param evictionThreshold Eviction threshold.
+     */
+    public MemoryPolicyConfiguration setEvictionThreshold(double evictionThreshold) {
+        this.evictionThreshold = evictionThreshold;
+
+        return this;
+    }
+
+    /**
+     * Gets empty pages pool size.
+     */
+    public int getEmptyPagesPoolSize() {
+        return emptyPagesPoolSize;
+    }
+
+    /**
+     * Sets empty pages pool size.
+     *
+     * @param emptyPagesPoolSize Empty pages pool size.
+     */
+    public MemoryPolicyConfiguration setEmptyPagesPoolSize(int emptyPagesPoolSize) {
+        this.emptyPagesPoolSize = emptyPagesPoolSize;
+
+        return this;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
index 8076f28..0f39058 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/PageSupport.java
@@ -53,6 +53,16 @@ public interface PageSupport {
     public long readLock(int cacheId, long pageId, long page);
 
     /**
+     * Obtains read lock without checking page tag.
+     *
+     * @param cacheId Cache ID.
+     * @param pageId Page ID.
+     * @param page Page pointer.
+     * @return Pointer for reading the page.
+     */
+    public long readLockForce(int cacheId, long pageId, long page);
+
+    /**
      * Releases locked page.
      *
      * @param cacheId Cache ID.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
index f24113c..7134cff 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageMemoryNoStoreImpl.java
@@ -416,6 +416,14 @@ public class PageMemoryNoStoreImpl implements PageMemory {
     }
 
     /** {@inheritDoc} */
+    public long readLockForce(int cacheId, long pageId, long page) {
+        if (rwLock.readLock(page + LOCK_OFFSET, -1))
+            return page + PAGE_OVERHEAD;
+
+        return 0L;
+    }
+
+    /** {@inheritDoc} */
     @Override public void readUnlock(int cacheId, long pageId, long page) {
         rwLock.readUnlock(page + LOCK_OFFSET);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/impl/PageNoStoreImpl.java
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
index 99df39d..f8e9f32 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
@@ -27,10 +27,6 @@ import org.apache.ignite.internal.util.typedef.internal.U;
 import org.jetbrains.annotations.Nullable;
 
 /**
- * TODO GG-11140.
- *
- * Temporary implementation, ignores configured EvictionPolicy, evictions to be reconsidered as
- * part of GG-11140.
  *
  */
 public class CacheOffheapEvictionManager extends GridCacheManagerAdapter implements CacheEvictionManager {
@@ -51,7 +47,7 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter impleme
                 return;
             }
 
-            boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null);
+            boolean evicted = e.evictInternal(GridCacheVersionManager.EVICT_VER, null, false);
 
             if (evicted)
                 cctx.cache().removeEntry(e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 9a6ff11..d791b7c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -2073,6 +2073,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                                             GridCacheEntryEx entry = null;
 
                                             try {
+                                                ctx.shared().database().ensureFreeSpace(ctx.memoryPolicy());
+
                                                 entry = entryEx(key);
 
                                                 entry.unswap();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 99f9744..2066342 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -213,11 +213,12 @@ public interface GridCacheEntryEx {
     /**
      * @param obsoleteVer Version for eviction.
      * @param filter Optional filter.
+     * @param evictOffheap Evict offheap value flag.
      * @return {@code True} if entry could be evicted.
      * @throws IgniteCheckedException In case of error.
      */
-    public boolean evictInternal(GridCacheVersion obsoleteVer, @Nullable CacheEntryPredicate[] filter)
-        throws IgniteCheckedException;
+    public boolean evictInternal(GridCacheVersion obsoleteVer, @Nullable CacheEntryPredicate[] filter,
+        boolean evictOffheap) throws IgniteCheckedException;
 
     /**
      * Evicts entry when batch evict is performed. When called, does not write entry data to swap, but instead

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
index 26f37a7..0deae07 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEvictionManager.java
@@ -135,7 +135,7 @@ public class GridCacheEvictionManager extends GridCacheManagerAdapter implements
 
         boolean hasVal = recordable && entry.hasValue();
 
-        boolean evicted = entry.evictInternal(obsoleteVer, filter);
+        boolean evicted = entry.evictInternal(obsoleteVer, filter, false);
 
         if (evicted) {
             // Remove manually evicted entry from policy.

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 7fad9f5..9e2cd70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -43,6 +43,7 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.GridCacheUpdateAtomicResult.UpdateOutcome;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRowAdapter;
+import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheEntry;
 import org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtLocalPartition;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicAbstractUpdateFuture;
@@ -809,6 +810,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         boolean touch = false;
 
         try {
+            ensureFreeSpace();
+
             synchronized (this) {
                 long ttl = ttlExtras();
 
@@ -908,6 +911,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
         long updateCntr0;
 
+        ensureFreeSpace();
+
         synchronized (this) {
             checkObsolete();
 
@@ -1641,6 +1646,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
 
         AtomicCacheUpdateClosure c;
 
+        if (!primary && !isNear())
+            ensureFreeSpace();
+
         synchronized (this) {
             checkObsolete();
 
@@ -2567,6 +2575,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         GridDrType drType,
         boolean fromStore
     ) throws IgniteCheckedException, GridCacheEntryRemovedException {
+        ensureFreeSpace();
+
         synchronized (this) {
             checkObsolete();
 
@@ -3378,6 +3388,16 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /**
+     * Evicts necessary number of data pages if per-page eviction is configured in current {@link MemoryPolicy}.
+     */
+    private void ensureFreeSpace() throws IgniteCheckedException {
+        // Deadlock alert: evicting data page causes removing (and locking) all entries on the page one by one.
+        assert !Thread.holdsLock(this);
+
+        cctx.shared().database().ensureFreeSpace(cctx.memoryPolicy());
+    }
+
+    /**
      * @return Entry which holds key, value and version.
      */
     private synchronized <K, V> CacheEntryImplEx<K, V> wrapVersionedWithValue() {
@@ -3387,8 +3407,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public boolean evictInternal(GridCacheVersion obsoleteVer, @Nullable CacheEntryPredicate[] filter)
+    @Override public boolean evictInternal(
+        GridCacheVersion obsoleteVer,
+        @Nullable CacheEntryPredicate[] filter,
+        boolean evictOffheap)
         throws IgniteCheckedException {
+
         boolean marked = false;
 
         try {
@@ -3411,6 +3435,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                         // Nullify value after swap.
                         value(null);
 
+                        if (evictOffheap)
+                            removeValue();
+
                         marked = true;
 
                         return true;
@@ -3451,6 +3478,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
                             // Nullify value after swap.
                             value(null);
 
+                            if (evictOffheap)
+                                removeValue();
+
                             marked = true;
 
                             return true;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
index e022e57..73edbe1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapManagerImpl.java
@@ -28,6 +28,7 @@ import javax.cache.Cache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.configuration.DataPageEvictionMode;
 import org.apache.ignite.internal.NodeStoppingException;
 import org.apache.ignite.internal.pagemem.FullPageId;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
@@ -37,7 +38,6 @@ import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRowAdapter;
 import org.apache.ignite.internal.processors.cache.database.CacheSearchRow;
-import org.apache.ignite.internal.processors.cache.database.IgniteCacheDatabaseSharedManager;
 import org.apache.ignite.internal.processors.cache.database.RootPage;
 import org.apache.ignite.internal.processors.cache.database.RowStore;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
@@ -965,8 +965,12 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
             CacheObject val,
             GridCacheVersion ver,
             long expireTime,
-            @Nullable CacheDataRow oldRow) throws IgniteCheckedException {
-            DataRow dataRow = new DataRow(key, val, ver, partId, expireTime);
+            @Nullable CacheDataRow oldRow) throws IgniteCheckedException
+        {
+            int cacheId = cctx.memoryPolicy().config().getPageEvictionMode() == DataPageEvictionMode.DISABLED ?
+                0 : cctx.cacheId();
+
+            DataRow dataRow = new DataRow(key, val, ver, partId, expireTime, cacheId);
 
             if (canUpdateOldRow(oldRow, dataRow) && rowStore.updateRow(oldRow.link(), dataRow))
                 dataRow.link(oldRow.link());
@@ -997,7 +1001,10 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
                 throw new NodeStoppingException("Operation has been cancelled (node is stopping).");
 
             try {
-                DataRow dataRow = new DataRow(key, val, ver, p, expireTime);
+                int cacheId = cctx.memoryPolicy().config().getPageEvictionMode() != DataPageEvictionMode.DISABLED ?
+                    cctx.cacheId() : 0;
+
+                DataRow dataRow = new DataRow(key, val, ver, p, expireTime, cacheId);
 
                 CacheObjectContext coCtx = cctx.cacheObjectContext();
 
@@ -1140,9 +1147,12 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
 
             CacheDataRow row = dataTree.findOne(new SearchRow(key), CacheDataRowAdapter.RowData.NO_KEY);
 
-            if (row != null)
+            if (row != null) {
                 row.key(key);
 
+                cctx.memoryPolicy().evictionTracker().touchPage(row.link());
+            }
+
             return row;
         }
 
@@ -1345,7 +1355,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
          * @param part Partition.
          * @param expireTime Expire time.
          */
-        DataRow(KeyCacheObject key, CacheObject val, GridCacheVersion ver, int part, long expireTime) {
+        DataRow(KeyCacheObject key, CacheObject val, GridCacheVersion ver, int part, long expireTime, int cacheId) {
             super(0);
 
             this.hash = key.hashCode();
@@ -1354,6 +1364,7 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
             this.ver = ver;
             this.part = part;
             this.expireTime = expireTime;
+            this.cacheId = cacheId;
         }
 
         /** {@inheritDoc} */
@@ -1473,6 +1484,9 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
                     if (data.nextLink() == 0) {
                         long addr = pageAddr + data.offset();
 
+                        if (cctx.memoryPolicy().config().getPageEvictionMode() != DataPageEvictionMode.DISABLED)
+                            addr += 4; // Skip cache id.
+
                         final int len = PageUtils.getInt(addr, 0);
 
                         int lenCmp = Integer.compare(len, bytes.length);
@@ -1672,6 +1686,14 @@ public class IgniteCacheOffheapManagerImpl extends GridCacheManagerAdapter imple
         @Override public int getHash(long pageAddr, int idx) {
             return PageUtils.getInt(pageAddr, offset(idx) + 8);
         }
+
+        /** {@inheritDoc} */
+        @Override public void visit(long pageAddr, IgniteInClosure<CacheSearchRow> c) {
+            int cnt = getCount(pageAddr);
+
+            for (int i = 0; i < cnt; i++)
+                c.apply(new CacheDataRowAdapter(getLink(pageAddr, i)));
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRow.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRow.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRow.java
index cc26b21..e0076d5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRow.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRow.java
@@ -36,6 +36,11 @@ public interface CacheDataRow extends CacheSearchRow {
     public GridCacheVersion version();
 
     /**
+     * @return Cache id. Stored only if memory policy with configured per-page eviction is used.
+     */
+    public int cacheId();
+
+    /**
      * @return Expire time.
      */
     public long expireTime();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
index eca59d6..afeada5 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/CacheDataRowAdapter.java
@@ -19,12 +19,14 @@ package org.apache.ignite.internal.processors.cache.database;
 
 import java.nio.ByteBuffer;
 import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.configuration.DataPageEvictionMode;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
 import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.processors.cache.CacheObject;
 import org.apache.ignite.internal.processors.cache.CacheObjectContext;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.IncompleteCacheObject;
 import org.apache.ignite.internal.processors.cache.IncompleteObject;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
@@ -36,6 +38,7 @@ import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.tostring.GridToStringInclude;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.jetbrains.annotations.Nullable;
 
 import static org.apache.ignite.internal.pagemem.PageIdUtils.itemId;
 import static org.apache.ignite.internal.pagemem.PageIdUtils.pageId;
@@ -63,6 +66,10 @@ public class CacheDataRowAdapter implements CacheDataRow {
     @GridToStringInclude
     protected GridCacheVersion ver;
 
+    /** */
+    @GridToStringInclude
+    protected int cacheId;
+
     /**
      * @param link Link.
      */
@@ -92,14 +99,35 @@ public class CacheDataRowAdapter implements CacheDataRow {
      * @throws IgniteCheckedException If failed.
      */
     public final void initFromLink(GridCacheContext<?, ?> cctx, RowData rowData) throws IgniteCheckedException {
-        assert cctx != null : "cctx";
+        initFromLink(cctx, cctx.shared(), cctx.memoryPolicy().pageMemory(), rowData);
+    }
+
+    /**
+     * Read row from data pages.
+     * Can be called with cctx == null, if cache instance is unknown, but its ID is stored in the data row.
+     *
+     * @param cctx Cctx.
+     * @param sharedCtx Shared context.
+     * @param pageMem Page memory.
+     * @param rowData Row data.
+     */
+    public final void initFromLink(
+        @Nullable GridCacheContext<?, ?> cctx,
+        GridCacheSharedContext<?, ?> sharedCtx,
+        PageMemory pageMem,
+        RowData rowData)
+        throws IgniteCheckedException {
         assert link != 0 : "link";
         assert key == null : "key";
 
-        final CacheObjectContext coctx = cctx.cacheObjectContext();
-        final PageMemory pageMem = cctx.memoryPolicy().pageMemory();
+        CacheObjectContext coctx = null;
+
+        if (cctx != null) {
+            cacheId = cctx.memoryPolicy().config().getPageEvictionMode() == DataPageEvictionMode.DISABLED ?
+                cctx.cacheId() : 0; // Force cacheId reading for evictable memory policies.
 
-        final int cacheId = cctx.cacheId();
+            coctx = cctx.cacheObjectContext();
+        }
 
         long nextLink = link;
         IncompleteObject<?> incomplete = null;
@@ -126,7 +154,7 @@ public class CacheDataRowAdapter implements CacheDataRow {
                     if (first) {
                         if (nextLink == 0) {
                             // Fast path for a single page row.
-                            readFullRow(coctx, pageAddr + data.offset(), rowData);
+                            readFullRow(sharedCtx, coctx, pageAddr + data.offset(), rowData);
 
                             return;
                         }
@@ -141,7 +169,7 @@ public class CacheDataRowAdapter implements CacheDataRow {
 
                     boolean keyOnly = rowData == RowData.KEY_ONLY;
 
-                    incomplete = readFragment(coctx, buf, keyOnly, incomplete);
+                    incomplete = readFragment(sharedCtx, coctx, buf, keyOnly, incomplete);
 
                     if (keyOnly && key != null)
                         return;
@@ -168,11 +196,24 @@ public class CacheDataRowAdapter implements CacheDataRow {
      * @return Read object.
      */
     private IncompleteObject<?> readFragment(
+        GridCacheSharedContext<?, ?> sharedCtx,
         CacheObjectContext coctx,
         ByteBuffer buf,
         boolean keyOnly,
         IncompleteObject<?> incomplete
     ) throws IgniteCheckedException {
+        if (cacheId == 0) {
+            incomplete = readIncompleteCacheId(buf, incomplete);
+
+            if (cacheId == 0)
+                return incomplete;
+
+            incomplete = null;
+        }
+
+        if (coctx == null)
+            coctx = sharedCtx.cacheContext(cacheId).cacheObjectContext();
+
         // Read key.
         if (key == null) {
             incomplete = readIncompleteKey(coctx, buf, (IncompleteCacheObject)incomplete);
@@ -215,9 +256,23 @@ public class CacheDataRowAdapter implements CacheDataRow {
      * @param rowData Required row data.
      * @throws IgniteCheckedException If failed.
      */
-    private void readFullRow(CacheObjectContext coctx, long addr, RowData rowData) throws IgniteCheckedException {
+    private void readFullRow(
+        GridCacheSharedContext<?, ?> sharedCtx,
+        CacheObjectContext coctx,
+        long addr,
+        RowData rowData)
+        throws IgniteCheckedException {
         int off = 0;
 
+        if (cacheId == 0) {
+            cacheId = PageUtils.getInt(addr, off);
+
+            off += 4;
+        }
+
+        if (coctx == null)
+            coctx = sharedCtx.cacheContext(cacheId).cacheObjectContext();
+
         int len = PageUtils.getInt(addr, off);
         off += 4;
 
@@ -255,6 +310,44 @@ public class CacheDataRowAdapter implements CacheDataRow {
     }
 
     /**
+     * @param buf Buffer.
+     * @param incomplete Incomplete.
+     */
+    private IncompleteObject<?> readIncompleteCacheId(
+        ByteBuffer buf,
+        IncompleteObject<?> incomplete
+    ) {
+        if (incomplete == null) {
+            int remaining = buf.remaining();
+
+            if (remaining == 0)
+                return null;
+
+            int size = 4;
+
+            if (remaining >= size) {
+                cacheId = buf.getInt();
+
+                return null;
+            }
+
+            incomplete = new IncompleteObject<>(new byte[size]);
+        }
+
+        incomplete.readData(buf);
+
+        if (incomplete.isReady()) {
+            final ByteBuffer timeBuf = ByteBuffer.wrap(incomplete.data());
+
+            timeBuf.order(buf.order());
+
+            cacheId = timeBuf.getInt();
+        }
+
+        return incomplete;
+    }
+
+    /**
      * @param coctx Cache object context.
      * @param buf Buffer.
      * @param incomplete Incomplete object.
@@ -313,7 +406,7 @@ public class CacheDataRowAdapter implements CacheDataRow {
     private IncompleteObject<?> readIncompleteExpireTime(
         ByteBuffer buf,
         IncompleteObject<?> incomplete
-    ) throws IgniteCheckedException {
+    ) {
         if (incomplete == null) {
             int remaining = buf.remaining();
 
@@ -414,13 +507,18 @@ public class CacheDataRowAdapter implements CacheDataRow {
     /**
      * @param key Key.
      */
-    public void key(KeyCacheObject key) {
+    @Override public void key(KeyCacheObject key) {
         assert key != null;
 
         this.key = key;
     }
 
     /** {@inheritDoc} */
+    @Override public int cacheId() {
+        return cacheId;
+    }
+
+    /** {@inheritDoc} */
     @Override public CacheObject value() {
         assert val != null : "Value is not ready: " + this;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
index d61130b..2d2295c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/IgniteCacheDatabaseSharedManager.java
@@ -29,6 +29,7 @@ import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.MemoryMetrics;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.configuration.DataPageEvictionMode;
 import org.apache.ignite.configuration.MemoryConfiguration;
 import org.apache.ignite.configuration.MemoryPolicyConfiguration;
 import org.apache.ignite.internal.GridKernalContext;
@@ -40,7 +41,13 @@ import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.snapshot.StartFullSnapshotAckDiscoveryMessage;
 import org.apache.ignite.internal.pagemem.impl.PageMemoryNoStoreImpl;
 import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheMapEntry;
 import org.apache.ignite.internal.processors.cache.GridCacheSharedManagerAdapter;
+import org.apache.ignite.internal.processors.cache.database.evict.FairFifoPageEvictionTracker;
+import org.apache.ignite.internal.processors.cache.database.evict.NoOpPageEvictionTracker;
+import org.apache.ignite.internal.processors.cache.database.evict.PageEvictionTracker;
+import org.apache.ignite.internal.processors.cache.database.evict.Random2LruPageEvictionTracker;
+import org.apache.ignite.internal.processors.cache.database.evict.RandomLruPageEvictionTracker;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeList;
 import org.apache.ignite.internal.processors.cache.database.freelist.FreeListImpl;
 import org.apache.ignite.internal.processors.cache.database.tree.reuse.ReuseList;
@@ -102,7 +109,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
             initPageMemoryPolicies(dbCfg);
 
-            startPageMemoryPools();
+            startMemoryPolicies();
 
             initPageMemoryDataStructures(dbCfg);
         }
@@ -123,8 +130,8 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
             FreeListImpl freeList = new FreeListImpl(0,
                     cctx.igniteInstanceName(),
-                    memPlc.pageMemory(),
                     memMetrics,
+                    memPlc,
                     null,
                     cctx.wal(),
                     0L,
@@ -148,9 +155,12 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     /**
      *
      */
-    private void startPageMemoryPools() {
-        for (MemoryPolicy memPlc : memPlcMap.values())
+    private void startMemoryPolicies() {
+        for (MemoryPolicy memPlc : memPlcMap.values()) {
             memPlc.pageMemory().start();
+
+            memPlc.evictionTracker().start();
+        }
     }
 
     /**
@@ -205,9 +215,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
             for (MemoryPolicyConfiguration memPlcCfg : memPlcsCfgs) {
                 MemoryMetricsImpl memMetrics = new MemoryMetricsImpl(memPlcCfg);
 
-                PageMemory pageMem = initMemory(dbCfg, memPlcCfg, memMetrics);
-
-                MemoryPolicy memPlc = new MemoryPolicy(pageMem, memMetrics, memPlcCfg);
+                MemoryPolicy memPlc = initMemory(dbCfg, memPlcCfg, memMetrics);
 
                 memPlcMap.put(memPlcCfg.getName(), memPlc);
 
@@ -222,7 +230,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
         MemoryMetricsImpl sysMemMetrics = new MemoryMetricsImpl(sysPlcCfg);
 
-        memPlcMap.put(SYSTEM_MEMORY_POLICY_NAME, new MemoryPolicy(initMemory(dbCfg, sysPlcCfg, sysMemMetrics), sysMemMetrics, sysPlcCfg));
+        memPlcMap.put(SYSTEM_MEMORY_POLICY_NAME, initMemory(dbCfg, sysPlcCfg, sysMemMetrics));
 
         memMetricsMap.put(SYSTEM_MEMORY_POLICY_NAME, sysMemMetrics);
     }
@@ -253,9 +261,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
      * @param memMetrics MemoryMetrics instance.
      */
     private MemoryPolicy createDefaultMemoryPolicy(MemoryConfiguration dbCfg, MemoryPolicyConfiguration memPlcCfg, MemoryMetricsImpl memMetrics) {
-        PageMemory pageMem = initMemory(dbCfg, memPlcCfg, memMetrics);
-
-        return new MemoryPolicy(pageMem, memMetrics, memPlcCfg);
+        return initMemory(dbCfg, memPlcCfg, memMetrics);
     }
 
     /**
@@ -285,6 +291,8 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
                 checkPolicyName(plcCfg.getName(), plcNames);
 
                 checkPolicySize(plcCfg);
+
+                checkPolicyEvictionProperties(plcCfg, dbCfg);
             }
         }
 
@@ -307,6 +315,7 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
 
     /**
      * @param plcCfg MemoryPolicyConfiguration to validate.
+     * @throws IgniteCheckedException If config is invalid.
      */
     private static void checkPolicySize(MemoryPolicyConfiguration plcCfg) throws IgniteCheckedException {
         if (plcCfg.getSize() < MIN_PAGE_MEMORY_SIZE)
@@ -314,8 +323,35 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     }
 
     /**
+     * @param plcCfg MemoryPolicyConfiguration to validate.
+     * @param dbCfg Memory configuration.
+     * @throws IgniteCheckedException If config is invalid.
+     */
+    protected void checkPolicyEvictionProperties(MemoryPolicyConfiguration plcCfg, MemoryConfiguration dbCfg)
+        throws IgniteCheckedException {
+        if (plcCfg.getPageEvictionMode() == DataPageEvictionMode.DISABLED)
+            return;
+
+        if (plcCfg.getEvictionThreshold() < 0.5 || plcCfg.getEvictionThreshold() > 0.999) {
+            throw new IgniteCheckedException("Page eviction threshold must be between 0.5 and 0.999: " +
+                plcCfg.getName());
+        }
+
+        if (plcCfg.getEmptyPagesPoolSize() <= 10)
+            throw new IgniteCheckedException("Evicted pages pool size should be greater than 10: " + plcCfg.getName());
+
+        long maxPoolSize = plcCfg.getSize() / dbCfg.getPageSize() / 10;
+
+        if (plcCfg.getEmptyPagesPoolSize() >= maxPoolSize) {
+            throw new IgniteCheckedException("Evicted pages pool size should be lesser than " + maxPoolSize +
+                ": " + plcCfg.getName());
+        }
+    }
+
+    /**
      * @param plcName MemoryPolicy name to validate.
      * @param observedNames Names of MemoryPolicies observed before.
+     * @throws IgniteCheckedException If config is invalid.
      */
     private static void checkPolicyName(String plcName, Set<String> observedNames) throws IgniteCheckedException {
         if (plcName == null || plcName.isEmpty())
@@ -406,8 +442,11 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     /** {@inheritDoc} */
     @Override protected void stop0(boolean cancel) {
         if (memPlcMap != null) {
-            for (MemoryPolicy memPlc : memPlcMap.values())
+            for (MemoryPolicy memPlc : memPlcMap.values()) {
                 memPlc.pageMemory().stop();
+
+                memPlc.evictionTracker().stop();
+            }
         }
     }
 
@@ -512,12 +551,49 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
     }
 
     /**
+     * See {@link GridCacheMapEntry#ensureFreeSpace()}
+     *
+     * @param memPlc Memory policy.
+     */
+    public void ensureFreeSpace(MemoryPolicy memPlc) throws IgniteCheckedException {
+        if (memPlc == null)
+            return;
+
+        MemoryPolicyConfiguration plcCfg = memPlc.config();
+
+        if (plcCfg.getPageEvictionMode() == DataPageEvictionMode.DISABLED)
+            return;
+
+        long memorySize = plcCfg.getSize();
+
+        PageMemory pageMem = memPlc.pageMemory();
+
+        int sysPageSize = pageMem.systemPageSize();
+
+        FreeListImpl freeListImpl = freeListMap.get(plcCfg.getName());
+
+        for (;;) {
+            long allocatedPagesCnt = pageMem.loadedPages();
+
+            int emptyDataPagesCnt = freeListImpl.emptyDataPages();
+
+            boolean shouldEvict = allocatedPagesCnt > (memorySize / sysPageSize * plcCfg.getEvictionThreshold()) &&
+                emptyDataPagesCnt < plcCfg.getEmptyPagesPoolSize();
+
+            if (shouldEvict)
+                memPlc.evictionTracker().evictDataPage();
+            else
+                break;
+        }
+    }
+
+    /**
      * @param dbCfg memory configuration with common parameters.
      * @param plc memory policy with PageMemory specific parameters.
      * @param memMetrics {@link MemoryMetrics} object to collect memory usage metrics.
-     * @return Page memory instance.
+     * @return Memory policy instance.
      */
-    private PageMemory initMemory(MemoryConfiguration dbCfg, MemoryPolicyConfiguration plc, MemoryMetricsImpl memMetrics) {
+    private MemoryPolicy initMemory(MemoryConfiguration dbCfg, MemoryPolicyConfiguration plc, MemoryMetricsImpl memMetrics) {
         long[] sizes = calculateFragmentSizes(
                 dbCfg.getConcurrencyLevel(),
                 plc.getSize());
@@ -532,7 +608,27 @@ public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdap
                 true,
                 sizes);
 
-        return createPageMemory(memProvider, dbCfg.getPageSize(), memMetrics);
+        PageMemory pageMem = createPageMemory(memProvider, dbCfg.getPageSize(), memMetrics);
+
+        return new MemoryPolicy(pageMem, plc, memMetrics, createPageEvictionTracker(plc, pageMem));
+    }
+
+    /**
+     * @param plc Memory Policy Configuration.
+     * @param pageMem Page memory.
+     */
+    private PageEvictionTracker createPageEvictionTracker(MemoryPolicyConfiguration plc, PageMemory pageMem) {
+        if (Boolean.getBoolean("override.fair.fifo.page.eviction.tracker"))
+            return new FairFifoPageEvictionTracker(pageMem, plc, cctx);
+
+        switch (plc.getPageEvictionMode()) {
+            case RANDOM_LRU:
+                return new RandomLruPageEvictionTracker(pageMem, plc, cctx);
+            case RANDOM_2_LRU:
+                return new Random2LruPageEvictionTracker(pageMem, plc, cctx);
+            default:
+                return new NoOpPageEvictionTracker();
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicy.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicy.java
index be23b38..90e5ac1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/MemoryPolicy.java
@@ -19,6 +19,7 @@ package org.apache.ignite.internal.processors.cache.database;
 import org.apache.ignite.MemoryMetrics;
 import org.apache.ignite.configuration.MemoryPolicyConfiguration;
 import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.processors.cache.database.evict.PageEvictionTracker;
 
 /**
  * Memory policy provides access to objects configured with {@link MemoryPolicyConfiguration} configuration.
@@ -33,15 +34,24 @@ public class MemoryPolicy {
     /** */
     private final MemoryPolicyConfiguration cfg;
 
+    /** */
+    private final PageEvictionTracker evictionTracker;
+
     /**
      * @param pageMem PageMemory instance.
      * @param memMetrics MemoryMetrics instance.
      * @param cfg Configuration of given MemoryPolicy.
+     * @param evictionTracker Eviction tracker.
      */
-    public MemoryPolicy(PageMemory pageMem, MemoryMetrics memMetrics, MemoryPolicyConfiguration cfg) {
+    public MemoryPolicy(
+        PageMemory pageMem,
+        MemoryPolicyConfiguration cfg,
+        MemoryMetrics memMetrics,
+        PageEvictionTracker evictionTracker) {
         this.pageMem = pageMem;
         this.memMetrics = memMetrics;
         this.cfg = cfg;
+        this.evictionTracker = evictionTracker;
     }
 
     /**
@@ -64,4 +74,11 @@ public class MemoryPolicy {
     public MemoryMetrics memoryMetrics() {
         return memMetrics;
     }
+
+    /**
+     *
+     */
+    public PageEvictionTracker evictionTracker() {
+        return evictionTracker;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/FairFifoPageEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/FairFifoPageEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/FairFifoPageEvictionTracker.java
new file mode 100644
index 0000000..8847013
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/FairFifoPageEvictionTracker.java
@@ -0,0 +1,74 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import java.util.LinkedList;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.internal.pagemem.PageIdUtils;
+import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+
+/**
+ * On-heap FIFO page eviction tracker. Only for test purposes.
+ */
+public class FairFifoPageEvictionTracker extends PageAbstractEvictionTracker {
+    /** Page usage deque. */
+    private final LinkedList<Integer> pageUsageList = new LinkedList<>();
+
+    /**
+     * @param pageMem Page memory.
+     * @param plcCfg Memory policy configuration.
+     * @param sharedCtx Shared context.
+     */
+    public FairFifoPageEvictionTracker(PageMemory pageMem,
+        MemoryPolicyConfiguration plcCfg,
+        GridCacheSharedContext sharedCtx) {
+        super(pageMem, plcCfg, sharedCtx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public synchronized void touchPage(long pageId) throws IgniteCheckedException {
+        pageUsageList.addLast(PageIdUtils.pageIndex(pageId));
+    }
+
+    /** {@inheritDoc} */
+    @Override public synchronized void evictDataPage() throws IgniteCheckedException {
+        evictDataPage(pageUsageList.pollFirst());
+    }
+
+    /** {@inheritDoc} */
+    @Override public synchronized void forgetPage(long pageId) throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override protected synchronized boolean checkTouch(long pageId) {
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/NoOpPageEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/NoOpPageEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/NoOpPageEvictionTracker.java
new file mode 100644
index 0000000..ba466bf
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/NoOpPageEvictionTracker.java
@@ -0,0 +1,50 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+
+/**
+ *
+ */
+public class NoOpPageEvictionTracker implements PageEvictionTracker {
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void touchPage(long pageId) throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void evictDataPage() throws IgniteCheckedException {
+        // No-op.
+    }
+
+    /** {@inheritDoc} */
+    @Override public void forgetPage(long pageId) throws IgniteCheckedException {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageAbstractEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageAbstractEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageAbstractEvictionTracker.java
new file mode 100644
index 0000000..88de545
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageAbstractEvictionTracker.java
@@ -0,0 +1,243 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import java.util.List;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.internal.pagemem.PageIdUtils;
+import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.processors.cache.GridCacheContext;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryEx;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.processors.cache.database.CacheDataRowAdapter;
+import org.apache.ignite.internal.processors.cache.database.tree.io.DataPageIO;
+import org.apache.ignite.internal.processors.cache.database.tree.io.PageIO;
+import org.apache.ignite.internal.processors.cache.version.GridCacheVersionManager;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ *
+ */
+public abstract class PageAbstractEvictionTracker implements PageEvictionTracker {
+    /** This number of least significant bits is dropped from timestamp. */
+    private static final int COMPACT_TS_SHIFT = 8; // Enough if grid works for less than 17 years.
+
+    /** Millis in day. */
+    private final static int DAY = 24 * 60 * 60 * 1000;
+
+    /** Page memory. */
+    protected final PageMemory pageMem;
+
+    /** Tracking array size. */
+    final int trackingSize;
+
+    /** Base compact timestamp. */
+    private final long baseCompactTs;
+
+    /** Shared context. */
+    private final GridCacheSharedContext sharedCtx;
+
+    /* TODO: IGNITE-4921: Will be removed after segments refactoring >>>> */
+    protected final int segBits;
+    protected final int idxBits;
+    protected final int segMask;
+    protected final int idxMask;
+    protected final int segmentPageCount;
+    /* <<<< */
+
+    /**
+     * @param pageMem Page memory.
+     * @param plcCfg Memory policy configuration.
+     * @param sharedCtx Shared context.
+     */
+    PageAbstractEvictionTracker(
+        PageMemory pageMem,
+        MemoryPolicyConfiguration plcCfg,
+        GridCacheSharedContext sharedCtx
+    ) {
+        this.pageMem = pageMem;
+
+        this.sharedCtx = sharedCtx;
+
+        MemoryConfiguration memCfg = sharedCtx.kernalContext().config().getMemoryConfiguration();
+
+        /* TODO: IGNITE-4921: Will be removed after segments refactoring >>>> */
+        int concurrencyLevel = memCfg.getConcurrencyLevel();
+
+        if (concurrencyLevel < 1)
+            concurrencyLevel = Runtime.getRuntime().availableProcessors();
+
+        int pageSize = memCfg.getPageSize();
+
+        long segSize = plcCfg.getSize() / concurrencyLevel;
+
+        if (segSize < 1024 * 1024)
+            segSize = 1024 * 1024;
+
+        segmentPageCount = (int)(segSize / pageSize);
+
+        segBits = Integer.SIZE - Integer.numberOfLeadingZeros(concurrencyLevel - 1);
+
+        idxBits = PageIdUtils.PAGE_IDX_SIZE - segBits;
+
+        segMask = ~(-1 << segBits);
+
+        idxMask = ~(-1 << idxBits);
+        /* <<<< */
+
+        trackingSize = segmentPageCount << segBits;
+
+        baseCompactTs = (U.currentTimeMillis() - DAY) >> COMPACT_TS_SHIFT;
+        // We subtract day to avoid fail in case of daylight shift or timezone change.
+    }
+
+    /**
+     * @param pageIdx Page index.
+     * @return true if at least one data row has been evicted
+     * @throws IgniteCheckedException If failed.
+     */
+    final boolean evictDataPage(int pageIdx) throws IgniteCheckedException {
+        long fakePageId = PageIdUtils.pageId(0, (byte)0, pageIdx);
+
+        long page = pageMem.acquirePage(0, fakePageId);
+
+        List<CacheDataRowAdapter> rowsToEvict;
+
+        try {
+            long pageAddr = pageMem.readLockForce(0, fakePageId, page);
+
+            try {
+                if (PageIO.getType(pageAddr) != PageIO.T_DATA)
+                    return false; // Can't evict: page has been recycled into non-data page.
+
+                DataPageIO io = DataPageIO.VERSIONS.forPage(pageAddr);
+
+                long realPageId = PageIO.getPageId(pageAddr);
+
+                if (!checkTouch(realPageId))
+                    return false; // Can't evict: another thread concurrently invoked forgetPage()
+
+                rowsToEvict = io.forAllItems(pageAddr, new DataPageIO.CC<CacheDataRowAdapter>() {
+                    @Override public CacheDataRowAdapter apply(long link) throws IgniteCheckedException {
+                        CacheDataRowAdapter row = new CacheDataRowAdapter(link);
+
+                        row.initFromLink(null, sharedCtx, pageMem, CacheDataRowAdapter.RowData.KEY_ONLY);
+
+                        assert row.cacheId() != 0 : "Cache ID should be stored in rows of evictable cache";
+
+                        return row;
+                    }
+                });
+            }
+            finally {
+                pageMem.readUnlock(0, fakePageId, page);
+            }
+        }
+        finally {
+            pageMem.releasePage(0, fakePageId, page);
+        }
+
+        boolean evictionDone = false;
+
+        for (CacheDataRowAdapter dataRow : rowsToEvict) {
+            GridCacheContext<?, ?> cacheCtx = sharedCtx.cacheContext(dataRow.cacheId());
+
+            if (!cacheCtx.userCache())
+                continue;
+
+            GridCacheEntryEx entryEx = cacheCtx.cache().entryEx(dataRow.key());
+
+            evictionDone |= entryEx.evictInternal(GridCacheVersionManager.EVICT_VER, null, true);
+        }
+
+        return evictionDone;
+    }
+
+    /**
+     * @param pageId Page ID.
+     * @return true if page was touched at least once.
+     */
+    protected abstract boolean checkTouch(long pageId);
+
+    /**
+     * @param epochMilli Time millis.
+     * @return Compact timestamp. Comparable and fits in 4 bytes.
+     */
+    final long compactTimestamp(long epochMilli) {
+        return (epochMilli >> COMPACT_TS_SHIFT) - baseCompactTs;
+    }
+
+    /**
+     * Resolves position in tracking array by page index.
+     *
+     * @param pageIdx Page index.
+     * @return Position of page in tracking array.
+     */
+    int trackingIdx(int pageIdx) {
+        int inSegmentPageIdx = inSegmentPageIdx(pageIdx);
+
+        assert inSegmentPageIdx < segmentPageCount : inSegmentPageIdx;
+
+        int trackingIdx = segmentIdx(pageIdx) * segmentPageCount + inSegmentPageIdx;
+
+        assert trackingIdx < trackingSize : trackingIdx;
+
+        return trackingIdx;
+    }
+
+    /**
+     * Reverse of {@link #trackingIdx(int)}.
+     *
+     * @param trackingIdx Tracking index.
+     * @return Page index.
+     */
+    int pageIdx(int trackingIdx) {
+        assert trackingIdx < trackingSize;
+
+        long res = 0;
+
+        long segIdx = trackingIdx / segmentPageCount;
+        long pageIdx = trackingIdx % segmentPageCount;
+
+        res = (res << segBits) | (segIdx & segMask);
+        res = (res << idxBits) | (pageIdx & idxMask);
+
+        assert (res & (-1L << 32)) == 0 : res;
+
+        return (int)res;
+    }
+
+    /* TODO: IGNITE-4921: Will be removed after segments refactoring >>>> */
+    /**
+     * @param pageIdx Page index.
+     * @return Number of segment.
+     */
+    private int segmentIdx(int pageIdx) {
+        return (pageIdx >> idxBits) & segMask;
+    }
+
+    /**
+     * @param pageIdx Page index.
+     * @return Number of page inside segment.
+     */
+    private int inSegmentPageIdx(int pageIdx) {
+        return pageIdx & idxMask;
+    }
+    /* <<<< */
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageEvictionTracker.java
new file mode 100644
index 0000000..b13dcf8
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/PageEvictionTracker.java
@@ -0,0 +1,52 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.lifecycle.LifecycleAware;
+
+/**
+ * Entry point for per-page eviction. Accepts information about touching data pages,
+ * capable of evicting "the least needed" page (according to implemented eviction algorithm).
+ */
+public interface PageEvictionTracker extends LifecycleAware {
+    /**
+     * Call this method when data page is accessed.
+     *
+     * @param pageId Page id.
+     * @throws IgniteCheckedException In case of page memory error.
+     */
+    public void touchPage(long pageId) throws IgniteCheckedException;
+
+    /**
+     * Evicts one data page.
+     * In most cases, all entries will be removed from the page.
+     * Method guarantees removing at least one entry from "evicted" data page. Removing all entries may be
+     * not possible, as some of them can be used by active transactions.
+     *
+     * @throws IgniteCheckedException In case of page memory error.
+     */
+    public void evictDataPage() throws IgniteCheckedException;
+
+    /**
+     * Call this method when last entry is removed from data page.
+     *
+     * @param pageId Page id.
+     * @throws IgniteCheckedException In case of page memory error.
+     */
+    public void forgetPage(long pageId) throws IgniteCheckedException;
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/Random2LruPageEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/Random2LruPageEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/Random2LruPageEvictionTracker.java
new file mode 100644
index 0000000..f0ad813
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/Random2LruPageEvictionTracker.java
@@ -0,0 +1,180 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.internal.pagemem.PageIdUtils;
+import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.util.GridUnsafe;
+import org.apache.ignite.internal.util.typedef.internal.LT;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ *
+ */
+public class Random2LruPageEvictionTracker extends PageAbstractEvictionTracker {
+    /** Evict attempts limit. */
+    private static final int EVICT_ATTEMPTS_LIMIT = 30;
+
+    /** LRU Sample size. */
+    private static final int SAMPLE_SIZE = 5;
+
+    /** Maximum sample search spin count */
+    private static final int SAMPLE_SPIN_LIMIT = SAMPLE_SIZE * 1000;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Tracking array ptr. */
+    private long trackingArrPtr;
+
+    /**
+     * @param pageMem Page memory.
+     * @param plcCfg Policy config.
+     * @param sharedCtx Shared context.
+     */
+    public Random2LruPageEvictionTracker(
+        PageMemory pageMem,
+        MemoryPolicyConfiguration plcCfg,
+        GridCacheSharedContext<?, ?> sharedCtx
+    ) {
+        super(pageMem, plcCfg, sharedCtx);
+
+        MemoryConfiguration memCfg = sharedCtx.kernalContext().config().getMemoryConfiguration();
+
+        assert plcCfg.getSize() / memCfg.getPageSize() < Integer.MAX_VALUE;
+
+        log = sharedCtx.logger(getClass());
+    }
+
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        trackingArrPtr = GridUnsafe.allocateMemory(trackingSize * 8);
+
+        GridUnsafe.setMemory(trackingArrPtr, trackingSize * 8, (byte)0);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        GridUnsafe.freeMemory(trackingArrPtr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void touchPage(long pageId) throws IgniteCheckedException {
+        int pageIdx = PageIdUtils.pageIndex(pageId);
+
+        long latestTs = compactTimestamp(U.currentTimeMillis());
+
+        assert latestTs >= 0 && latestTs < Integer.MAX_VALUE;
+
+        boolean success;
+
+        do {
+            int trackingIdx = trackingIdx(pageIdx);
+
+            int firstTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 8);
+
+            int secondTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 8 + 4);
+
+            if (firstTs <= secondTs)
+                success = GridUnsafe.compareAndSwapInt(null, trackingArrPtr + trackingIdx * 8, firstTs, (int)latestTs);
+            else {
+                success = GridUnsafe.compareAndSwapInt(
+                    null, trackingArrPtr + trackingIdx * 8 + 4, secondTs, (int)latestTs);
+            }
+        } while (!success);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void evictDataPage() throws IgniteCheckedException {
+        ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+        int evictAttemptsCnt = 0;
+
+        while (evictAttemptsCnt < EVICT_ATTEMPTS_LIMIT) {
+            int lruTrackingIdx = -1;
+
+            int lruCompactTs = Integer.MAX_VALUE;
+
+            int dataPagesCnt = 0;
+
+            int sampleSpinCnt = 0;
+
+            while (dataPagesCnt < SAMPLE_SIZE) {
+                int trackingIdx = rnd.nextInt(trackingSize);
+
+                int firstTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 8);
+
+                int secondTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 8 + 4);
+
+                int minTs = Math.min(firstTs, secondTs);
+
+                int maxTs = Math.max(firstTs, secondTs);
+
+                if (maxTs != 0) {
+                    // We chose data page with at least one touch.
+                    if (minTs < lruCompactTs) {
+                        lruTrackingIdx = trackingIdx;
+
+                        lruCompactTs = minTs;
+                    }
+
+                    dataPagesCnt++;
+                }
+
+                sampleSpinCnt++;
+
+                if (sampleSpinCnt > SAMPLE_SPIN_LIMIT) {
+                    LT.warn(log, "Too many attempts to choose data page: " + SAMPLE_SPIN_LIMIT);
+
+                    return;
+                }
+            }
+
+            if (evictDataPage(pageIdx(lruTrackingIdx)))
+                return;
+
+            evictAttemptsCnt++;
+        }
+
+        LT.warn(log, "Too many failed attempts to evict page: " + EVICT_ATTEMPTS_LIMIT);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean checkTouch(long pageId) {
+        int trackingIdx = trackingIdx(PageIdUtils.pageIndex(pageId));
+
+        int firstTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 8);
+
+        return firstTs != 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void forgetPage(long pageId) {
+        int pageIdx = PageIdUtils.pageIndex(pageId);
+
+        int trackingIdx = trackingIdx(pageIdx);
+
+        GridUnsafe.putLongVolatile(null, trackingArrPtr + trackingIdx * 8, 0L);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/RandomLruPageEvictionTracker.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/RandomLruPageEvictionTracker.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/RandomLruPageEvictionTracker.java
new file mode 100644
index 0000000..8818b1c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/evict/RandomLruPageEvictionTracker.java
@@ -0,0 +1,157 @@
+/*
+* 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.apache.ignite.internal.processors.cache.database.evict;
+
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.IgniteLogger;
+import org.apache.ignite.configuration.MemoryConfiguration;
+import org.apache.ignite.configuration.MemoryPolicyConfiguration;
+import org.apache.ignite.internal.pagemem.PageIdUtils;
+import org.apache.ignite.internal.pagemem.PageMemory;
+import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
+import org.apache.ignite.internal.util.GridUnsafe;
+import org.apache.ignite.internal.util.typedef.internal.LT;
+import org.apache.ignite.internal.util.typedef.internal.U;
+
+/**
+ *
+ */
+public class RandomLruPageEvictionTracker extends PageAbstractEvictionTracker {
+    /** Evict attempts limit. */
+    private static final int EVICT_ATTEMPTS_LIMIT = 30;
+
+    /** LRU Sample size. */
+    private static final int SAMPLE_SIZE = 5;
+
+    /** Maximum sample search spin count */
+    private static final int SAMPLE_SPIN_LIMIT = SAMPLE_SIZE * 1000;
+
+    /** Logger. */
+    private final IgniteLogger log;
+
+    /** Tracking array ptr. */
+    private long trackingArrPtr;
+
+    /**
+     * @param pageMem Page memory.
+     * @param plcCfg Policy config.
+     * @param sharedCtx Shared context.
+     */
+    public RandomLruPageEvictionTracker(
+        PageMemory pageMem,
+        MemoryPolicyConfiguration plcCfg,
+        GridCacheSharedContext<?, ?> sharedCtx
+    ) {
+        super(pageMem, plcCfg, sharedCtx);
+
+        MemoryConfiguration memCfg = sharedCtx.kernalContext().config().getMemoryConfiguration();
+
+        assert plcCfg.getSize() / memCfg.getPageSize() < Integer.MAX_VALUE;
+
+        log = sharedCtx.logger(getClass());
+    }
+
+    /** {@inheritDoc} */
+    @Override public void start() throws IgniteException {
+        trackingArrPtr = GridUnsafe.allocateMemory(trackingSize * 4);
+
+        GridUnsafe.setMemory(trackingArrPtr, trackingSize * 4, (byte)0);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void stop() throws IgniteException {
+        GridUnsafe.freeMemory(trackingArrPtr);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void touchPage(long pageId) throws IgniteCheckedException {
+        int pageIdx = PageIdUtils.pageIndex(pageId);
+
+        long res = compactTimestamp(U.currentTimeMillis());
+        
+        assert res >= 0 && res < Integer.MAX_VALUE;
+        
+        GridUnsafe.putIntVolatile(null, trackingArrPtr + trackingIdx(pageIdx) * 4, (int)res);
+    }
+
+    /** {@inheritDoc} */
+    @Override public void evictDataPage() throws IgniteCheckedException {
+        ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+        int evictAttemptsCnt = 0;
+
+        while (evictAttemptsCnt < EVICT_ATTEMPTS_LIMIT) {
+            int lruTrackingIdx = -1;
+
+            int lruCompactTs = Integer.MAX_VALUE;
+
+            int dataPagesCnt = 0;
+
+            int sampleSpinCnt = 0;
+
+            while (dataPagesCnt < SAMPLE_SIZE) {
+                int sampleTrackingIdx = rnd.nextInt(trackingSize);
+
+                int compactTs = GridUnsafe.getIntVolatile(null, trackingArrPtr + sampleTrackingIdx * 4);
+
+                if (compactTs != 0) {
+                    // We chose data page with at least one touch.
+                    if (compactTs < lruCompactTs) {
+                        lruTrackingIdx = sampleTrackingIdx;
+
+                        lruCompactTs = compactTs;
+                    }
+
+                    dataPagesCnt++;
+                }
+
+                sampleSpinCnt++;
+
+                if (sampleSpinCnt > SAMPLE_SPIN_LIMIT) {
+                    LT.warn(log, "Too many attempts to choose data page: " + SAMPLE_SPIN_LIMIT);
+
+                    return;
+                }
+            }
+
+            if (evictDataPage(pageIdx(lruTrackingIdx)))
+                return;
+
+            evictAttemptsCnt++;
+        }
+
+        LT.warn(log, "Too many failed attempts to evict page: " + EVICT_ATTEMPTS_LIMIT);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected boolean checkTouch(long pageId) {
+        int trackingIdx = trackingIdx(PageIdUtils.pageIndex(pageId));
+
+        int ts = GridUnsafe.getIntVolatile(null, trackingArrPtr + trackingIdx * 4);
+
+        return ts != 0;
+    }
+
+    /** {@inheritDoc} */
+    @Override public void forgetPage(long pageId) {
+        int pageIdx = PageIdUtils.pageIndex(pageId);
+
+        GridUnsafe.putIntVolatile(null, trackingArrPtr + trackingIdx(pageIdx) * 4, 0);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/ff5b3e16/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
index d433172..cb68f7b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/database/freelist/FreeListImpl.java
@@ -22,7 +22,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.pagemem.PageIdAllocator;
 import org.apache.ignite.internal.pagemem.PageIdUtils;
-import org.apache.ignite.internal.pagemem.PageMemory;
 import org.apache.ignite.internal.pagemem.PageUtils;
 import org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager;
 import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageInsertFragmentRecord;
@@ -31,6 +30,8 @@ import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageRemoveRecord;
 import org.apache.ignite.internal.pagemem.wal.record.delta.DataPageUpdateRecord;
 import org.apache.ignite.internal.processors.cache.database.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.database.MemoryMetricsImpl;
+import org.apache.ignite.internal.processors.cache.database.MemoryPolicy;
+import org.apache.ignite.internal.processors.cache.database.evict.PageEvictionTracker;
 import org.apache.ignite.internal.processors.cache.database.tree.io.CacheVersionIO;
 import org.apache.ignite.internal.processors.cache.database.tree.io.DataPageIO;
 import org.apache.ignite.internal.processors.cache.database.tree.io.DataPagePayload;
@@ -71,17 +72,22 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
     private final int MIN_SIZE_FOR_DATA_PAGE;
 
     /** */
+    private final int emptyDataPagesBucket;
+
+    /** */
     private final PageHandler<CacheDataRow, Boolean> updateRow = new UpdateRowHandler();
 
     /** */
     private final MemoryMetricsImpl memMetrics;
 
+    /** */
+    private final PageEvictionTracker evictionTracker;
+
     /**
      *
      */
     private final class UpdateRowHandler extends PageHandler<CacheDataRow, Boolean> {
-        @Override
-        public Boolean run(
+        @Override public Boolean run(
             int cacheId,
             long pageId,
             long page,
@@ -97,6 +103,8 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
 
             boolean updated = io.updateRow(pageAddr, itemId, pageSize(), null, row, rowSize);
 
+            evictionTracker.touchPage(pageId);
+
             if (updated && needWalDeltaRecord(pageId, page, walPlc)) {
                 // TODO This record must contain only a reference to a logical WAL record with the actual data.
                 byte[] payload = new byte[rowSize];
@@ -125,8 +133,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
      *
      */
     private final class WriteRowHandler extends PageHandler<CacheDataRow, Integer> {
-        @Override
-        public Integer run(
+        @Override public Integer run(
             int cacheId,
             long pageId,
             long page,
@@ -156,6 +163,9 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
                 put(null, pageId, page, pageAddr, bucket);
             }
 
+            if (written == rowSize)
+                evictionTracker.touchPage(pageId);
+
             // Avoid boxing with garbage generation for usual case.
             return written == rowSize ? COMPLETE : written;
         }
@@ -287,6 +297,9 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
                 }
                 else
                     put(null, pageId, page, pageAddr, newBucket);
+
+                if (io.isEmpty(pageAddr))
+                    evictionTracker.forgetPage(pageId);
             }
 
             // For common case boxed 0L will be cached inside of Long, so no garbage will be produced.
@@ -297,8 +310,8 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
     /**
      * @param cacheId Cache ID.
      * @param name Name (for debug purpose).
-     * @param pageMem Page memory.
      * @param memMetrics Memory metrics.
+     * @param memPlc Memory policy.
      * @param reuseList Reuse list or {@code null} if this free list will be a reuse list for itself.
      * @param wal Write ahead log manager.
      * @param metaPageId Metadata page ID.
@@ -308,13 +321,14 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
     public FreeListImpl(
         int cacheId,
         String name,
-        PageMemory pageMem,
         MemoryMetricsImpl memMetrics,
+        MemoryPolicy memPlc,
         ReuseList reuseList,
         IgniteWriteAheadLogManager wal,
         long metaPageId,
         boolean initNew) throws IgniteCheckedException {
-        super(cacheId, name, pageMem, BUCKETS, wal, metaPageId);
+        super(cacheId, name, memPlc.pageMemory(), BUCKETS, wal, metaPageId);
+        this.evictionTracker = memPlc.evictionTracker();
         this.reuseList = reuseList == null ? this : reuseList;
         int pageSize = pageMem.pageSize();
 
@@ -337,6 +351,8 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
 
         this.memMetrics = memMetrics;
 
+        emptyDataPagesBucket = bucket(MIN_SIZE_FOR_DATA_PAGE, false);
+
         init(metaPageId, initNew);
     }
 
@@ -446,25 +462,26 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
 
             int freeSpace = Math.min(MIN_SIZE_FOR_DATA_PAGE, rowSize - written);
 
-            int bucket = bucket(freeSpace, false);
+            long pageId = 0L;
+
+            if (freeSpace == MIN_SIZE_FOR_DATA_PAGE)
+                pageId = takeEmptyPage(emptyDataPagesBucket, DataPageIO.VERSIONS);
 
-            long pageId = 0;
             boolean reuseBucket = false;
 
             // TODO: properly handle reuse bucket.
-            for (int b = bucket + 1; b < BUCKETS - 1; b++) {
-                pageId = takeEmptyPage(b, DataPageIO.VERSIONS);
+            if (pageId == 0L) {
+                for (int b = bucket(freeSpace, false) + 1; b < BUCKETS - 1; b++) {
+                    pageId = takeEmptyPage(b, DataPageIO.VERSIONS);
 
-                if (pageId != 0L) {
-                    reuseBucket = isReuseBucket(b);
+                    if (pageId != 0L) {
+                        reuseBucket = isReuseBucket(b);
 
-                    break;
+                        break;
+                    }
                 }
             }
 
-            if (pageId == 0L)
-                pageId = takeEmptyPage(bucket, DataPageIO.VERSIONS);
-
             boolean allocated = pageId == 0L;
 
             if (allocated)
@@ -531,6 +548,13 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
         return bucket == REUSE_BUCKET;
     }
 
+    /**
+     * @return Number of empty data pages in free list.
+     */
+    public int emptyDataPages() {
+        return bucketsSize[emptyDataPagesBucket].intValue();
+    }
+
     /** {@inheritDoc} */
     @Override public void addForRecycle(ReuseBag bag) throws IgniteCheckedException {
         assert reuseList == this: "not allowed to be a reuse list";
@@ -561,7 +585,7 @@ public class FreeListImpl extends PagesList implements FreeList, ReuseList {
         int keyLen = row.key().valueBytesLength(null);
         int valLen = row.value().valueBytesLength(null);
 
-        return keyLen + valLen + CacheVersionIO.size(row.version(), false) + 8;
+        return keyLen + valLen + CacheVersionIO.size(row.version(), false) + 8 + (row.cacheId() == 0 ? 0 : 4);
     }
 
     /** {@inheritDoc} */


[17/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
IGNITE-4535 - Add option to store deserialized values on-heap


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

Branch: refs/heads/ignite-3477-debug
Commit: c56c4b8c6a648c5901515399071bba7844cedb7a
Parents: 7102d53
Author: Ilya Lantukh <il...@gridgain.com>
Authored: Mon Apr 10 14:48:54 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Mon Apr 10 17:17:59 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/cache/CacheMemoryMode.java    |   63 -
 .../org/apache/ignite/cache/CachePeekMode.java  |    5 +-
 .../configuration/CacheConfiguration.java       |  309 +--
 .../configuration/CollectionConfiguration.java  |   16 -
 .../configuration/NearCacheConfiguration.java   |    1 -
 .../communication/GridIoMessageFactory.java     |   12 -
 .../processors/cache/CacheEvictionManager.java  |   15 -
 .../processors/cache/CacheMetricsImpl.java      |   11 +-
 .../cache/CacheOffheapEvictionManager.java      |   15 -
 .../processors/cache/GridCacheAdapter.java      |   97 +-
 .../processors/cache/GridCacheAttributes.java   |   14 -
 .../cache/GridCacheConcurrentMap.java           |    2 +
 .../cache/GridCacheConcurrentMapImpl.java       |    3 +-
 .../cache/GridCacheEvictionManager.java         | 1755 +-----------------
 .../cache/GridCacheEvictionRequest.java         |  248 ---
 .../cache/GridCacheEvictionResponse.java        |  225 ---
 .../processors/cache/GridCacheIoManager.java    |   14 -
 .../processors/cache/GridCacheProcessor.java    |   21 +-
 .../processors/cache/GridCacheUtils.java        |    8 -
 .../processors/cache/GridNoStorageCacheMap.java |    1 +
 .../cache/IgniteCacheOffheapManagerImpl.java    |    6 +-
 .../GridDistributedCacheAdapter.java            |    6 +
 .../distributed/dht/GridDhtCacheAdapter.java    |   29 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  103 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |    2 +-
 .../distributed/near/GridNearCacheAdapter.java  |   18 -
 .../datastructures/DataStructuresProcessor.java |    1 -
 .../utils/PlatformConfigurationUtils.java       |   17 +-
 .../visor/cache/VisorCacheConfiguration.java    |    1 -
 .../cache/VisorCacheEvictionConfiguration.java  |   55 -
 .../cache/VisorCacheQueryConfiguration.java     |    1 -
 .../internal/ClusterNodeMetricsSelfTest.java    |   46 +-
 .../BinaryObjectOffHeapUnswapTemporaryTest.java |  365 ----
 .../cache/CacheConfigurationLeakTest.java       |    1 +
 .../cache/CacheDeferredDeleteQueueTest.java     |    2 +-
 ...cheDhtLocalPartitionAfterRemoveSelfTest.java |    2 +-
 .../cache/CacheEnumOperationsAbstractTest.java  |   52 +-
 .../cache/CacheGetEntryAbstractTest.java        |    2 +
 ...erceptorPartitionCounterLocalSanityTest.java |   25 +-
 ...torPartitionCounterRandomOperationsTest.java |  111 --
 .../cache/CacheNearReaderUpdateTest.java        |   12 -
 .../cache/CacheOffheapMapEntrySelfTest.java     |   42 +-
 .../CachePutEventListenerErrorSelfTest.java     |   41 +-
 .../CacheSerializableTransactionsTest.java      |   54 +-
 .../cache/CacheSwapUnswapGetTest.java           |  310 ----
 ...idAbstractCacheInterceptorRebalanceTest.java |    6 -
 ...ridCacheAbstractByteArrayValuesSelfTest.java |    6 -
 .../cache/GridCacheAbstractFullApiSelfTest.java |  183 +-
 .../GridCacheAbstractLocalStoreSelfTest.java    |   13 -
 .../GridCacheAbstractRemoveFailureTest.java     |   26 +-
 .../cache/GridCacheAbstractSelfTest.java        |   21 +-
 .../cache/GridCacheClearSelfTest.java           |  113 +-
 .../GridCacheConcurrentTxMultiNodeTest.java     |    2 +-
 ...idCacheConfigurationConsistencySelfTest.java |   41 +-
 .../GridCacheDeploymentOffHeapSelfTest.java     |   41 -
 ...ridCacheDeploymentOffHeapValuesSelfTest.java |   41 -
 .../GridCacheEvictionEventAbstractTest.java     |    5 +-
 ...heInterceptorAtomicOffheapRebalanceTest.java |   30 -
 ...GridCacheInterceptorAtomicRebalanceTest.java |    6 -
 ...ceptorTransactionalOffheapRebalanceTest.java |   35 -
 ...heInterceptorTransactionalRebalanceTest.java |    6 -
 .../cache/GridCacheLifecycleAwareSelfTest.java  |    1 +
 .../cache/GridCacheMemoryModeSelfTest.java      |  285 ---
 .../cache/GridCacheObjectToStringSelfTest.java  |    1 +
 ...HeapMultiThreadedUpdateAbstractSelfTest.java |    3 -
 .../GridCacheOffHeapTieredAbstractSelfTest.java |  679 -------
 .../GridCacheOffHeapTieredAtomicSelfTest.java   |   32 -
 ...heOffHeapTieredEvictionAbstractSelfTest.java |  364 ----
 ...acheOffHeapTieredEvictionAtomicSelfTest.java |   32 -
 .../GridCacheOffHeapTieredEvictionSelfTest.java |   33 -
 .../cache/GridCacheOffHeapTieredSelfTest.java   |   33 -
 .../cache/GridCacheOffheapUpdateSelfTest.java   |    3 -
 .../cache/GridCachePartitionedGetSelfTest.java  |    1 -
 ...chePartitionedOffHeapLocalStoreSelfTest.java |   44 -
 .../GridCachePreloadingEvictionsSelfTest.java   |    7 +-
 .../cache/GridCachePutAllFailoverSelfTest.java  |   58 -
 .../cache/GridCacheReloadSelfTest.java          |    4 +-
 .../cache/GridCacheSwapPreloadSelfTest.java     |    1 -
 .../GridCacheTtlManagerEvictionSelfTest.java    |   26 +-
 .../GridCacheValueBytesPreloadingSelfTest.java  |   44 -
 .../cache/IgniteCacheAbstractTest.java          |    6 +-
 ...IgniteCacheAtomicPutAllFailoverSelfTest.java |    5 -
 .../IgniteCacheConfigVariationsFullApiTest.java |  189 +-
 .../IgniteCacheEntryListenerAbstractTest.java   |   11 -
 ...cheEntryListenerAtomicOffheapTieredTest.java |   32 -
 ...cheEntryListenerAtomicOffheapValuesTest.java |   32 -
 ...niteCacheEntryListenerExpiredEventsTest.java |   26 +-
 ...teCacheEntryListenerTxOffheapTieredTest.java |   32 -
 ...teCacheEntryListenerTxOffheapValuesTest.java |   32 -
 ...niteCacheExpireAndUpdateConsistencyTest.java |   35 +-
 .../IgniteCacheInterceptorSelfTestSuite.java    |    2 -
 ...gniteCacheInvokeReadThroughAbstractTest.java |    4 -
 ...iteCacheInvokeReadThroughSingleNodeTest.java |   32 +-
 .../cache/IgniteCacheInvokeReadThroughTest.java |   92 +-
 ...gniteCacheLoadRebalanceEvictionSelfTest.java |    3 +-
 ...gniteCacheP2pUnmarshallingNearErrorTest.java |    4 +-
 .../cache/IgniteCachePeekModesAbstractTest.java |  117 +-
 .../IgniteCacheReadThroughEvictionSelfTest.java |   10 +-
 .../IgniteCacheStoreValueAbstractTest.java      |    5 -
 .../cache/IgniteCacheTxNearPeekModesTest.java   |    5 +-
 .../cache/IgniteCacheTxPeekModesTest.java       |    5 +-
 .../cache/OffHeapTieredTransactionSelfTest.java |  134 --
 ...heapCacheMetricsForClusterGroupSelfTest.java |    3 -
 .../GridCacheBinaryObjectsAbstractSelfTest.java |   26 +-
 ...AtomicNearDisabledOffheapTieredSelfTest.java |   29 -
 ...ObjectsAtomicNearDisabledOnheapSelfTest.java |    8 +
 ...inaryObjectsAtomicOffheapTieredSelfTest.java |   29 -
 ...dCacheBinaryObjectsAtomicOnheapSelfTest.java |    8 +
 ...tionedNearDisabledOffheapTieredSelfTest.java |   30 -
 ...tsPartitionedNearDisabledOnheapSelfTest.java |    8 +
 ...ObjectsPartitionedOffheapTieredSelfTest.java |   30 -
 ...eBinaryObjectsPartitionedOnheapSelfTest.java |    8 +
 .../dht/GridCacheMemoryModeBinarySelfTest.java  |   36 -
 ...dCacheOffHeapTieredAtomicBinarySelfTest.java |   48 -
 .../GridCacheOffHeapTieredBinarySelfTest.java   |   48 -
 ...fHeapTieredEvictionAtomicBinarySelfTest.java |   96 -
 ...acheOffHeapTieredEvictionBinarySelfTest.java |   96 -
 ...BinaryObjectsLocalOffheapTieredSelfTest.java |   29 -
 ...idCacheBinaryObjectsLocalOnheapSelfTest.java |   26 +
 .../GridCacheQueueCleanupSelfTest.java          |    7 -
 ...dCacheQueueMultiNodeConsistencySelfTest.java |    7 -
 .../IgniteCollectionAbstractTest.java           |    7 -
 .../IgniteDataStructureUniqueNameTest.java      |    7 -
 .../GridCacheLocalAtomicOffheapSetSelfTest.java |   32 -
 .../GridCacheLocalAtomicQueueApiSelfTest.java   |    6 -
 .../local/GridCacheLocalAtomicSetSelfTest.java  |    7 -
 .../GridCacheLocalOffheapQueueApiSelfTest.java  |   31 -
 .../local/GridCacheLocalQueueApiSelfTest.java   |    7 -
 .../local/GridCacheLocalSetSelfTest.java        |    7 -
 ...artitionedAtomicOffheapQueueApiSelfTest.java |   32 -
 ...omicOffheapQueueCreateMultiNodeSelfTest.java |   32 -
 ...onedAtomicOffheapQueueMultiNodeSelfTest.java |   32 -
 ...dCachePartitionedAtomicQueueApiSelfTest.java |    7 -
 ...ionedAtomicQueueCreateMultiNodeSelfTest.java |    7 -
 ...micQueueFailoverDataConsistencySelfTest.java |    7 -
 ...PartitionedAtomicQueueMultiNodeSelfTest.java |    7 -
 ...itionedAtomicQueueRotativeMultiNodeTest.java |    7 -
 ...chePartitionedAtomicSetFailoverSelfTest.java |    7 -
 ...rtitionedDataStructuresFailoverSelfTest.java |    7 -
 ...artitionedOffHeapValuesQueueApiSelfTest.java |   35 -
 ...achePartitionedOffHeapValuesSetSelfTest.java |   32 -
 ...edOffheapDataStructuresFailoverSelfTest.java |   33 -
 ...hePartitionedOffheapSetFailoverSelfTest.java |   32 -
 .../GridCachePartitionedQueueApiSelfTest.java   |    7 -
 ...PartitionedQueueCreateMultiNodeSelfTest.java |    7 -
 ...dCachePartitionedQueueEntryMoveSelfTest.java |    7 -
 ...nedQueueFailoverDataConsistencySelfTest.java |    7 -
 ...CachePartitionedQueueJoinedNodeSelfTest.java |    7 -
 ...dCachePartitionedQueueMultiNodeSelfTest.java |    7 -
 ...hePartitionedQueueRotativeMultiNodeTest.java |    7 -
 ...GridCachePartitionedSetFailoverSelfTest.java |    7 -
 .../GridCachePartitionedSetSelfTest.java        |    7 -
 .../IgnitePartitionedQueueNoBackupsTest.java    |    7 -
 ...eplicatedDataStructuresFailoverSelfTest.java |    7 -
 .../GridCacheReplicatedQueueApiSelfTest.java    |    7 -
 ...idCacheReplicatedQueueMultiNodeSelfTest.java |    7 -
 ...cheReplicatedQueueRotativeMultiNodeTest.java |    7 -
 .../GridCacheReplicatedSetSelfTest.java         |    7 -
 ...tractDistributedByteArrayValuesSelfTest.java |  120 +-
 .../GridCacheAbstractNodeRestartSelfTest.java   |  116 +-
 ...tractPartitionedByteArrayValuesSelfTest.java |   33 -
 .../IgniteCacheAtomicNodeRestartTest.java       |    5 -
 .../IgniteCacheNearOffheapGetSelfTest.java      |  136 --
 .../IgniteCacheTxIteratorSelfTest.java          |   34 +-
 ...tPartitionedOnlyByteArrayValuesSelfTest.java |   55 +-
 ...eColocatedOptimisticTransactionSelfTest.java |    1 -
 ...GridCacheDhtEvictionNearReadersSelfTest.java |    6 +-
 .../dht/GridCacheDhtEvictionSelfTest.java       |  356 ----
 .../dht/GridCacheDhtPreloadOffHeapSelfTest.java |   38 -
 .../dht/GridCacheDhtPreloadOnheapSelfTest.java  |   26 +
 .../dht/GridCacheDhtPreloadSelfTest.java        |   38 +-
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   43 -
 ...NearDisabledAtomicOnheapFullApiSelfTest.java |   38 +
 ...ledAtomicOnheapMultiNodeFullApiSelfTest.java |   28 +
 ...ionedNearDisabledOffHeapFullApiSelfTest.java |   33 -
 ...DisabledOffHeapMultiNodeFullApiSelfTest.java |   33 -
 ...abledOffHeapTieredAtomicFullApiSelfTest.java |   57 -
 ...earDisabledOffHeapTieredFullApiSelfTest.java |   33 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 ...tionedNearDisabledOnheapFullApiSelfTest.java |   27 +
 ...rDisabledOnheapMultiNodeFullApiSelfTest.java |   27 +
 .../dht/IgniteCacheConcurrentPutGetRemove.java  |   27 +-
 .../IgniteCacheCrossCacheTxFailoverTest.java    |   46 +-
 .../dht/IgniteCacheMultiTxLockSelfTest.java     |    1 +
 .../IgniteCachePutRetryAbstractSelfTest.java    |   53 +-
 .../dht/IgniteCachePutRetryAtomicSelfTest.java  |    2 +-
 ...gniteCachePutRetryTransactionalSelfTest.java |   28 +-
 ...eAtomicInvalidPartitionHandlingSelfTest.java |   65 +-
 ...tomicClientOnlyMultiNodeFullApiSelfTest.java |  113 +-
 ...eAtomicNearOnlyMultiNodeFullApiSelfTest.java |   52 -
 .../GridCacheAtomicOffHeapFullApiSelfTest.java  |   67 -
 ...heAtomicOffHeapMultiNodeFullApiSelfTest.java |   68 -
 ...CacheAtomicOffHeapTieredFullApiSelfTest.java |   32 -
 ...icOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 .../GridCacheAtomicOnheapFullApiSelfTest.java   |   28 +
 ...cheAtomicOnheapMultiNodeFullApiSelfTest.java |   26 +
 ...PrimaryWriteOrderOffHeapFullApiSelfTest.java |   32 -
 ...yWriteOrderOffHeapTieredFullApiSelfTest.java |   33 -
 ...cPrimaryWriteOrderOnheapFullApiSelfTest.java |   28 +
 ...riteOrderOnheapMultiNodeFullApiSelfTest.java |   29 +
 ...ityOrderOffHeapMultiNodeFullApiSelfTest.java |   33 -
 ...erOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 .../near/GridCacheNearReadersSelfTest.java      |    1 -
 ...ePartitionedAtomicOnheapFullApiSelfTest.java |   38 +
 ...nedAtomicOnheapMultiNodeFullApiSelfTest.java |   28 +
 .../GridCachePartitionedEvictionSelfTest.java   |    1 +
 .../GridCachePartitionedFullApiSelfTest.java    |    2 -
 ...achePartitionedMultiNodeFullApiSelfTest.java |   43 -
 ...ePartitionedMultiThreadedPutGetSelfTest.java |    2 +-
 ...dCachePartitionedOffHeapFullApiSelfTest.java |   32 -
 ...titionedOffHeapMultiNodeFullApiSelfTest.java |   32 -
 ...PartitionedOffHeapTieredFullApiSelfTest.java |   32 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   74 -
 ...idCachePartitionedOnheapFullApiSelfTest.java |   26 +
 ...rtitionedOnheapMultiNodeFullApiSelfTest.java |   26 +
 .../GridNearOffheapCacheStoreUpdateTest.java    |   35 -
 ...stractReplicatedByteArrayValuesSelfTest.java |   29 -
 .../GridCacheReplicatedEvictionSelfTest.java    |  135 --
 ...idCacheReplicatedOffHeapFullApiSelfTest.java |   32 -
 ...plicatedOffHeapMultiNodeFullApiSelfTest.java |   32 -
 ...eReplicatedOffHeapTieredFullApiSelfTest.java |   33 -
 ...edOffHeapTieredMultiNodeFullApiSelfTest.java |   33 -
 ...ridCacheReplicatedOnheapFullApiSelfTest.java |   26 +
 ...eplicatedOnheapMultiNodeFullApiSelfTest.java |   26 +
 ...idCacheReplicatedPreloadOffHeapSelfTest.java |   37 -
 .../cache/eviction/EvictionAbstractTest.java    |   37 +-
 .../GridCacheBatchEvictUnswapSelfTest.java      |  199 --
 ...heConcurrentEvictionConsistencySelfTest.java |    6 +-
 .../GridCacheConcurrentEvictionsSelfTest.java   |    1 +
 .../GridCacheDistributedEvictionsSelfTest.java  |  235 ---
 .../GridCacheEmptyEntriesAbstractSelfTest.java  |    4 +-
 .../GridCacheEvictableEntryEqualsSelfTest.java  |    1 +
 .../GridCacheEvictionFilterSelfTest.java        |    2 +-
 .../GridCacheEvictionLockUnlockSelfTest.java    |    1 +
 .../GridCacheEvictionTouchSelfTest.java         |   12 +-
 ...cheSynchronousEvictionsFailoverSelfTest.java |  166 --
 .../lru/LruNearEvictionPolicySelfTest.java      |   28 -
 .../LruNearOnlyNearEvictionPolicySelfTest.java  |   55 -
 .../SortedEvictionPolicyPerformanceTest.java    |    2 +-
 ...CacheAtomicLocalOffheapExpiryPolicyTest.java |   30 -
 ...eCacheAtomicLocalOnheapExpiryPolicyTest.java |   26 +
 ...gniteCacheAtomicOffheapExpiryPolicyTest.java |   30 -
 ...IgniteCacheAtomicOnheapExpiryPolicyTest.java |   26 +
 ...rimaryWriteOrderOffheapExpiryPolicyTest.java |   31 -
 ...teOrderWithStoreOffheapExpiryPolicyTest.java |   31 -
 ...AtomicReplicatedOffheapExpiryPolicyTest.java |   30 -
 ...eAtomicWithStoreOffheapExpiryPolicyTest.java |   30 -
 .../IgniteCacheExpiryPolicyAbstractTest.java    |   13 -
 .../IgniteCacheExpiryPolicyTestSuite.java       |   13 -
 ...niteCacheTxLocalOffheapExpiryPolicyTest.java |   30 -
 .../IgniteCacheTxOffheapExpiryPolicyTest.java   |   30 -
 ...acheTxReplicatedOffheapExpiryPolicyTest.java |   30 -
 ...CacheTxWithStoreOffheapExpiryPolicyTest.java |   30 -
 ...dCacheLocalAtomicOffHeapFullApiSelfTest.java |   42 -
 ...LocalAtomicOffHeapTieredFullApiSelfTest.java |   32 -
 .../GridCacheLocalByteArrayValuesSelfTest.java  |   64 +-
 .../GridCacheLocalOffHeapFullApiSelfTest.java   |   30 -
 ...dCacheLocalOffHeapTieredFullApiSelfTest.java |   32 -
 ...LocalCacheOffHeapAndSwapMetricsSelfTest.java |  463 -----
 ...cheAtomicOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...micOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...acheAtomicOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...WriteOrderOnheapMultiJvmFullApiSelfTest.java |   29 +
 ...rityOrderOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...derOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...micOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...bledAtomicOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...rDisabledOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...ledOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...arDisabledOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...rtitionedOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...nedOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...artitionedOnheapMultiJvmFullApiSelfTest.java |   28 +
 ...eplicatedOffHeapMultiJvmFullApiSelfTest.java |   31 -
 ...tedOffHeapTieredMultiJvmFullApiSelfTest.java |   36 -
 ...ReplicatedOnheapMultiJvmFullApiSelfTest.java |   28 +
 .../GridCacheSwapScanQueryAbstractSelfTest.java |  450 -----
 .../query/GridCacheSwapScanQuerySelfTest.java   |   25 -
 .../IgniteCacheQueryCacheDestroySelfTest.java   |    2 -
 .../continuous/CacheContinuousBatchAckTest.java |   73 +-
 ...eContinuousQueryAsyncFilterListenerTest.java |  170 +-
 ...acheContinuousQueryExecuteInPrimaryTest.java |    2 -
 ...usQueryFactoryFilterRandomOperationTest.java |    2 -
 ...ContinuousQueryFailoverAbstractSelfTest.java |   10 -
 ...tomicPrimaryWriteOrderOffheapTieredTest.java |   33 -
 ...tinuousQueryFailoverTxOffheapTieredTest.java |   32 -
 .../CacheContinuousQueryOperationP2PTest.java   |   31 +-
 .../CacheContinuousQueryOrderingEventTest.java  |  127 +-
 ...acheContinuousQueryRandomOperationsTest.java |  246 ---
 ...CacheKeepBinaryIterationNearEnabledTest.java |    6 +-
 ...acheKeepBinaryIterationStoreEnabledTest.java |    6 +-
 .../CacheKeepBinaryIterationTest.java           |  105 +-
 ...ridCacheContinuousQueryAbstractSelfTest.java |   10 -
 ...eContinuousQueryAtomicOffheapTieredTest.java |   32 -
 ...eContinuousQueryAtomicOffheapValuesTest.java |   32 -
 ...CacheContinuousQueryTxOffheapTieredTest.java |   32 -
 ...CacheContinuousQueryTxOffheapValuesTest.java |   32 -
 ...edEntryPartitionedAtomicOffHeapSelfTest.java |   35 -
 ...PartitionedTransactionalOffHeapSelfTest.java |   36 -
 ...nedEntryReplicatedAtomicOffHeapSelfTest.java |   35 -
 ...yReplicatedTransactionalOffHeapSelfTest.java |   36 -
 .../DataStreamProcessorSelfTest.java            |    2 -
 .../igfs/IgfsAbstractBaseSelfTest.java          |   18 -
 .../processors/igfs/IgfsAbstractSelfTest.java   |   11 -
 .../IgfsAtomicPrimaryOffheapTieredSelfTest.java |   39 -
 .../IgfsAtomicPrimaryOffheapValuesSelfTest.java |   39 -
 ...sCachePerBlockLruEvictionPolicySelfTest.java |    1 +
 .../processors/igfs/IgfsMaxSizeSelfTest.java    |    1 -
 .../igfs/IgfsPrimaryOffheapTieredSelfTest.java  |   33 -
 .../igfs/IgfsPrimaryOffheapValuesSelfTest.java  |   33 -
 .../loadtests/GridCacheMultiNodeLoadTest.java   |    1 +
 .../GridCachePartitionedAtomicLongLoadTest.java |    2 +-
 ...gniteClientReconnectMassiveShutdownTest.java |    3 -
 .../ignite/testframework/GridTestUtils.java     |  113 --
 .../configvariations/ConfigVariations.java      |   26 +-
 ...IgniteCacheConfigVariationsAbstractTest.java |   38 +-
 .../junits/common/GridCommonAbstractTest.java   |   10 +-
 .../ConfigVariationsTestSuiteBuilderTest.java   |    4 +-
 .../ignite/testsuites/IgniteBasicTestSuite.java |    2 -
 .../testsuites/IgniteBinaryCacheTestSuite.java  |   19 -
 .../IgniteBinaryObjectsTestSuite.java           |   13 -
 .../IgniteCacheDataStructuresSelfTestSuite.java |   18 -
 .../IgniteCacheEvictionSelfTestSuite.java       |    8 -
 ...IgniteCacheFullApiMultiJvmSelfTestSuite.java |   37 +-
 .../IgniteCacheFullApiSelfTestSuite.java        |   84 +-
 .../IgniteCacheMetricsSelfTestSuite.java        |    2 -
 .../ignite/testsuites/IgniteCacheTestSuite.java |   27 +-
 .../testsuites/IgniteCacheTestSuite2.java       |   24 +-
 .../testsuites/IgniteCacheTestSuite3.java       |   14 +-
 .../testsuites/IgniteCacheTestSuite4.java       |    9 -
 .../ignite/testsuites/IgniteIgfsTestSuite.java  |    9 -
 .../impl/HadoopAbstractMapReduceTest.java       |    1 -
 .../igfs/HadoopFIleSystemFactorySelfTest.java   |    1 -
 .../igfs/HadoopIgfsDualAbstractSelfTest.java    |    1 -
 .../cache/CacheIndexStreamerTest.java           |    3 -
 .../cache/CacheIndexingOffheapCleanupTest.java  |  157 --
 .../CacheOffheapBatchIndexingBaseTest.java      |    6 +-
 .../CacheOffheapBatchIndexingMultiTypeTest.java |   17 +-
 ...CacheOffheapBatchIndexingSingleTypeTest.java |   20 +-
 .../CacheOperationsWithExpirationTest.java      |   68 +-
 .../cache/CacheQueryEvictDataLostTest.java      |  120 ++
 .../CacheQueryOffheapEvictDataLostTest.java     |  136 --
 .../CacheRandomOperationsMultithreadedTest.java |   64 +-
 .../ClientReconnectAfterClusterRestartTest.java |   16 +-
 .../cache/GridCacheOffHeapSelfTest.java         |    1 -
 .../GridCacheOffheapIndexEntryEvictTest.java    |    4 -
 .../cache/GridCacheOffheapIndexGetSelfTest.java |    8 -
 .../cache/GridCacheQuerySimpleBenchmark.java    |    3 -
 .../cache/GridIndexingWithNoopSwapSelfTest.java |    3 +-
 ...aryObjectQueryArgumentsOffheapLocalTest.java |   28 -
 ...teBinaryObjectQueryArgumentsOffheapTest.java |   30 -
 .../IgniteBinaryObjectQueryArgumentsTest.java   |   11 -
 ...CacheDistributedJoinQueryConditionsTest.java |   16 -
 .../cache/IgniteCacheOffheapEvictQueryTest.java |    6 -
 .../cache/IgniteCacheOffheapIndexScanTest.java  |    3 -
 ...CacheOffheapTieredMultithreadedSelfTest.java |  301 ---
 .../cache/IgniteCacheQueriesLoadTest1.java      |    2 -
 ...QueryMultiThreadedOffHeapTieredSelfTest.java |   38 -
 .../IgniteCacheQueryMultiThreadedSelfTest.java  |   24 +-
 ...QueryOffheapEvictsMultiThreadedSelfTest.java |   28 -
 ...eCacheQueryOffheapMultiThreadedSelfTest.java |   28 -
 .../cache/IgniteCrossCachesJoinsQueryTest.java  |   16 -
 ...QueryNodeRestartDistributedJoinSelfTest.java |   50 +-
 .../cache/ttl/CacheTtlAbstractSelfTest.java     |    9 +-
 .../ttl/CacheTtlAtomicAbstractSelfTest.java     |   29 +
 .../cache/ttl/CacheTtlAtomicLocalSelfTest.java  |   34 +
 .../ttl/CacheTtlAtomicPartitionedSelfTest.java  |   34 +
 .../ttl/CacheTtlOffheapAbstractSelfTest.java    |   29 -
 .../CacheTtlOffheapAtomicAbstractSelfTest.java  |   29 -
 .../ttl/CacheTtlOffheapAtomicLocalSelfTest.java |   34 -
 ...acheTtlOffheapAtomicPartitionedSelfTest.java |   34 -
 ...TtlOffheapTransactionalAbstractSelfTest.java |   29 -
 ...cheTtlOffheapTransactionalLocalSelfTest.java |   34 -
 ...OffheapTransactionalPartitionedSelfTest.java |   34 -
 .../ttl/CacheTtlOnheapAbstractSelfTest.java     |   29 -
 .../CacheTtlOnheapAtomicAbstractSelfTest.java   |   29 -
 .../ttl/CacheTtlOnheapAtomicLocalSelfTest.java  |   34 -
 ...CacheTtlOnheapAtomicPartitionedSelfTest.java |   34 -
 ...eTtlOnheapTransactionalAbstractSelfTest.java |   29 -
 ...acheTtlOnheapTransactionalLocalSelfTest.java |   34 -
 ...lOnheapTransactionalPartitionedSelfTest.java |   34 -
 .../CacheTtlTransactionalAbstractSelfTest.java  |   29 +
 .../ttl/CacheTtlTransactionalLocalSelfTest.java |   34 +
 ...acheTtlTransactionalPartitionedSelfTest.java |   34 +
 .../query/IgniteSqlSegmentedIndexSelfTest.java  |    3 +-
 .../IgniteCacheQuerySelfTestSuite.java          |   11 +-
 .../IgniteCacheQuerySelfTestSuite2.java         |   13 +-
 .../IgniteCacheQuerySelfTestSuite3.java         |    8 -
 .../IgniteCacheQuerySelfTestSuite4.java         |    4 -
 .../IgniteCacheWithIndexingTestSuite.java       |   26 +-
 .../Cache/CacheConfigurationTest.cs             |    9 -
 .../IgniteConfigurationSerializerTest.cs        |    2 -
 .../Cache/Configuration/CacheConfiguration.cs   |   23 -
 .../commands/cache/VisorCacheCommand.scala      |    5 -
 modules/yardstick/README.txt                    |    2 -
 .../config/benchmark-atomic-win.properties      |    8 +-
 .../config/benchmark-atomic.properties          |    6 -
 .../config/benchmark-client-mode.properties     |    9 -
 .../config/benchmark-multicast.properties       |    9 -
 .../config/benchmark-query-win.properties       |    5 +-
 .../yardstick/config/benchmark-query.properties |    3 -
 .../config/benchmark-tx-win.properties          |    6 +-
 .../yardstick/config/benchmark-tx.properties    |    4 -
 modules/yardstick/config/benchmark.properties   |   11 +-
 modules/yardstick/config/ignite-base-config.xml |   63 -
 .../config/ignite-base-load-config.xml          |   63 -
 .../config/ignite-cache-load-config.xml         |    5 -
 .../config/ignite-failover-base-config.xml      |   37 -
 .../ignite-int-max-values-offheap-config.xml    |   88 -
 .../ignite-int-max-values-swap-config.xml       |   93 -
 .../test-max-int-values-offheap.properties      |   65 -
 .../config/test-max-int-values-swap.properties  |   64 -
 .../yardstick/IgniteBenchmarkArguments.java     |   29 -
 .../org/apache/ignite/yardstick/IgniteNode.java |   10 -
 .../cache/IgniteGetOffHeapBenchmark.java        |   32 -
 .../cache/IgniteGetOffHeapValuesBenchmark.java  |   32 -
 .../cache/IgnitePutGetOffHeapBenchmark.java     |   32 -
 .../IgnitePutGetOffHeapValuesBenchmark.java     |   32 -
 .../cache/IgnitePutGetTxOffHeapBenchmark.java   |   32 -
 .../IgnitePutGetTxOffHeapValuesBenchmark.java   |   32 -
 .../cache/IgnitePutOffHeapBenchmark.java        |   32 -
 .../cache/IgnitePutOffHeapValuesBenchmark.java  |   32 -
 .../IgnitePutRandomValueSizeBenchmark.java      |    2 +-
 .../cache/IgnitePutTxOffHeapBenchmark.java      |   32 -
 .../IgnitePutTxOffHeapValuesBenchmark.java      |   32 -
 .../IgniteSqlQueryJoinOffHeapBenchmark.java     |   32 -
 .../cache/IgniteSqlQueryOffHeapBenchmark.java   |   32 -
 .../IgniteSqlQueryPutOffHeapBenchmark.java      |   32 -
 ...IgniteAtomicOffHeapInvokeRetryBenchmark.java |   31 -
 .../IgniteAtomicOffHeapRetriesBenchmark.java    |   31 -
 ...ransactionalOffHeapInvokeRetryBenchmark.java |   33 -
 ...ransactionalOffHeapWriteInvokeBenchmark.java |   37 -
 ...eTransactionalOffHeapWriteReadBenchmark.java |   32 -
 .../IgniteCacheRandomOperationBenchmark.java    |    7 -
 434 files changed, 1764 insertions(+), 17076 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java
deleted file mode 100644
index 0133327..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/CacheMemoryMode.java
+++ /dev/null
@@ -1,63 +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.apache.ignite.cache;
-
-import org.apache.ignite.cache.eviction.EvictionPolicy;
-
-/**
- * Defines set of memory modes. Memory modes help control whether cache entries are
- * stored on heap memory, offheap memory, or in swap space.
- */
-public enum CacheMemoryMode {
-    /**
-     * Entries will be stored on-heap first. The onheap tiered storage works as follows:
-     * <nl>
-     * <li>Entries are cached on heap memory first.</li>
-     * <li>
-     *     If offheap memory is enabled and eviction policy evicts an entry from heap memory, entry will
-     *     be moved to offheap memory. If offheap memory is disabled, then entry is simply discarded.
-     * </li>
-     * <li>
-     *     If swap space is enabled and offheap memory fills up, then entry will be evicted into swap space.
-     *     If swap space is disabled, then entry will be discarded. If swap is enabled and offheap memory
-     *     is disabled, then entry will be evicted directly from heap memory into swap.
-     * </li>
-     * </nl>
-     * <p>
-     * <b>Note</b> that heap memory evictions are handled by configured {@link EvictionPolicy}
-     * implementation. By default, no eviction policy is enabled, so entries never leave heap
-     * memory space unless explicitly removed.
-     */
-    ONHEAP_TIERED,
-
-    /**
-     * Works the same as {@link #ONHEAP_TIERED}, except that entries never end up in heap memory and get
-     * stored in offheap memory right away. Entries get cached in offheap memory first and then
-     * get evicted to swap, if one is configured.
-     */
-    OFFHEAP_TIERED,
-
-    /**
-     * Entry keys will be stored on heap memory, and values will be stored in offheap memory. Note
-     * that in this mode entries can be evicted only to swap. The evictions will happen according
-     * to configured {@link EvictionPolicy}.
-     * <p/>
-     * Size returned by {@link CachePeekMode#OFFHEAP} is always zero, for this mode.
-     */
-    OFFHEAP_VALUES,
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java b/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
index 2bfee84..19928e8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/CachePeekMode.java
@@ -63,10 +63,7 @@ public enum CachePeekMode {
     ONHEAP,
 
     /** Peeks value from the off-heap storage only, without loading off-heap value into cache. */
-    OFFHEAP,
-
-    /** Peeks value from the swap storage only, without loading swapped value into cache. */
-    SWAP;
+    OFFHEAP;
 
     /** Enumerated values. */
     private static final CachePeekMode[] VALS = values();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index a9cb38e..cfdfed8 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -48,7 +48,6 @@ import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheEntryProcessor;
 import org.apache.ignite.cache.CacheInterceptor;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.CacheRebalanceMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
@@ -148,12 +147,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /** Default maximum eviction queue ratio. */
     public static final float DFLT_MAX_EVICTION_OVERFLOW_RATIO = 10;
 
-    /** Default eviction synchronized flag. */
-    public static final boolean DFLT_EVICT_SYNCHRONIZED = false;
-
-    /** Default eviction key buffer size for batching synchronized evicts. */
-    public static final int DFLT_EVICT_KEY_BUFFER_SIZE = 1024;
-
     /** Default synchronous eviction timeout in milliseconds. */
     public static final long DFLT_EVICT_SYNCHRONIZED_TIMEOUT = 10000;
 
@@ -163,9 +156,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /** Default value for eager ttl flag. */
     public static final boolean DFLT_EAGER_TTL = true;
 
-    /** Default off-heap storage size is {@code -1} which means that off-heap storage is disabled. */
-    public static final long DFLT_OFFHEAP_MEMORY = -1;
-
     /** Default value for 'maxConcurrentAsyncOps'. */
     public static final int DFLT_MAX_CONCURRENT_ASYNC_OPS = 500;
 
@@ -205,9 +195,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /** Default number of queries detail metrics to collect. */
     public static final int DFLT_QRY_DETAIL_METRICS_SIZE = 0;
 
-    /** Default size for onheap SQL row cache size. */
-    public static final int DFLT_SQL_ONHEAP_ROW_CACHE_SIZE = 10 * 1024;
-
     /** Default value for keep binary in store behavior . */
     @SuppressWarnings({"UnnecessaryBoxing", "BooleanConstructorCall"})
     public static final Boolean DFLT_STORE_KEEP_BINARY = new Boolean(false);
@@ -240,24 +227,12 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /** Cache expiration policy. */
     private EvictionPolicy evictPlc;
 
-    /** Flag indicating whether eviction is synchronized. */
-    private boolean evictSync = DFLT_EVICT_SYNCHRONIZED;
-
-    /** Eviction key buffer size. */
-    private int evictKeyBufSize = DFLT_EVICT_KEY_BUFFER_SIZE;
-
-    /** Synchronous eviction concurrency level. */
-    private int evictSyncConcurrencyLvl = DFLT_EVICT_SYNCHRONIZED_CONCURRENCY_LEVEL;
-
-    /** Synchronous eviction timeout. */
-    private long evictSyncTimeout = DFLT_EVICT_SYNCHRONIZED_TIMEOUT;
+    /** */
+    private boolean onheapCache;
 
     /** Eviction filter. */
     private EvictionFilter<?, ?> evictFilter;
 
-    /** Maximum eviction overflow ratio. */
-    private float evictMaxOverflowRatio = DFLT_MAX_EVICTION_OVERFLOW_RATIO;
-
     /** Eager ttl flag. */
     private boolean eagerTtl = DFLT_EAGER_TTL;
 
@@ -318,9 +293,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /** Rebalance batches prefetch count. */
     private long rebalanceBatchesPrefetchCount = DFLT_REBALANCE_BATCHES_PREFETCH_COUNT;
 
-    /** Off-heap memory size. */
-    private long offHeapMaxMem = DFLT_OFFHEAP_MEMORY;
-
     /** Maximum number of concurrent asynchronous operations. */
     private int maxConcurrentAsyncOps = DFLT_MAX_CONCURRENT_ASYNC_OPS;
 
@@ -382,9 +354,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     private boolean sqlEscapeAll;
 
     /** */
-    private int sqlOnheapRowCacheSize = DFLT_SQL_ONHEAP_ROW_CACHE_SIZE;
-
-    /** */
     private transient Class<?>[] indexedTypes;
 
     /** Copy on read flag. */
@@ -449,12 +418,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
         dfltLockTimeout = cc.getDefaultLockTimeout();
         eagerTtl = cc.isEagerTtl();
         evictFilter = cc.getEvictionFilter();
-        evictKeyBufSize = cc.getEvictSynchronizedKeyBufferSize();
-        evictMaxOverflowRatio = cc.getEvictMaxOverflowRatio();
         evictPlc = cc.getEvictionPolicy();
-        evictSync = cc.isEvictSynchronized();
-        evictSyncConcurrencyLvl = cc.getEvictSynchronizedConcurrencyLevel();
-        evictSyncTimeout = cc.getEvictSynchronizedTimeout();
         expiryPolicyFactory = cc.getExpiryPolicyFactory();
         indexedTypes = cc.getIndexedTypes();
         interceptor = cc.getInterceptor();
@@ -466,13 +430,13 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
         listenerConfigurations = cc.listenerConfigurations;
         loadPrevVal = cc.isLoadPreviousValue();
         longQryWarnTimeout = cc.getLongQueryWarningTimeout();
-        offHeapMaxMem = cc.getOffHeapMaxMemory();
         maxConcurrentAsyncOps = cc.getMaxConcurrentAsyncOperations();
         memPlcName = cc.getMemoryPolicyName();
         sqlIndexMaxInlineSize = cc.getSqlIndexMaxInlineSize();
         name = cc.getName();
         nearCfg = cc.getNearConfiguration();
         nodeFilter = cc.getNodeFilter();
+        onheapCache = cc.isOnheapCacheEnabled();
         partitionLossPolicy = cc.getPartitionLossPolicy();
         pluginCfgs = cc.getPluginConfigurations();
         qryEntities = cc.getQueryEntities() == Collections.<QueryEntity>emptyList() ? null : cc.getQueryEntities();
@@ -489,7 +453,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
         sqlSchema = cc.getSqlSchema();
         sqlEscapeAll = cc.isSqlEscapeAll();
         sqlFuncCls = cc.getSqlFunctionClasses();
-        sqlOnheapRowCacheSize = cc.getSqlOnheapRowCacheSize();
         startSize = cc.getStartSize();
         storeFactory = cc.getCacheStoreFactory();
         storeSesLsnrs = cc.getCacheStoreSessionListenerFactories();
@@ -573,6 +536,25 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
+     * @return On-heap cache enabled flag.
+     */
+    public boolean isOnheapCacheEnabled() {
+        return onheapCache;
+    }
+
+    /**
+     * Configures on-heap cache.
+     *
+     * @param onheapCache {@code True} if on-heap cache should be enabled.
+     * @return {@code this} for chaining.
+     */
+    public CacheConfiguration<K, V> setOnheapCacheEnabled(boolean onheapCache) {
+        this.onheapCache = onheapCache;
+
+        return this;
+    }
+
+    /**
      * @return Near enabled flag.
      */
     public NearCacheConfiguration<K, V> getNearConfiguration() {
@@ -637,153 +619,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
-     * Gets flag indicating whether eviction is synchronized between primary, backup and near nodes.
-     * If this parameter is {@code true} and swap is disabled then {@link IgniteCache#localEvict(Collection)}
-     * will involve all nodes where an entry is kept.  If this property is set to {@code false} then
-     * eviction is done independently on different cache nodes.
-     * <p>
-     * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED}.
-     * <p>
-     * Note that it's not recommended to set this value to {@code true} if cache
-     * store is configured since it will allow to significantly improve cache
-     * performance.
-     *
-     * @return {@code true} If eviction is synchronized with backup nodes (or the
-     *      rest of the nodes in case of replicated cache), {@code false} if not.
-     */
-    public boolean isEvictSynchronized() {
-        return evictSync;
-    }
-
-    /**
-     * Sets flag indicating whether eviction is synchronized with backup nodes or near caches
-     * (or the rest of the nodes for replicated cache).
-     *
-     * @param evictSync {@code true} if synchronized, {@code false} if not.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setEvictSynchronized(boolean evictSync) {
-        this.evictSync = evictSync;
-
-        return this;
-    }
-
-    /**
-     * Gets size of the key buffer for synchronized evictions.
-     * <p>
-     * Default value is defined by {@link #DFLT_EVICT_KEY_BUFFER_SIZE}.
-     *
-     * @return Eviction key buffer size.
-     */
-    public int getEvictSynchronizedKeyBufferSize() {
-        return evictKeyBufSize;
-    }
-
-    /**
-     * Sets eviction key buffer size.
-     *
-     * @param evictKeyBufSize Eviction key buffer size.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setEvictSynchronizedKeyBufferSize(int evictKeyBufSize) {
-        this.evictKeyBufSize = evictKeyBufSize;
-
-        return this;
-    }
-
-    /**
-     * Gets concurrency level for synchronized evictions. This flag only makes sense
-     * with {@link #isEvictSynchronized()} set
-     * to {@code true}. When synchronized evictions are enabled, it is possible that
-     * local eviction policy will try to evict entries faster than evictions can be
-     * synchronized with backup or near nodes. This value specifies how many concurrent
-     * synchronous eviction sessions should be allowed before the system is forced to
-     * wait and let synchronous evictions catch up with the eviction policy.
-     * <p>
-     * Note that if synchronous evictions start lagging, it is possible that you have either
-     * too big or too small eviction key buffer size or small eviction timeout. In that case
-     * you will need to adjust {@link #getEvictSynchronizedKeyBufferSize} or
-     * {@link #getEvictSynchronizedTimeout()} values as well.
-     * <p>
-     * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED_CONCURRENCY_LEVEL}.
-     *
-     * @return Synchronous eviction concurrency level.
-     */
-    public int getEvictSynchronizedConcurrencyLevel() {
-        return evictSyncConcurrencyLvl;
-    }
-
-    /**
-     * Sets concurrency level for synchronized evictions.
-     *
-     * @param evictSyncConcurrencyLvl Concurrency level for synchronized evictions.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setEvictSynchronizedConcurrencyLevel(int evictSyncConcurrencyLvl) {
-        this.evictSyncConcurrencyLvl = evictSyncConcurrencyLvl;
-
-        return this;
-    }
-
-    /**
-     * Gets timeout for synchronized evictions.
-     * <p>
-     * Node that initiates eviction waits for responses
-     * from remote nodes within this timeout.
-     * <p>
-     * Default value is defined by {@link #DFLT_EVICT_SYNCHRONIZED_TIMEOUT}.
-     *
-     * @return Synchronous eviction timeout.
-     */
-    public long getEvictSynchronizedTimeout() {
-        return evictSyncTimeout;
-    }
-
-    /**
-     * Sets timeout for synchronized evictions.
-     *
-     * @param evictSyncTimeout Timeout for synchronized evictions.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setEvictSynchronizedTimeout(long evictSyncTimeout) {
-        this.evictSyncTimeout = evictSyncTimeout;
-
-        return this;
-    }
-
-    /**
-     * This value denotes the maximum size of eviction queue in percents of cache
-     * size in case of distributed cache (replicated and partitioned) and using
-     * synchronized eviction (that is if {@link #isEvictSynchronized()} returns
-     * {@code true}).
-     * <p>
-     * That queue is used internally as a buffer to decrease network costs for
-     * synchronized eviction. Once queue size reaches specified value all required
-     * requests for all entries in the queue are sent to remote nodes and the queue
-     * is cleared.
-     * <p>
-     * Default value is defined by {@link #DFLT_MAX_EVICTION_OVERFLOW_RATIO} and
-     * equals to {@code 10%}.
-     *
-     * @return Maximum size of eviction queue in percents of cache size.
-     */
-    public float getEvictMaxOverflowRatio() {
-        return evictMaxOverflowRatio;
-    }
-
-    /**
-     * Sets maximum eviction overflow ratio.
-     *
-     * @param evictMaxOverflowRatio Maximum eviction overflow ratio.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setEvictMaxOverflowRatio(float evictMaxOverflowRatio) {
-        this.evictMaxOverflowRatio = evictMaxOverflowRatio;
-
-        return this;
-    }
-
-    /**
      * Gets eviction filter to specify which entries should not be evicted
      * (except explicit evict by calling {@link IgniteCache#localEvict(Collection)}).
      * If {@link EvictionFilter#evictAllowed(Cache.Entry)} method
@@ -1624,53 +1459,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
-     * Gets maximum amount of memory available to off-heap storage. Possible values are
-     * <ul>
-     * <li>{@code -1} - Means that off-heap storage is disabled.</li>
-     * <li>
-     *     {@code 0} - Ignite will not limit off-heap storage (it's up to user to properly
-     *     add and remove entries from cache to ensure that off-heap storage does not grow
-     *     indefinitely.
-     * </li>
-     * <li>Any positive value specifies the limit of off-heap storage in bytes.</li>
-     * </ul>
-     * Default value is {@code -1}, specified by {@link #DFLT_OFFHEAP_MEMORY} constant
-     * which means that off-heap storage is disabled by default.
-     * <p>
-     * Use off-heap storage to load gigabytes of data in memory without slowing down
-     * Garbage Collection. Essentially in this case you should allocate very small amount
-     * of memory to JVM and Ignite will cache most of the data in off-heap space
-     * without affecting JVM performance at all.
-     * <p>
-     * Note that Ignite will throw an exception if max memory is set to {@code -1} and
-     * {@code offHeapValuesOnly} flag is set to {@code true}.
-     *
-     * @return Maximum memory in bytes available to off-heap memory space.
-     */
-    public long getOffHeapMaxMemory() {
-        return offHeapMaxMem;
-    }
-
-    /**
-     * Sets maximum amount of memory available to off-heap storage. Possible values are <ul> <li>{@code -1} - Means that
-     * off-heap storage is disabled.</li> <li> {@code 0} - Ignite will not limit off-heap storage (it's up to user to
-     * properly add and remove entries from cache to ensure that off-heap storage does not grow infinitely. </li>
-     * <li>Any positive value specifies the limit of off-heap storage in bytes.</li> </ul> Default value is {@code -1},
-     * specified by {@link #DFLT_OFFHEAP_MEMORY} constant which means that off-heap storage is disabled by default. <p>
-     * Use off-heap storage to load gigabytes of data in memory without slowing down Garbage Collection. Essentially in
-     * this case you should allocate very small amount of memory to JVM and Ignite will cache most of the data in
-     * off-heap space without affecting JVM performance at all.
-     *
-     * @param offHeapMaxMem Maximum memory in bytes available to off-heap memory space.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setOffHeapMaxMemory(long offHeapMaxMem) {
-        this.offHeapMaxMem = offHeapMaxMem;
-
-        return this;
-    }
-
-    /**
      * Gets maximum number of query iterators that can be stored. Iterators are stored to
      * support query pagination when each page of data is sent to user's node only on demand.
      * Increase this property if you are running and processing lots of queries in parallel.
@@ -1696,28 +1484,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
-     * Gets memory mode for cache. Memory mode helps control whether value is stored in on-heap memory,
-     * off-heap memory, or swap space. Refer to {@link CacheMemoryMode} for more info.
-     *
-     * @return Memory mode.
-     */
-    public CacheMemoryMode getMemoryMode() {
-        return null;
-    }
-
-    /**
-     * Sets memory mode for cache.
-     *
-     * @param memMode Memory mode.
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setMemoryMode(CacheMemoryMode memMode) {
-        //this.memMode = memMode;
-
-        return this;
-    }
-
-    /**
      * Gets cache interceptor.
      *
      * @return Cache interceptor.
@@ -1998,31 +1764,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     }
 
     /**
-     * Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
-     * This setting only makes sense when offheap is enabled for this cache.
-     *
-     * @return Cache size.
-     * @see #setOffHeapMaxMemory(long)
-     */
-    public int getSqlOnheapRowCacheSize() {
-        return sqlOnheapRowCacheSize;
-    }
-
-    /**
-     * Number of SQL rows which will be cached onheap to avoid deserialization on each SQL index access.
-     * This setting only makes sense when offheap is enabled for this cache.
-     *
-     * @param size Cache size.
-     * @see #setOffHeapMaxMemory(long)
-     * @return {@code this} for chaining.
-     */
-    public CacheConfiguration<K, V> setSqlOnheapRowCacheSize(int size) {
-        this.sqlOnheapRowCacheSize = size;
-
-        return this;
-    }
-
-    /**
      * Gets array of cache plugin configurations.
      *
      * @return Cache plugin configurations.
@@ -2132,7 +1873,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      * @see #getQueryParallelism()
      * @return {@code this} for chaining.
      */
-    public CacheConfiguration<K,V> setQueryParallelism(int qryParallelism) {
+    public CacheConfiguration<K, V> setQueryParallelism(int qryParallelism) {
         this.qryParallelism = qryParallelism;
 
         return this;
@@ -2542,7 +2283,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
     /**
      *  Filter that accepts all nodes.
      */
-    public static class IgniteAllNodesPredicate  implements IgnitePredicate<ClusterNode> {
+    public static class IgniteAllNodesPredicate implements IgnitePredicate<ClusterNode> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -2799,7 +2540,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K, V> {
 
             if (descending) {
                 if (descendings == null)
-                    descendings  = new HashSet<>();
+                    descendings = new HashSet<>();
 
                 descendings.add(field);
             }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java
index db1eadf..a890f51 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CollectionConfiguration.java
@@ -19,7 +19,6 @@ package org.apache.ignite.configuration;
 
 import java.io.Serializable;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.util.typedef.internal.S;
@@ -108,21 +107,6 @@ public class CollectionConfiguration implements Serializable {
     }
 
     /**
-     * @return Cache memory mode.
-     */
-    public CacheMemoryMode getMemoryMode() {
-        return null;
-    }
-
-    /**
-     * @param memoryMode Memory mode.
-     * @return {@code this} for chaining.
-     */
-    public CollectionConfiguration setMemoryMode(CacheMemoryMode memoryMode) {
-        return this;
-    }
-
-    /**
      * @return Predicate specifying on which nodes the cache should be started.
      */
     public IgnitePredicate<ClusterNode> getNodeFilter() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
index 7c948dc..0fc94655 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/NearCacheConfiguration.java
@@ -71,7 +71,6 @@ public class NearCacheConfiguration<K, V> extends MutableConfiguration<K, V> {
      *
      * @return Near eviction policy.
      * @see CacheConfiguration#getEvictionPolicy()
-     * @see CacheConfiguration#isEvictSynchronized()
      */
     public EvictionPolicy<K, V> getNearEvictionPolicy() {
         return nearEvictPlc;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
index ac3858c..8488d70 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
@@ -45,8 +45,6 @@ import org.apache.ignite.internal.processors.cache.CacheInvokeDirectResult;
 import org.apache.ignite.internal.processors.cache.CacheObjectByteArrayImpl;
 import org.apache.ignite.internal.processors.cache.CacheObjectImpl;
 import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
-import org.apache.ignite.internal.processors.cache.GridCacheEvictionRequest;
-import org.apache.ignite.internal.processors.cache.GridCacheEvictionResponse;
 import org.apache.ignite.internal.processors.cache.GridCacheReturn;
 import org.apache.ignite.internal.processors.cache.KeyCacheObjectImpl;
 import org.apache.ignite.internal.processors.cache.binary.MetadataRequestMessage;
@@ -371,16 +369,6 @@ public class GridIoMessageFactory implements MessageFactory {
 
                 break;
 
-            case 14:
-                msg = new GridCacheEvictionRequest();
-
-                break;
-
-            case 15:
-                msg = new GridCacheEvictionResponse();
-
-                break;
-
             case 16:
                 msg = new GridCacheTxRecoveryRequest();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
index d536a98..b614728 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheEvictionManager.java
@@ -41,11 +41,6 @@ public interface CacheEvictionManager extends GridCacheManager {
     public void touch(GridCacheEntryEx e, AffinityTopologyVersion topVer);
 
     /**
-     * Notifications.
-     */
-    public void unwind();
-
-    /**
      * @param entry Entry to attempt to evict.
      * @param obsoleteVer Obsolete version.
      * @param filter Optional entry filter.
@@ -60,19 +55,9 @@ public interface CacheEvictionManager extends GridCacheManager {
         @Nullable CacheEntryPredicate[] filter) throws IgniteCheckedException;
 
     /**
-     * @return Current size of evict queue.
-     */
-    public int evictQueueSize();
-
-    /**
      * @param keys Keys to evict.
      * @param obsoleteVer Obsolete version.
      * @throws IgniteCheckedException In case of error.
      */
     public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) throws IgniteCheckedException;
-
-    /**
-     * @return {@code True} if either evicts or near evicts are synchronized, {@code false} otherwise.
-     */
-    public boolean evictSyncOrNearSync();
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
index eb63a60..aceef97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheMetricsImpl.java
@@ -236,7 +236,7 @@ public class CacheMetricsImpl implements CacheMetrics {
 
     /** {@inheritDoc} */
     @Override public long getOffHeapMaxSize() {
-        return cctx.config().getOffHeapMaxMemory();
+        return 0;
     }
 
     /** {@inheritDoc} */
@@ -260,14 +260,7 @@ public class CacheMetricsImpl implements CacheMetrics {
 
     /** {@inheritDoc} */
     @Override public int getDhtEvictQueueCurrentSize() {
-        GridCacheContext<?, ?> ctx = cctx.isNear() ? dhtCtx : cctx;
-
-        if (ctx == null)
-            return -1;
-
-        CacheEvictionManager evictMgr = ctx.evicts();
-
-        return evictMgr != null ? evictMgr.evictQueueSize() : -1;
+        return -1;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
index e6a9ee7..99df39d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheOffheapEvictionManager.java
@@ -62,11 +62,6 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public void unwind() {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
     @Override public boolean evict(@Nullable GridCacheEntryEx entry,
         @Nullable GridCacheVersion obsoleteVer,
         boolean explicit,
@@ -75,17 +70,7 @@ public class CacheOffheapEvictionManager extends GridCacheManagerAdapter impleme
     }
 
     /** {@inheritDoc} */
-    @Override public int evictQueueSize() {
-        return 0;
-    }
-
-    /** {@inheritDoc} */
     @Override public void batchEvict(Collection<?> keys, @Nullable GridCacheVersion obsoleteVer) {
         // No-op.
     }
-
-    /** {@inheritDoc} */
-    @Override public boolean evictSyncOrNearSync() {
-        return false;
-    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 92d7423..93daeda 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -693,7 +693,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public final Iterable<Cache.Entry<K, V>> localEntries(CachePeekMode[] peekModes) throws IgniteCheckedException {
+    @Override public final Iterable<Cache.Entry<K, V>> localEntries(
+        CachePeekMode[] peekModes) throws IgniteCheckedException {
         assert peekModes != null;
 
         ctx.checkSecurity(SecurityPermission.CACHE_READ);
@@ -707,9 +708,19 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         if (ctx.isLocal()) {
             modes.primary = true;
             modes.backup = true;
+        }
+
+        if (modes.offheap) {
+            if (modes.heap && modes.near && ctx.isNear())
+                its.add(ctx.near().nearEntries().iterator());
+
+            if (modes.primary || modes.backup) {
+                AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
 
-            if (modes.heap)
-                its.add(iterator(map.entries().iterator(), !keepBinary));
+                IgniteCacheOffheapManager offheapMgr = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
+
+                its.add(offheapMgr.<K, V>entriesIterator(modes.primary, modes.backup, topVer, ctx.keepBinary()));
+            }
         }
         else if (modes.heap) {
             if (modes.near && ctx.isNear())
@@ -722,16 +733,6 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
             }
         }
 
-        // Swap and offheap are disabled for near cache.
-        if (modes.primary || modes.backup) {
-            AffinityTopologyVersion topVer = ctx.affinity().affinityTopologyVersion();
-
-            IgniteCacheOffheapManager offheapMgr = ctx.isNear() ? ctx.near().dht().context().offheap() : ctx.offheap();
-
-            if (modes.offheap)
-                its.add(offheapMgr.<K, V>entriesIterator(modes.primary, modes.backup, topVer, ctx.keepBinary()));
-        }
-
         final Iterator<Cache.Entry<K, V>> it = F.flatIterators(its);
 
         return new Iterable<Cache.Entry<K, V>>() {
@@ -928,7 +929,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      * @return Entry (never {@code null}).
      */
     public final GridCacheEntryEx entryEx(Object key) {
-        return entryEx(ctx.toCacheKeyObject(key), false);
+        return entryEx(ctx.toCacheKeyObject(key));
     }
 
     /**
@@ -936,20 +937,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      * @return Entry (never {@code null}).
      */
     public final GridCacheEntryEx entryEx(KeyCacheObject key) {
-        return entryEx(key, false);
-    }
-
-    /**
-     * @param key Entry key.
-     * @param touch Whether created entry should be touched.
-     * @return Entry (never {@code null}).
-     */
-    public GridCacheEntryEx entryEx(KeyCacheObject key, boolean touch) {
-        GridCacheEntryEx e = entry0(key, ctx.affinity().affinityTopologyVersion(), true, touch);
-
-        assert e != null;
-
-        return e;
+        return entryEx(key, ctx.affinity().affinityTopologyVersion());
     }
 
     /**
@@ -958,7 +946,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      * @return Entry (never {@code null}).
      */
     public GridCacheEntryEx entryEx(KeyCacheObject key, AffinityTopologyVersion topVer) {
-        GridCacheEntryEx e = entry0(key, topVer, true, false);
+        GridCacheEntryEx e = map.putEntryIfObsoleteOrAbsent(topVer, key, null, true, false);
 
         assert e != null;
 
@@ -1007,11 +995,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     }
 
     /**
-         * Gets entry set containing internal entries.
-         *
-         * @param filter Filter.
-         * @return Entry set.
-         */
+     * Gets entry set containing internal entries.
+     *
+     * @param filter Filter.
+     * @return Entry set.
+     */
     @Override public final Set<Cache.Entry<K, V>> entrySetx(final CacheEntryPredicate... filter) {
         boolean keepBinary = ctx.keepBinary();
 
@@ -2316,8 +2304,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      */
     public IgniteInternalFuture<V> getAndPutAsync0(final K key,
         final V val,
-        @Nullable final CacheEntryPredicate filter)
-    {
+        @Nullable final CacheEntryPredicate filter) {
         return asyncOp(new AsyncOp<V>() {
             @Override public IgniteInternalFuture<V> op(GridNearTxLocal tx, AffinityTopologyVersion readyTopVer) {
                 return tx.putAsync(ctx, readyTopVer, key, val, true, filter)
@@ -2873,7 +2860,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
         return syncOp(new SyncOp<V>(true) {
             @Override public V op(GridNearTxLocal tx) throws IgniteCheckedException {
-                K key0 = keepBinary ? (K) ctx.toCacheKeyObject(key) : key;
+                K key0 = keepBinary ? (K)ctx.toCacheKeyObject(key) : key;
 
                 V ret = tx.removeAllAsync(ctx,
                     null,
@@ -2883,9 +2870,9 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
                     /*singleRmv*/false).get().value();
 
                 if (ctx.config().getInterceptor() != null) {
-                    K key = keepBinary ? (K) ctx.unwrapBinaryIfNeeded(key0, true, false) : key0;
+                    K key = keepBinary ? (K)ctx.unwrapBinaryIfNeeded(key0, true, false) : key0;
 
-                    return (V) ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2();
+                    return (V)ctx.config().getInterceptor().onBeforeRemove(new CacheEntryImpl(key, ret)).get2();
                 }
 
                 return ret;
@@ -2949,7 +2936,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
         do {
             for (Iterator<CacheDataRow> it = ctx.offheap().iterator(true, true, null);
-                it.hasNext() && keys.size() < REMOVE_ALL_KEYS_BATCH;)
+                it.hasNext() && keys.size() < REMOVE_ALL_KEYS_BATCH; )
                 keys.add((K)it.next().key());
 
             removeAll(keys);
@@ -3484,7 +3471,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
         CacheObject cacheVal = ctx.toCacheObject(val);
 
-        GridCacheEntryEx entry = entryEx(key, false);
+        GridCacheEntryEx entry = entryEx(key);
 
         try {
             entry.initialValue(cacheVal,
@@ -3818,7 +3805,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
         ctx.kernalContext().task().setThreadContext(TC_SUBGRID, nodes);
 
         return ctx.kernalContext().task().execute(
-                new PartitionSizeLongTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes, part), null);
+            new PartitionSizeLongTask(ctx.name(), ctx.affinity().affinityTopologyVersion(), peekModes, part), null);
     }
 
     /** {@inheritDoc} */
@@ -3899,7 +3886,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
     }
 
     /** {@inheritDoc} */
-    @Override public Iterator<Cache.Entry<K, V>> scanIterator(boolean keepBinary, @Nullable IgniteBiPredicate<Object, Object> p)
+    @Override public Iterator<Cache.Entry<K, V>> scanIterator(boolean keepBinary,
+        @Nullable IgniteBiPredicate<Object, Object> p)
         throws IgniteCheckedException {
         return igniteIterator(keepBinary, p);
     }
@@ -3927,7 +3915,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      * @return Distributed ignite cache iterator.
      * @throws IgniteCheckedException If failed.
      */
-    private Iterator<Cache.Entry<K, V>> igniteIterator(boolean keepBinary, @Nullable IgniteBiPredicate<Object, Object> p)
+    private Iterator<Cache.Entry<K, V>> igniteIterator(boolean keepBinary,
+        @Nullable IgniteBiPredicate<Object, Object> p)
         throws IgniteCheckedException {
         GridCacheContext ctx0 = ctx.isNear() ? ctx.near().dht().context() : ctx;
 
@@ -4471,17 +4460,11 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
 
         GridCacheVersion obsoleteVer = ctx.versions().next();
 
-        if (!ctx.evicts().evictSyncOrNearSync()) {
-            try {
-                ctx.evicts().batchEvict(keys, obsoleteVer);
-            }
-            catch (IgniteCheckedException e) {
-                U.error(log, "Failed to perform batch evict for keys: " + keys, e);
-            }
+        try {
+            ctx.evicts().batchEvict(keys, obsoleteVer);
         }
-        else {
-            for (K k : keys)
-                evictx(k, obsoleteVer, CU.empty0());
+        catch (IgniteCheckedException e) {
+            U.error(log, "Failed to perform batch evict for keys: " + keys, e);
         }
     }
 
@@ -4500,7 +4483,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
      * @return Cached value.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public final V get(K key, boolean deserializeBinary, final boolean needVer) throws IgniteCheckedException {
+    @Nullable public final V get(K key, boolean deserializeBinary,
+        final boolean needVer) throws IgniteCheckedException {
         String taskName = ctx.kernalContext().job().currentTaskName();
 
         return get0(key, taskName, deserializeBinary, needVer);
@@ -5330,7 +5314,8 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K, V
          * @param peekModes Cache peek modes.
          * @param partition partition.
          */
-        private PartitionSizeLongJob(String cacheName, AffinityTopologyVersion topVer, CachePeekMode[] peekModes, int partition) {
+        private PartitionSizeLongJob(String cacheName, AffinityTopologyVersion topVer, CachePeekMode[] peekModes,
+            int partition) {
             super(cacheName, topVer);
 
             this.peekModes = peekModes;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
index 42a9cfe..292ea4a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAttributes.java
@@ -205,20 +205,6 @@ public class GridCacheAttributes implements Serializable {
     }
 
     /**
-     * @return Flag indicating whether eviction is synchronized.
-     */
-    public boolean evictSynchronized() {
-        return ccfg.isEvictSynchronized();
-    }
-
-    /**
-     * @return Maximum eviction overflow ratio.
-     */
-    public float evictMaxOverflowRatio() {
-        return ccfg.getEvictMaxOverflowRatio();
-    }
-
-    /**
      * @return Default lock timeout.
      */
     public long defaultLockTimeout() {

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
index 7d29d6c..debc65b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMap.java
@@ -60,6 +60,7 @@ public interface GridCacheConcurrentMap {
 
     /**
      * Returns the number of key-value mappings in this map.
+     * It does not include entries from underlying data store.
      *
      * @return the number of key-value mappings in this map.
      */
@@ -68,6 +69,7 @@ public interface GridCacheConcurrentMap {
     /**
      * Returns the number of publicly available key-value mappings in this map.
      * It excludes entries that are marked as deleted.
+     * It also does not include entries from underlying data store.
      *
      * @return the number of publicly available key-value mappings in this map.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
index 61624ff..10f5ca3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheConcurrentMapImpl.java
@@ -113,8 +113,7 @@ public class GridCacheConcurrentMapImpl implements GridCacheConcurrentMap {
         KeyCacheObject key,
         @Nullable final CacheObject val,
         final boolean create,
-        final boolean touch)
-    {
+        final boolean touch) {
         GridCacheMapEntry cur = null;
         GridCacheMapEntry created = null;
         GridCacheMapEntry created0 = null;


[48/57] [abbrv] ignite git commit: IGNITE-3477 - Fixed cache metrics serialization for .NET

Posted by ag...@apache.org.
IGNITE-3477 - Fixed cache metrics serialization for .NET


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

Branch: refs/heads/ignite-3477-debug
Commit: e319697023537237fb0c741dab9dba5cf08d5b83
Parents: c9fd6b9
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Apr 11 17:34:14 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Apr 11 17:35:21 2017 +0300

----------------------------------------------------------------------
 .../dht/atomic/GridDhtAtomicCache.java          | 37 ++++++++++----------
 .../Impl/Cache/CacheMetricsImpl.cs              | 10 ------
 2 files changed, 19 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e3196970/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 5a8dfa0..6bcd6c2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -3201,29 +3201,30 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K, V> {
                             if (log.isDebugEnabled())
                                 log.debug("Got removed entry while updating backup value (will retry): " + key);
 
-                        entry = null;
-                    }
-                    finally {
-                        if (entry != null)
-                            ctx.evicts().touch(entry, req.topologyVersion());
+                            entry = null;
+                        }
+                        finally {
+                            if (entry != null)
+                                ctx.evicts().touch(entry, req.topologyVersion());
+                        }
                     }
                 }
-            }
-            catch (NodeStoppingException e){
-                U.error(log, "Failed to update key on backup (local node is stopping):" + key, e);
+                catch (NodeStoppingException e){
+                    U.error(log, "Failed to update key on backup (local node is stopping):" + key, e);
 
-                return;
-            }
-            catch (GridDhtInvalidPartitionException ignored) {
-                // Ignore.
-            }
-            catch (IgniteCheckedException e) {
-                IgniteCheckedException err = new IgniteCheckedException("Failed to update key on backup node: " + key, e);
+                    return;
+                }
+                catch (GridDhtInvalidPartitionException ignored) {
+                    // Ignore.
+                }
+                catch (IgniteCheckedException e) {
+                    IgniteCheckedException err = new IgniteCheckedException("Failed to update key on backup node: " + key, e);
 
-                if (nearRes != null)
-                    nearRes.addFailedKey(key, err);
+                    if (nearRes != null)
+                        nearRes.addFailedKey(key, err);
 
-                U.error(log, "Failed to update key on backup node: " + key, e);}
+                    U.error(log, "Failed to update key on backup node: " + key, e);
+                }
             }
         }
         finally {

http://git-wip-us.apache.org/repos/asf/ignite/blob/e3196970/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
index 48943b4..a2f0417 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Cache/CacheMetricsImpl.cs
@@ -266,7 +266,6 @@ namespace Apache.Ignite.Core.Impl.Cache
             _cacheTxCommits = reader.ReadLong();
             _cacheTxRollbacks = reader.ReadLong();
             _cacheName = reader.ReadString();
-            _overflowSize = reader.ReadLong();
             _offHeapGets = reader.ReadLong();
             _offHeapPuts = reader.ReadLong();
             _offHeapRemovals = reader.ReadLong();
@@ -280,15 +279,6 @@ namespace Apache.Ignite.Core.Impl.Cache
             _offHeapBackupEntriesCount = reader.ReadLong();
             _offHeapAllocatedSize = reader.ReadLong();
             _offHeapMaxSize = reader.ReadLong();
-            _swapGets = reader.ReadLong();
-            _swapPuts = reader.ReadLong();
-            _swapRemovals = reader.ReadLong();
-            _swapHits = reader.ReadLong();
-            _swapMisses = reader.ReadLong();
-            _swapEntriesCount = reader.ReadLong();
-            _swapSize = reader.ReadLong();
-            _swapHitPercentage = reader.ReadFloat();
-            _swapMissPercentage = reader.ReadFloat();
             _size = reader.ReadInt();
             _keySize = reader.ReadInt();
             _isEmpty = reader.ReadBoolean();


[03/57] [abbrv] ignite git commit: IGNITE-4535 - Add option to store deserialized values on-heap

Posted by ag...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
index c59e5fe..acf33dc 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOffheapBatchIndexingSingleTypeTest.java
@@ -41,7 +41,7 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
     public void testBatchRemove() throws Exception {
         Ignite ignite = grid(0);
 
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(1,
+        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(
             new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class});
 
         final IgniteCache<Object, Object> cache = ignite.createCache(ccfg);
@@ -88,18 +88,6 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
         doStreamerBatchTest(50,
             1_000,
             new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            1,
-            true);
-    }
-
-    /**
-     *
-     */
-    public void testPutAllAndStreamerDfltOffHeapRowCacheSize() {
-        doStreamerBatchTest(50,
-            1_000,
-            new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            CacheConfiguration.DFLT_SQL_ONHEAP_ROW_CACHE_SIZE,
             true);
     }
 
@@ -110,7 +98,6 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
         doStreamerBatchTest(50,
             1_000,
             new Class<?>[] {Integer.class, CacheOffheapBatchIndexingBaseTest.Organization.class},
-            1,
             false);
     }
 
@@ -118,18 +105,17 @@ public class CacheOffheapBatchIndexingSingleTypeTest extends CacheOffheapBatchIn
      * @param iterations Number of iterations.
      * @param entitiesCnt Number of entities to put.
      * @param entityClasses Entity classes.
-     * @param onHeapRowCacheSize Cache size.
+
      * @param preloadInStreamer Data preload flag.
      */
     private void doStreamerBatchTest(int iterations,
         int entitiesCnt,
         Class<?>[] entityClasses,
-        int onHeapRowCacheSize,
         boolean preloadInStreamer) {
         Ignite ignite = grid(0);
 
         final IgniteCache<Object, Object> cache =
-            ignite.createCache(cacheConfiguration(onHeapRowCacheSize, entityClasses));
+            ignite.createCache(cacheConfiguration(entityClasses));
 
         try {
             if (preloadInStreamer)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
index 7db8b9c..33c82b7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheOperationsWithExpirationTest.java
@@ -28,7 +28,6 @@ import javax.cache.expiry.ModifiedExpiryPolicy;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -41,9 +40,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.PRIMARY_SYNC;
 
 /**
@@ -55,20 +51,16 @@ public class CacheOperationsWithExpirationTest extends GridCommonAbstractTest {
 
     /**
      * @param atomicityMode Atomicity mode.
-     * @param memoryMode Memory mode.
      * @param offheapMem Offheap memory size.
      * @param idx Indexing enabled flag.
      * @return Cache configuration.
      */
     private CacheConfiguration<String, TestIndexedType> cacheConfiguration(CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         long offheapMem,
         boolean idx) {
         CacheConfiguration<String, TestIndexedType> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
-        ccfg.setMemoryMode(memoryMode);
-        ccfg.setOffHeapMaxMemory(offheapMem);
         ccfg.setBackups(1);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
         ccfg.setWriteSynchronizationMode(PRIMARY_SYNC);
@@ -97,71 +89,15 @@ public class CacheOperationsWithExpirationTest extends GridCommonAbstractTest {
     /**
      * @throws Exception If failed.
      */
-    public void testAtomicOffheapLimitedIndexEnabled() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1024 * 1024, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapIndexEnabled() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 0, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testAtomicIndexEnabled() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapLimitedIndexEnabled() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1024 * 1024, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapIndexEnabled() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 0, true));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapLimited() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 1024 * 1024, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheap() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, OFFHEAP_TIERED, 0, false));
+        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, 0, true));
     }
 
     /**
      * @throws Exception If failed.
      */
     public void testAtomic() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, ONHEAP_TIERED, 0, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapLimited() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 1024 * 1024, false));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheap() throws Exception {
-        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(TRANSACTIONAL, OFFHEAP_TIERED, 0, false));
+        concurrentPutGetRemoveExpireAndQuery(cacheConfiguration(ATOMIC, 0, false));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
new file mode 100644
index 0000000..7b79c72
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryEvictDataLostTest.java
@@ -0,0 +1,120 @@
+/*
+ * 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.apache.ignite.internal.processors.cache;
+
+import java.io.Serializable;
+import java.util.concurrent.ThreadLocalRandom;
+import org.apache.ignite.IgniteCache;
+import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
+import org.apache.ignite.cache.query.SqlQuery;
+import org.apache.ignite.cache.query.annotations.QuerySqlField;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteInClosure;
+import org.apache.ignite.testframework.GridTestUtils;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ *
+ */
+public class CacheQueryEvictDataLostTest extends GridCommonAbstractTest {
+    /** */
+    private static final int KEYS = 100_000;
+
+    /**
+     *
+     */
+    public CacheQueryEvictDataLostTest() {
+        super(true);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration() throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration();
+
+        CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
+
+        ccfg.setName("cache-1");
+        ccfg.setEvictionPolicy(new LruEvictionPolicy(10));
+        ccfg.setOnheapCacheEnabled(true);
+        ccfg.setIndexedTypes(Integer.class, TestData.class);
+
+        cfg.setCacheConfiguration(ccfg);
+
+        return cfg;
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testQueryDataLost() throws Exception {
+        final long stopTime = U.currentTimeMillis() + 30_000;
+
+        GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
+            void putGet(IgniteCache<Object, Object> cache) {
+                ThreadLocalRandom rnd = ThreadLocalRandom.current();
+
+                for (int i = 0; i < KEYS; i++) {
+                    cache.put(rnd.nextInt(KEYS), new TestData(i));
+
+                    cache.get(rnd.nextInt(KEYS));
+                }
+            }
+
+            void query(IgniteCache<Object, Object> cache) {
+                SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
+                qry1.setArgs(KEYS / 2);
+
+                cache.query(qry1).getAll();
+
+                SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
+                qry2.setArgs(KEYS / 2);
+
+                cache.query(qry2).getAll();
+            }
+
+            @Override public void apply(Integer idx) {
+                IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
+
+                while (U.currentTimeMillis() < stopTime) {
+                    if (idx == 0)
+                        putGet(cache1);
+                    else
+                        query(cache1);
+                }
+            }
+        }, 10, "test-thread");
+    }
+
+    /**
+     *
+     */
+    static class TestData implements Serializable {
+        /** */
+        @QuerySqlField(index = true)
+        private int idxVal;
+
+        /**
+         * @param idxVal Value.
+         */
+        public TestData(int idxVal) {
+            this.idxVal = idxVal;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
deleted file mode 100644
index 3867b20..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheQueryOffheapEvictDataLostTest.java
+++ /dev/null
@@ -1,136 +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.apache.ignite.internal.processors.cache;
-
-import java.io.Serializable;
-import java.util.concurrent.ThreadLocalRandom;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteInClosure;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
-
-/**
- *
- */
-public class CacheQueryOffheapEvictDataLostTest extends GridCommonAbstractTest {
-    /** */
-    private static final int KEYS = 100_000;
-
-    /**
-     *
-     */
-    public CacheQueryOffheapEvictDataLostTest() {
-        super(true);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration() throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration();
-
-        CacheConfiguration<Object, Object> ccfg1 = new CacheConfiguration<>();
-
-        ccfg1.setName("cache-1");
-        ccfg1.setMemoryMode(OFFHEAP_TIERED);
-        ccfg1.setOffHeapMaxMemory(1024);
-        ccfg1.setIndexedTypes(Integer.class, TestData.class);
-
-        CacheConfiguration<Object, Object> ccfg2 = new CacheConfiguration<>();
-
-        ccfg2.setName("cache-2");
-        ccfg2.setMemoryMode(ONHEAP_TIERED);
-        ccfg2.setEvictionPolicy(new LruEvictionPolicy(10));
-        ccfg2.setOffHeapMaxMemory(1024);
-        ccfg2.setIndexedTypes(Integer.class, TestData.class);
-
-        cfg.setCacheConfiguration(ccfg1, ccfg2);
-
-        return cfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQueryDataLost() throws Exception {
-        final long stopTime = U.currentTimeMillis() + 30_000;
-
-        GridTestUtils.runMultiThreaded(new IgniteInClosure<Integer>() {
-            void putGet(IgniteCache<Object, Object> cache) {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                for (int i = 0; i < KEYS; i++) {
-                    cache.put(rnd.nextInt(KEYS), new TestData(i));
-
-                    cache.get(rnd.nextInt(KEYS));
-                }
-            }
-
-            void query(IgniteCache<Object, Object> cache) {
-                SqlQuery<Object, Object> qry1 = new SqlQuery<>(TestData.class, "_key > ?");
-                qry1.setArgs(KEYS / 2);
-
-                cache.query(qry1).getAll();
-
-                SqlQuery<Object, Object> qry2 = new SqlQuery<>(TestData.class, "idxVal > ?");
-                qry2.setArgs(KEYS / 2);
-
-                cache.query(qry2).getAll();
-            }
-
-            @Override public void apply(Integer idx) {
-                IgniteCache<Object, Object> cache1 = grid().cache("cache-1");
-                IgniteCache<Object, Object> cache2 = grid().cache("cache-2");
-
-                while (U.currentTimeMillis() < stopTime) {
-                    if (idx == 0) {
-                        putGet(cache1);
-                        putGet(cache2);
-                    }
-                    else {
-                        query(cache1);
-                        query(cache2);
-                    }
-                }
-            }
-        }, 10, "test-thread");
-    }
-
-    /**
-     *
-     */
-    static class TestData implements Serializable {
-        /** */
-        @QuerySqlField(index = true)
-        private int idxVal;
-
-        /**
-         * @param idxVal Value.
-         */
-        public TestData(int idxVal) {
-            this.idxVal = idxVal;
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
index 2c2cf65..9861153 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/CacheRandomOperationsMultithreadedTest.java
@@ -28,7 +28,6 @@ import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
@@ -51,8 +50,6 @@ import org.jetbrains.annotations.Nullable;
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -104,36 +101,9 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     /**
      * @throws Exception If failed.
      */
-    public void testAtomicOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            null,
-            false);
-
-        randomOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAtomicOffheapTieredIndexing() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            ATOMIC,
-            OFFHEAP_TIERED,
-            null,
-            true);
-
-        randomOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testAtomicOffheapEviction() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             ATOMIC,
-            ONHEAP_TIERED,
             new LruEvictionPolicy<>(10),
             false);
 
@@ -146,7 +116,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     public void testAtomicOffheapEvictionIndexing() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             ATOMIC,
-            ONHEAP_TIERED,
             new LruEvictionPolicy<>(10),
             true);
 
@@ -156,36 +125,9 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     /**
      * @throws Exception If failed.
      */
-    public void testTxOffheapTiered() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            null,
-            false);
-
-        randomOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTxOffheapTieredIndexing() throws Exception {
-        CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
-            TRANSACTIONAL,
-            OFFHEAP_TIERED,
-            null,
-            true);
-
-        randomOperations(ccfg);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testTxOffheapEviction() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             new LruEvictionPolicy<>(10),
             false);
 
@@ -198,7 +140,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     public void testTxOffheapEvictionIndexing() throws Exception {
         CacheConfiguration<Object, Object> ccfg = cacheConfiguration(PARTITIONED,
             TRANSACTIONAL,
-            ONHEAP_TIERED,
             new LruEvictionPolicy<>(10),
             true);
 
@@ -391,7 +332,6 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     /**
      * @param cacheMode Cache mode.
      * @param atomicityMode Cache atomicity mode.
-     * @param memoryMode Cache memory mode.
      * @param evictionPlc Eviction policy.
      * @param indexing Indexing flag.
      * @return Cache configuration.
@@ -399,18 +339,16 @@ public class CacheRandomOperationsMultithreadedTest extends GridCommonAbstractTe
     private CacheConfiguration<Object, Object> cacheConfiguration(
         CacheMode cacheMode,
         CacheAtomicityMode atomicityMode,
-        CacheMemoryMode memoryMode,
         @Nullable  EvictionPolicy<Object, Object> evictionPlc,
         boolean indexing) {
         CacheConfiguration<Object, Object> ccfg = new CacheConfiguration<>();
 
         ccfg.setAtomicityMode(atomicityMode);
         ccfg.setCacheMode(cacheMode);
-        ccfg.setMemoryMode(memoryMode);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
         ccfg.setAtomicWriteOrderMode(PRIMARY);
         ccfg.setEvictionPolicy(evictionPlc);
-        ccfg.setOffHeapMaxMemory(0);
+        ccfg.setOnheapCacheEnabled(evictionPlc != null);
 
         if (cacheMode == PARTITIONED)
             ccfg.setBackups(1);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
index 20b947b..392cdc7 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ClientReconnectAfterClusterRestartTest.java
@@ -23,7 +23,6 @@ import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.binary.BinaryObject;
 import org.apache.ignite.binary.BinaryObjectBuilder;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -32,7 +31,9 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.events.Event;
 import org.apache.ignite.events.EventType;
 import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.util.lang.GridAbsPredicate;
 import org.apache.ignite.lang.IgnitePredicate;
+import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 import org.jetbrains.annotations.NotNull;
 
@@ -76,7 +77,6 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
         ccfg.setName(CACHE_PARAMS);
         ccfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
         ccfg.setCacheMode(CacheMode.PARTITIONED);
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
 
         List<QueryEntity> queryEntities = new ArrayList<>();
 
@@ -161,9 +161,17 @@ public class ClientReconnectAfterClusterRestartTest extends GridCommonAbstractTe
 
             startGrid(0);
 
-            Thread.sleep(2_000);
+            assert GridTestUtils.waitForCondition(new GridAbsPredicate() {
+                @Override public boolean apply() {
+                    try {
+                        checkTopology(2);
 
-            checkTopology(2);
+                        return true;
+                    } catch (Exception ex) {
+                        return false;
+                    }
+                }
+            }, 30_000);
 
             info("Pre-insert");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
index 2c083fb..148ce74 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapSelfTest.java
@@ -87,7 +87,6 @@ public class GridCacheOffHeapSelfTest extends GridCommonAbstractTest {
 
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setCacheMode(REPLICATED);
-        cacheCfg.setOffHeapMaxMemory(1024L * 1024L * 1024L);
         cacheCfg.setIndexedTypes(Integer.class, CacheValue.class);
 
         cfg.setCacheConfiguration(cacheCfg);

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
index dc0083d..d64aa7c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexEntryEvictTest.java
@@ -35,7 +35,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
@@ -63,11 +62,8 @@ public class GridCacheOffheapIndexEntryEvictTest extends GridCommonAbstractTest
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setBackups(1);
-        cacheCfg.setOffHeapMaxMemory(0);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
-        cacheCfg.setMemoryMode(OFFHEAP_TIERED);
         cacheCfg.setEvictionPolicy(null);
-        cacheCfg.setSqlOnheapRowCacheSize(10);
         cacheCfg.setIndexedTypes(Integer.class, TestValue.class);
         cacheCfg.setNearConfiguration(null);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
index c55f51c..f9e555e 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffheapIndexGetSelfTest.java
@@ -38,7 +38,6 @@ import org.apache.ignite.transactions.TransactionConcurrency;
 import org.apache.ignite.transactions.TransactionIsolation;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.configuration.DeploymentMode.SHARED;
@@ -48,9 +47,6 @@ import static org.apache.ignite.configuration.DeploymentMode.SHARED;
  */
 public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
     /** */
-    private static final long OFFHEAP_MEM = 10L * 1024L;
-
-    /** */
     private final TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
     /** {@inheritDoc} */
@@ -79,11 +75,7 @@ public class GridCacheOffheapIndexGetSelfTest extends GridCommonAbstractTest {
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setBackups(1);
-        cacheCfg.setOffHeapMaxMemory(OFFHEAP_MEM);
-        cacheCfg.setEvictSynchronized(true);
-        cacheCfg.setEvictSynchronizedKeyBufferSize(1);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
-        cacheCfg.setMemoryMode(OFFHEAP_TIERED);
         cacheCfg.setEvictionPolicy(null);
 
         return cacheCfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
index b729336..17ee024 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheQuerySimpleBenchmark.java
@@ -26,7 +26,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
@@ -71,8 +70,6 @@ public class GridCacheQuerySimpleBenchmark extends GridCommonAbstractTest {
             Long.class, Person.class
         );
 
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-
         c.setCacheConfiguration(ccfg);
 
         return c;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
index 8f24670..d16e8bb 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/GridIndexingWithNoopSwapSelfTest.java
@@ -67,6 +67,7 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
         plc.setMaxSize(1000);
 
         cc.setEvictionPolicy(plc);
+        cc.setOnheapCacheEnabled(true);
         cc.setBackups(1);
         cc.setAtomicityMode(TRANSACTIONAL);
         cc.setIndexedTypes(
@@ -108,6 +109,6 @@ public class GridIndexingWithNoopSwapSelfTest extends GridCommonAbstractTest {
         SqlQuery<Integer, ObjectValue> qry =
             new SqlQuery(ObjectValue.class, "intVal >= ? order by intVal");
 
-        assertEquals(0, cache.query(qry.setArgs(0)).getAll().size());
+        assertEquals(10, cache.query(qry.setArgs(0)).getAll().size());
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
deleted file mode 100644
index 560d258..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapLocalTest.java
+++ /dev/null
@@ -1,28 +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.apache.ignite.internal.processors.cache;
-
-/**
- *
- */
-public class IgniteBinaryObjectQueryArgumentsOffheapLocalTest extends IgniteBinaryObjectQueryArgumentsOffheapTest {
-    /** {@inheritDoc} */
-    @Override protected boolean isLocal() {
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
deleted file mode 100644
index d1428ae..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsOffheapTest.java
+++ /dev/null
@@ -1,30 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-
-/**
- *
- */
-public class IgniteBinaryObjectQueryArgumentsOffheapTest extends IgniteBinaryObjectQueryArgumentsTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
index 390a090..9d18b62 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteBinaryObjectQueryArgumentsTest.java
@@ -30,7 +30,6 @@ import java.util.concurrent.ThreadLocalRandom;
 import javax.cache.Cache;
 
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.SqlQuery;
@@ -103,13 +102,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
     }
 
     /**
-     * @return Memory mode.
-     */
-    protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.ONHEAP_TIERED;
-    }
-
-    /**
      * @param cacheName Cache name.
      * @return Cache config.
      */
@@ -124,8 +116,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
 
         ccfg.setQueryEntities(Collections.singletonList(person));
 
-        ccfg.setMemoryMode(memoryMode());
-
         ccfg.setName(cacheName);
 
         return ccfg;
@@ -178,7 +168,6 @@ public class IgniteBinaryObjectQueryArgumentsTest extends GridCommonAbstractTest
 
         cfg.setName(cacheName);
 
-        cfg.setMemoryMode(memoryMode());
         cfg.setIndexedTypes(key, val);
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
index ccac8ea..200ca87 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheDistributedJoinQueryConditionsTest.java
@@ -23,7 +23,6 @@ import java.util.List;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.affinity.Affinity;
@@ -40,8 +39,6 @@ import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicWriteOrderMode.PRIMARY;
 import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 
 /**
@@ -63,9 +60,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
     /** */
     private int total;
 
-    /** */
-    private CacheMemoryMode memMode = ONHEAP_TIERED;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -105,15 +99,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
     }
 
     /**
-     * @throws Exception If failed.
-     */
-    public void testJoinQuery1Offheap() throws Exception {
-        memMode = OFFHEAP_TIERED;
-
-        testJoinQuery1();
-    }
-
-    /**
      * @param idx Use index flag.
      * @throws Exception If failed.
      */
@@ -582,7 +567,6 @@ public class IgniteCacheDistributedJoinQueryConditionsTest extends GridCommonAbs
         ccfg.setAtomicWriteOrderMode(PRIMARY);
         ccfg.setAtomicityMode(ATOMIC);
         ccfg.setBackups(0);
-        ccfg.setMemoryMode(memMode);
 
         return ccfg;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
index cb25c5f..22856b5 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapEvictQueryTest.java
@@ -24,7 +24,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 import javax.cache.CacheException;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteInterruptedException;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.CacheWriteSynchronizationMode;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
@@ -66,18 +65,13 @@ public class IgniteCacheOffheapEvictQueryTest extends GridCommonAbstractTest {
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cacheCfg.setBackups(0);
-        cacheCfg.setMemoryMode(CacheMemoryMode.ONHEAP_TIERED);
         cacheCfg.setEvictionPolicy(null);
         cacheCfg.setNearConfiguration(null);
 
-        cacheCfg.setSqlOnheapRowCacheSize(128);
-
         cacheCfg.setIndexedTypes(
             Integer.class, Integer.class
         );
 
-        cacheCfg.setOffHeapMaxMemory(2000); // Small offheap for evictions from offheap to swap.
-
         cfg.setCacheConfiguration(cacheCfg);
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
index 7cea826..6f46d33 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapIndexScanTest.java
@@ -21,7 +21,6 @@ import java.io.Serializable;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicBoolean;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.query.SqlFieldsQuery;
 import org.apache.ignite.cache.query.annotations.QuerySqlField;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -57,8 +56,6 @@ public class IgniteCacheOffheapIndexScanTest extends GridCommonAbstractTest {
         CacheConfiguration<?,?> cacheCfg = new CacheConfiguration<>();
 
         cacheCfg.setCacheMode(LOCAL);
-        cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-        cacheCfg.setSqlOnheapRowCacheSize(256);
         cacheCfg.setIndexedTypes(
             Integer.class, Person.class
         );

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
deleted file mode 100644
index f0551cd..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheOffheapTieredMultithreadedSelfTest.java
+++ /dev/null
@@ -1,301 +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.apache.ignite.internal.processors.cache;
-
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.cache.Cache;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.query.SqlQuery;
-import org.apache.ignite.cache.query.annotations.QuerySqlField;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import static org.apache.ignite.cache.CacheAtomicityMode.ATOMIC;
-import static org.apache.ignite.cache.CacheMode.PARTITIONED;
-
-/**
- * Based on Yardstick benchmark.
- */
-public class IgniteCacheOffheapTieredMultithreadedSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
-
-    /** */
-    private static final int RANGE = 1_000_000;
-
-    /** */
-    private static IgniteCache<Integer, Object> cache;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        TcpDiscoverySpi disco = new TcpDiscoverySpi();
-
-        disco.setIpFinder(ipFinder);
-
-        cfg.setDiscoverySpi(disco);
-
-        CacheConfiguration<?,?> cacheCfg = new CacheConfiguration<>();
-
-        cacheCfg.setCacheMode(PARTITIONED);
-        cacheCfg.setAtomicityMode(ATOMIC);
-        cacheCfg.setBackups(1);
-        cacheCfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-        cacheCfg.setIndexedTypes(
-            Integer.class, Person.class
-        );
-
-        cfg.setCacheConfiguration(cacheCfg);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        startGridsMultiThreaded(3, false);
-
-        cache = grid(0).cache(null);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testQueryPut() throws Exception {
-        final AtomicBoolean end = new AtomicBoolean();
-
-        IgniteInternalFuture<?> fut = multithreadedAsync(new Callable<Void>() {
-            @Override public Void call() throws Exception {
-                ThreadLocalRandom rnd = ThreadLocalRandom.current();
-
-                while(!end.get()) {
-                    if (rnd.nextInt(5) == 0) {
-                        double salary = rnd.nextDouble() * RANGE * 1000;
-
-                        double maxSalary = salary + 1000;
-
-                        Collection<Cache.Entry<Integer, Object>> entries = executeQuery(salary, maxSalary);
-
-                        for (Cache.Entry<Integer, Object> entry : entries) {
-                            Person p = (Person)entry.getValue();
-
-                            if (p.getSalary() < salary || p.getSalary() > maxSalary)
-                                throw new Exception("Invalid person retrieved [min=" + salary + ", max=" + maxSalary +
-                                    ", person=" + p + ']');
-                        }
-                    }
-                    else {
-                        int i = rnd.nextInt(RANGE);
-
-                        cache.put(i, new Person(i, "firstName" + i, "lastName" + i, i * 1000));
-                    }
-                }
-
-                return null;
-            }
-        }, 64);
-
-        Thread.sleep(30 * 1000);
-
-        end.set(true);
-
-        fut.get();
-    }
-
-
-
-    /**
-     * @param minSalary Min salary.
-     * @param maxSalary Max salary.
-     * @return Query result.
-     * @throws Exception If failed.
-     */
-    private Collection<Cache.Entry<Integer, Object>> executeQuery(double minSalary, double maxSalary) throws Exception {
-        SqlQuery qry = new SqlQuery(Person.class, "salary >= ? and salary <= ?");
-
-        qry.setArgs(minSalary, maxSalary);
-
-        return cache.query(qry).getAll();
-    }
-
-    /**
-     * Person record used for query test.
-     */
-    public static class Person implements Serializable {
-        /** Person ID. */
-        @QuerySqlField(index = true)
-        private int id;
-
-        /** Organization ID. */
-        @QuerySqlField(index = true)
-        private int orgId;
-
-        /** First name (not-indexed). */
-        @QuerySqlField
-        private String firstName;
-
-        /** Last name (not indexed). */
-        @QuerySqlField
-        private String lastName;
-
-        /** Salary. */
-        @QuerySqlField(index = true)
-        private double salary;
-
-        /**
-         * Constructs empty person.
-         */
-        public Person() {
-            // No-op.
-        }
-
-        /**
-         * Constructs person record that is not linked to any organization.
-         *
-         * @param id Person ID.
-         * @param firstName First name.
-         * @param lastName Last name.
-         * @param salary Salary.
-         */
-        public Person(int id, String firstName, String lastName, double salary) {
-            this(id, 0, firstName, lastName, salary);
-        }
-
-        /**
-         * Constructs person record.
-         *
-         * @param id Person ID.
-         * @param orgId Organization ID.
-         * @param firstName First name.
-         * @param lastName Last name.
-         * @param salary Salary.
-         */
-        public Person(int id, int orgId, String firstName, String lastName, double salary) {
-            this.id = id;
-            this.orgId = orgId;
-            this.firstName = firstName;
-            this.lastName = lastName;
-            this.salary = salary;
-        }
-
-        /**
-         * @return Person id.
-         */
-        public int getId() {
-            return id;
-        }
-
-        /**
-         * @param id Person id.
-         */
-        public void setId(int id) {
-            this.id = id;
-        }
-
-        /**
-         * @return Organization id.
-         */
-        public int getOrganizationId() {
-            return orgId;
-        }
-
-        /**
-         * @param orgId Organization id.
-         */
-        public void setOrganizationId(int orgId) {
-            this.orgId = orgId;
-        }
-
-        /**
-         * @return Person first name.
-         */
-        public String getFirstName() {
-            return firstName;
-        }
-
-        /**
-         * @param firstName Person first name.
-         */
-        public void setFirstName(String firstName) {
-            this.firstName = firstName;
-        }
-
-        /**
-         * @return Person last name.
-         */
-        public String getLastName() {
-            return lastName;
-        }
-
-        /**
-         * @param lastName Person last name.
-         */
-        public void setLastName(String lastName) {
-            this.lastName = lastName;
-        }
-
-        /**
-         * @return Salary.
-         */
-        public double getSalary() {
-            return salary;
-        }
-
-        /**
-         * @param salary Salary.
-         */
-        public void setSalary(double salary) {
-            this.salary = salary;
-        }
-
-        /** {@inheritDoc} */
-        @Override public boolean equals(Object o) {
-            return this == o || (o instanceof Person) && id == ((Person)o).id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public int hashCode() {
-            return id;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "Person [firstName=" + firstName +
-                ", id=" + id +
-                ", orgId=" + orgId +
-                ", lastName=" + lastName +
-                ", salary=" + salary +
-                ']';
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
index dcc5647..7787ce2 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueriesLoadTest1.java
@@ -57,7 +57,6 @@ import org.apache.ignite.testframework.GridTestUtils;
 import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.TRANSACTIONAL;
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
 import static org.apache.ignite.transactions.TransactionConcurrency.PESSIMISTIC;
@@ -160,7 +159,6 @@ public class IgniteCacheQueriesLoadTest1 extends GridCommonAbstractTest {
         parentCfg.setAffinity(aff);
         parentCfg.setAtomicityMode(TRANSACTIONAL);
         parentCfg.setCacheMode(PARTITIONED);
-        parentCfg.setMemoryMode(OFFHEAP_TIERED);
         parentCfg.setBackups(2);
         parentCfg.setWriteSynchronizationMode(FULL_SYNC);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
deleted file mode 100644
index 630dfd9..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest.java
+++ /dev/null
@@ -1,38 +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.apache.ignite.internal.processors.cache;
-
-import org.apache.ignite.cache.CacheMemoryMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-
-/**
- * Test queries in off-heap tiered mode.
- */
-public class IgniteCacheQueryMultiThreadedOffHeapTieredSelfTest extends IgniteCacheQueryMultiThreadedSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheConfiguration cacheConfiguration() {
-        CacheConfiguration ccfg = super.cacheConfiguration();
-
-        ccfg.setCacheMode(CacheMode.REPLICATED);
-        ccfg.setMemoryMode(CacheMemoryMode.OFFHEAP_TIERED);
-        ccfg.setOffHeapMaxMemory(0);
-
-        return ccfg;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
index 54ef4fe..1f2ec99 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryMultiThreadedSelfTest.java
@@ -31,7 +31,6 @@ import javax.cache.Cache;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CachePeekMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.query.ScanQuery;
@@ -121,11 +120,7 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         }
 
         cacheCfg.setEvictionPolicy(plc);
-
-        cacheCfg.setSqlOnheapRowCacheSize(128);
-
-        if (offheapEnabled())
-            cacheCfg.setOffHeapMaxMemory(evictsEnabled() ? 1000 : 0); // Small offheap for evictions.
+        cacheCfg.setOnheapCacheEnabled(plc != null);
 
         return cacheCfg;
     }
@@ -163,11 +158,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         }
     }
 
-    /** @return {@code true} If offheap enabled. */
-    protected boolean offheapEnabled() {
-        return false;
-    }
-
     /** @return {@code true} If evictions enabled. */
     protected boolean evictsEnabled() {
         return false;
@@ -273,9 +263,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         // Put test values into cache.
         final IgniteCache<Integer, String> c = cache(Integer.class, String.class);
 
-        if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            return;
-
         assertEquals(0, g.cache(null).localSize());
         assertEquals(0, c.query(new SqlQuery(String.class, "1 = 1")).getAll().size());
 
@@ -346,9 +333,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         // Put test values into cache.
         final IgniteCache<Integer, Long> c = cache(Integer.class, Long.class);
 
-        if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            return;
-
         assertEquals(0, g.cache(null).localSize());
         assertEquals(0, c.query(new SqlQuery(Long.class, "1 = 1")).getAll().size());
 
@@ -422,9 +406,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         // Put test values into cache.
         final IgniteCache<Integer, Object> c = cache(Integer.class, Object.class);
 
-        if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            return;
-
         assertEquals(0, g.cache(null).size());
         assertEquals(0, c.query(new SqlQuery(Object.class, "1 = 1")).getAll().size());
 
@@ -496,9 +477,6 @@ public class IgniteCacheQueryMultiThreadedSelfTest extends GridCommonAbstractTes
         // Put test values into cache.
         final IgniteCache<Integer, TestValue> c = cache(Integer.class, TestValue.class);
 
-        if (c.getConfiguration(CacheConfiguration.class).getMemoryMode() == CacheMemoryMode.OFFHEAP_TIERED)
-            return;
-
         assertEquals(0, g.cache(null).localSize());
         assertEquals(0, c.query(new SqlQuery(TestValue.class, "1 = 1")).getAll().size());
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
deleted file mode 100644
index d7d2b5a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest.java
+++ /dev/null
@@ -1,28 +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.apache.ignite.internal.processors.cache;
-
-/**
- * Multi-threaded tests for cache queries.
- */
-public class IgniteCacheQueryOffheapEvictsMultiThreadedSelfTest extends IgniteCacheQueryOffheapMultiThreadedSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean evictsEnabled() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
deleted file mode 100644
index db132b8..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheQueryOffheapMultiThreadedSelfTest.java
+++ /dev/null
@@ -1,28 +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.apache.ignite.internal.processors.cache;
-
-/**
- * Queries over off-heap indexes.
- */
-public class IgniteCacheQueryOffheapMultiThreadedSelfTest extends IgniteCacheQueryMultiThreadedSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean offheapEnabled() {
-        return true;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
index 6dd0d93..cd35788 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCrossCachesJoinsQueryTest.java
@@ -35,7 +35,6 @@ import java.util.concurrent.Callable;
 import javax.cache.CacheException;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
@@ -56,8 +55,6 @@ import org.apache.ignite.spi.discovery.tcp.ipfinder.TcpDiscoveryIpFinder;
 import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
 import org.apache.ignite.testframework.GridTestUtils;
 
-import static org.apache.ignite.cache.CacheMemoryMode.OFFHEAP_TIERED;
-import static org.apache.ignite.cache.CacheMemoryMode.ONHEAP_TIERED;
 import static org.apache.ignite.cache.CacheMode.PARTITIONED;
 import static org.apache.ignite.cache.CacheMode.REPLICATED;
 import static org.apache.ignite.cache.CacheWriteSynchronizationMode.FULL_SYNC;
@@ -100,9 +97,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
     /** */
     private static Random rnd;
 
-    /** */
-    private CacheMemoryMode memMode = ONHEAP_TIERED;
-
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
@@ -335,15 +329,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
     /**
      * @throws Exception If failed.
      */
-    public void testDistributedJoins1Offheap() throws Exception {
-        memMode = OFFHEAP_TIERED;
-
-        testDistributedJoins1();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
     public void testDistributedJoins2() throws Exception {
         distributedJoins = true;
 
@@ -737,7 +722,6 @@ public class IgniteCrossCachesJoinsQueryTest extends AbstractH2CompareQueryTest
         CacheConfiguration ccfg = new CacheConfiguration();
 
         ccfg.setName(cacheName);
-        ccfg.setMemoryMode(memMode);
         ccfg.setCacheMode(cacheMode);
 
         if (cacheMode == PARTITIONED)

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
index d022b0f..8367b2c 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheQueryNodeRestartDistributedJoinSelfTest.java
@@ -175,7 +175,8 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa
                         if (c % logFreq == 0)
                             info("Executed queries: " + c);
                     }
-                }catch (Throwable e){
+                }
+                catch (Throwable e){
                     e.printStackTrace();
 
                     error("Got exception: " + e.getMessage());
@@ -193,40 +194,47 @@ public class IgniteCacheQueryNodeRestartDistributedJoinSelfTest extends IgniteCa
         IgniteInternalFuture<?> fut2 = multithreadedAsync(new Callable<Object>() {
             @SuppressWarnings({"BusyWait"})
             @Override public Object call() throws Exception {
-                GridRandom rnd = new GridRandom();
+                try {
+                    GridRandom rnd = new GridRandom();
 
-                while (!restartsDone.get()) {
-                    int g;
+                    while (!restartsDone.get()) {
+                        int g;
 
-                    do {
-                        g = rnd.nextInt(locks.length());
+                        do {
+                            g = rnd.nextInt(locks.length());
 
-                        if (fail.get())
-                            return null;
-                    }
-                    while (!locks.compareAndSet(g, 0, -1));
+                            if (fail.get())
+                                return null;
+                        }
+                        while (!locks.compareAndSet(g, 0, -1));
 
-                    log.info("Stop node: " + g);
+                        log.info("Stop node: " + g);
 
-                    stopGrid(g);
+                        stopGrid(g);
 
-                    Thread.sleep(rnd.nextInt(nodeLifeTime));
+                        Thread.sleep(rnd.nextInt(nodeLifeTime));
 
-                    log.info("Start node: " + g);
+                        log.info("Start node: " + g);
 
-                    startGrid(g);
+                        startGrid(g);
 
-                    Thread.sleep(rnd.nextInt(nodeLifeTime));
+                        Thread.sleep(rnd.nextInt(nodeLifeTime));
 
-                    locks.set(g, 0);
+                        locks.set(g, 0);
 
-                    int c = restartCnt.incrementAndGet();
+                        int c = restartCnt.incrementAndGet();
 
-                    if (c % logFreq == 0)
-                        info("Node restarts: " + c);
+                        if (c % logFreq == 0)
+                            info("Node restarts: " + c);
+                    }
+
+                    return true;
                 }
+                catch (Throwable e) {
+                    e.printStackTrace();
 
-                return true;
+                    return true;
+                }
             }
         }, restartThreadsNum, "restart-thread");
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
index 484c99b..02b6b3b 100644
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAbstractSelfTest.java
@@ -31,7 +31,6 @@ import javax.cache.integration.CompletionListenerFuture;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteDataStreamer;
 import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMemoryMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.eviction.lru.LruEvictionPolicy;
 import org.apache.ignite.cache.query.SqlQuery;
@@ -78,13 +77,12 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
 
         ccfg.setCacheMode(cacheMode());
         ccfg.setAtomicityMode(atomicityMode());
-        ccfg.setMemoryMode(memoryMode());
-        ccfg.setOffHeapMaxMemory(0);
 
         LruEvictionPolicy plc = new LruEvictionPolicy();
         plc.setMaxSize(MAX_CACHE_SIZE);
 
         ccfg.setEvictionPolicy(plc);
+        ccfg.setOnheapCacheEnabled(true);
         ccfg.setIndexedTypes(Integer.class, Integer.class);
         ccfg.setBackups(2);
         ccfg.setWriteSynchronizationMode(FULL_SYNC);
@@ -125,11 +123,6 @@ public abstract class CacheTtlAbstractSelfTest extends GridCommonAbstractTest {
     protected abstract CacheAtomicityMode atomicityMode();
 
     /**
-     * @return Memory mode.
-     */
-    protected abstract CacheMemoryMode memoryMode();
-
-    /**
      * @return Cache mode.
      */
     protected abstract CacheMode cacheMode();

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
new file mode 100644
index 0000000..51054c4
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicAbstractSelfTest.java
@@ -0,0 +1,29 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.CacheAtomicityMode;
+
+/**
+ * TTL test with offheap.
+ */
+public abstract class CacheTtlAtomicAbstractSelfTest extends CacheTtlAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheAtomicityMode atomicityMode() {
+        return CacheAtomicityMode.ATOMIC;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
new file mode 100644
index 0000000..3644636
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicLocalSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.CacheMode;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlAtomicLocalSelfTest extends CacheTtlAtomicAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return CacheMode.LOCAL;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 1;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
new file mode 100644
index 0000000..5c1a484
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlAtomicPartitionedSelfTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.apache.ignite.internal.processors.cache.ttl;
+
+import org.apache.ignite.cache.*;
+
+/**
+ * TTL test with offheap.
+ */
+public class CacheTtlAtomicPartitionedSelfTest extends CacheTtlAtomicAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected CacheMode cacheMode() {
+        return CacheMode.PARTITIONED;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected int gridCount() {
+        return 2;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
deleted file mode 100644
index 59ed837..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.*;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapAbstractSelfTest extends CacheTtlAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMemoryMode memoryMode() {
-        return CacheMemoryMode.OFFHEAP_TIERED;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
deleted file mode 100644
index 6afb4d0..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicAbstractSelfTest.java
+++ /dev/null
@@ -1,29 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheAtomicityMode;
-
-/**
- * TTL test with offheap.
- */
-public abstract class CacheTtlOffheapAtomicAbstractSelfTest extends CacheTtlOffheapAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheAtomicityMode atomicityMode() {
-        return CacheAtomicityMode.ATOMIC;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/c56c4b8c/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java b/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
deleted file mode 100644
index da6631a..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/ttl/CacheTtlOffheapAtomicLocalSelfTest.java
+++ /dev/null
@@ -1,34 +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.apache.ignite.internal.processors.cache.ttl;
-
-import org.apache.ignite.cache.CacheMode;
-
-/**
- * TTL test with offheap.
- */
-public class CacheTtlOffheapAtomicLocalSelfTest extends CacheTtlOffheapAtomicAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected CacheMode cacheMode() {
-        return CacheMode.LOCAL;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected int gridCount() {
-        return 1;
-    }
-}
\ No newline at end of file


[33/57] [abbrv] ignite git commit: ignite-3477-master - drop FairAffinityFunction

Posted by ag...@apache.org.
ignite-3477-master - drop FairAffinityFunction


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

Branch: refs/heads/ignite-3477-debug
Commit: f9b64246f4bce407cb52853bdf296270ece69036
Parents: 01b088f
Author: Sergi Vladykin <se...@gmail.com>
Authored: Tue Apr 11 12:42:19 2017 +0300
Committer: Sergi Vladykin <se...@gmail.com>
Committed: Tue Apr 11 12:42:19 2017 +0300

----------------------------------------------------------------------
 .../affinity/fair/FairAffinityFunction.java     | 1159 ------------------
 .../cache/affinity/fair/package-info.java       |   21 -
 .../utils/PlatformConfigurationUtils.java       |   40 +-
 .../GridCacheAffinityBackupsSelfTest.java       |   20 +-
 .../ignite/IgniteCacheAffinitySelfTest.java     |   12 +-
 .../affinity/AffinityClientNodeSelfTest.java    |   15 +-
 .../affinity/AffinityHistoryCleanupTest.java    |    3 +-
 .../fair/FairAffinityDynamicCacheSelfTest.java  |   86 --
 ...airAffinityFunctionBackupFilterSelfTest.java |   44 -
 ...ffinityFunctionExcludeNeighborsSelfTest.java |   31 -
 .../fair/FairAffinityFunctionNodesSelfTest.java |  247 ----
 .../fair/FairAffinityFunctionSelfTest.java      |   31 -
 .../affinity/fair/FairAffinityNodesRestart.java |  130 --
 .../local/LocalAffinityFunctionTest.java        |    4 +-
 ...CacheExchangeMessageDuplicatedStateTest.java |   33 -
 .../cache/CrossCacheTxRandomOperationsTest.java |   36 +-
 .../GridCacheVersionTopologyChangeTest.java     |    5 -
 .../IgniteClientAffinityAssignmentSelfTest.java |   20 +-
 ...eDynamicCacheStartNoExchangeTimeoutTest.java |    3 -
 ...eLateAffinityAssignmentFairAffinityTest.java |   32 -
 ...teCacheClientNodePartitionsExchangeTest.java |   18 +-
 .../IgniteCacheTxFairAffinityNodeJoinTest.java  |   35 -
 ...arDisabledFairAffinityPutGetRestartTest.java |   35 -
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 .../AtomicPutAllChangingTopologyTest.java       |    4 +-
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...micFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...ledFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...derFairAffinityMultiNodeFullApiSelfTest.java |   36 -
 ...nlyFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...xcludeNeighborsMultiNodeFullApiSelfTest.java |   36 -
 ...tedFairAffinityMultiNodeFullApiSelfTest.java |   35 -
 ...nedFairAffinityMultiNodeFullApiSelfTest.java |   37 -
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...omicFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   36 -
 ...rderFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...OnlyFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...onedFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 ...bledFairAffinityMultiJvmFullApiSelfTest.java |   31 -
 .../configvariations/ConfigVariations.java      |    2 -
 .../IgniteCacheFailoverTestSuite.java           |    4 -
 ...IgniteCacheFullApiMultiJvmSelfTestSuite.java |   15 -
 .../IgniteCacheFullApiSelfTestSuite.java        |   24 +-
 .../ignite/testsuites/IgniteCacheTestSuite.java |    9 +-
 .../testsuites/IgniteCacheTestSuite2.java       |    4 -
 .../testsuites/IgniteCacheTestSuite5.java       |   10 -
 47 files changed, 37 insertions(+), 2639 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java
deleted file mode 100644
index fb19fb5..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunction.java
+++ /dev/null
@@ -1,1159 +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.apache.ignite.cache.affinity.fair;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-import java.util.RandomAccess;
-import java.util.UUID;
-import org.apache.ignite.IgniteLogger;
-import org.apache.ignite.cache.affinity.AffinityCentralizedFunction;
-import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.AffinityFunctionContext;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.events.DiscoveryEvent;
-import org.apache.ignite.events.EventType;
-import org.apache.ignite.internal.processors.cache.GridCacheUtils;
-import org.apache.ignite.internal.util.typedef.F;
-import org.apache.ignite.internal.util.typedef.internal.A;
-import org.apache.ignite.internal.util.typedef.internal.LT;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lang.IgniteBiPredicate;
-import org.apache.ignite.lang.IgnitePredicate;
-import org.apache.ignite.resources.LoggerResource;
-import org.jetbrains.annotations.Nullable;
-
-/**
- * Fair affinity function which tries to ensure that all nodes get equal number of partitions with
- * minimum amount of reassignments between existing nodes.
- * This function supports the following configuration:
- * <ul>
- * <li>
- *      {@code partitions} - Number of partitions to spread across nodes.
- * </li>
- * <li>
- *      {@code excludeNeighbors} - If set to {@code true}, will exclude same-host-neighbors
- *      from being backups of each other. This flag can be ignored in cases when topology has no enough nodes
- *      for assign backups.
- *      Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
- * </li>
- * <li>
- *      {@code backupFilter} - Optional filter for back up nodes. If provided, then only
- *      nodes that pass this filter will be selected as backup nodes. If not provided, then
- *      primary and backup nodes will be selected out of all nodes available for this cache.
- * </li>
- * </ul>
- * <p>
- * Cache affinity can be configured for individual caches via {@link CacheConfiguration#getAffinity()} method.
- */
-@AffinityCentralizedFunction
-public class FairAffinityFunction implements AffinityFunction {
-    /** Default partition count. */
-    public static final int DFLT_PART_CNT = 256;
-
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** Ascending comparator. */
-    private static final Comparator<PartitionSet> ASC_CMP = new PartitionSetComparator();
-
-    /** Descending comparator. */
-    private static final Comparator<PartitionSet> DESC_CMP = Collections.reverseOrder(ASC_CMP);
-
-    /** Number of partitions. */
-    private int parts;
-
-    /** Exclude neighbors flag. */
-    private boolean exclNeighbors;
-
-    /** Exclude neighbors warning. */
-    private transient boolean exclNeighborsWarn;
-
-    /** Logger instance. */
-    @LoggerResource
-    private transient IgniteLogger log;
-
-    /** Optional backup filter. First node is primary, second node is a node being tested. */
-    private IgniteBiPredicate<ClusterNode, ClusterNode> backupFilter;
-
-    /** Optional affinity backups filter. The first node is a node being tested, the second is a list of nodes that are already assigned for a given partition (primary node is the first in the list). */
-    private IgniteBiPredicate<ClusterNode, List<ClusterNode>> affinityBackupFilter;
-
-    /**
-     * Empty constructor with all defaults.
-     */
-    public FairAffinityFunction() {
-        this(false);
-    }
-
-    /**
-     * Initializes affinity with flag to exclude same-host-neighbors from being backups of each other
-     * and specified number of backups.
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param exclNeighbors {@code True} if nodes residing on the same host may not act as backups
-     *      of each other.
-     */
-    public FairAffinityFunction(boolean exclNeighbors) {
-        this(exclNeighbors, DFLT_PART_CNT);
-    }
-
-    /**
-     * @param parts Number of partitions.
-     */
-    public FairAffinityFunction(int parts) {
-        this(false, parts);
-    }
-
-    /**
-     * Initializes affinity with flag to exclude same-host-neighbors from being backups of each other,
-     * and specified number of backups and partitions.
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param exclNeighbors {@code True} if nodes residing on the same host may not act as backups
-     *      of each other.
-     * @param parts Total number of partitions.
-     */
-    public FairAffinityFunction(boolean exclNeighbors, int parts) {
-        this(exclNeighbors, parts, null);
-    }
-
-    /**
-     * Initializes optional counts for replicas and backups.
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param parts Total number of partitions.
-     * @param backupFilter Optional back up filter for nodes. If provided, backups will be selected
-     *      from all nodes that pass this filter. First argument for this filter is primary node, and second
-     *      argument is node being tested.
-     */
-    public FairAffinityFunction(int parts, @Nullable IgniteBiPredicate<ClusterNode, ClusterNode> backupFilter) {
-        this(false, parts, backupFilter);
-    }
-
-    /**
-     * Private constructor.
-     *
-     * @param exclNeighbors Exclude neighbors flag.
-     * @param parts Partitions count.
-     * @param backupFilter Backup filter.
-     */
-    private FairAffinityFunction(boolean exclNeighbors, int parts,
-        IgniteBiPredicate<ClusterNode, ClusterNode> backupFilter) {
-        A.ensure(parts > 0, "parts > 0");
-        A.ensure(parts <= CacheConfiguration.MAX_PARTITIONS_COUNT, "parts <=" + CacheConfiguration.MAX_PARTITIONS_COUNT);
-
-        this.exclNeighbors = exclNeighbors;
-        this.parts = parts;
-        this.backupFilter = backupFilter;
-    }
-
-    /**
-     * Gets total number of key partitions. To ensure that all partitions are
-     * equally distributed across all nodes, please make sure that this
-     * number is significantly larger than a number of nodes. Also, partition
-     * size should be relatively small. Try to avoid having partitions with more
-     * than quarter million keys.
-     * <p>
-     * Note that for fully replicated caches this method should always
-     * return {@code 1}.
-     *
-     * @return Total partition count.
-     */
-    public int getPartitions() {
-        return parts;
-    }
-
-    /**
-     * Sets total number of partitions.
-     *
-     * @param parts Total number of partitions.
-     * @return {@code this} for chaining.
-     */
-    public FairAffinityFunction setPartitions(int parts) {
-        A.ensure(parts <= CacheConfiguration.MAX_PARTITIONS_COUNT, "parts <= " + CacheConfiguration.MAX_PARTITIONS_COUNT);
-
-        this.parts = parts;
-
-        return this;
-    }
-
-
-    /**
-     * Gets optional backup filter. If not {@code null}, backups will be selected
-     * from all nodes that pass this filter. First node passed to this filter is primary node,
-     * and second node is a node being tested.
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @return Optional backup filter.
-     */
-    @Nullable public IgniteBiPredicate<ClusterNode, ClusterNode> getBackupFilter() {
-        return backupFilter;
-    }
-
-    /**
-     * Sets optional backup filter. If provided, then backups will be selected from all
-     * nodes that pass this filter. First node being passed to this filter is primary node,
-     * and second node is a node being tested.
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param backupFilter Optional backup filter.
-     * @deprecated Use {@code affinityBackupFilter} instead.
-     * @return {@code this} for chaining.
-     */
-    @Deprecated
-    public FairAffinityFunction setBackupFilter(@Nullable IgniteBiPredicate<ClusterNode, ClusterNode> backupFilter) {
-        this.backupFilter = backupFilter;
-
-        return this;
-    }
-
-    /**
-     * Gets optional backup filter. If not {@code null}, backups will be selected
-     * from all nodes that pass this filter. First node passed to this filter is a node being tested,
-     * and the second parameter is a list of nodes that are already assigned for a given partition (primary node is the first in the list).
-     * <p>
-     * Note that {@code affinityBackupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @return Optional backup filter.
-     */
-    @Nullable public IgniteBiPredicate<ClusterNode, List<ClusterNode>> getAffinityBackupFilter() {
-        return affinityBackupFilter;
-    }
-
-    /**
-     * Sets optional backup filter. If provided, then backups will be selected from all
-     * nodes that pass this filter. First node being passed to this filter is a node being tested,
-     * and the second parameter is a list of nodes that are already assigned for a given partition (primary node is the first in the list).
-     * <p>
-     * Note that {@code affinityBackupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param affinityBackupFilter Optional backup filter.
-     * @return {@code this} for chaining.
-     */
-    public FairAffinityFunction setAffinityBackupFilter(
-        @Nullable IgniteBiPredicate<ClusterNode, List<ClusterNode>> affinityBackupFilter) {
-        this.affinityBackupFilter = affinityBackupFilter;
-
-        return this;
-    }
-
-    /**
-     * Checks flag to exclude same-host-neighbors from being backups of each other (default is {@code false}).
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @return {@code True} if nodes residing on the same host may not act as backups of each other.
-     */
-    public boolean isExcludeNeighbors() {
-        return exclNeighbors;
-    }
-
-    /**
-     * Sets flag to exclude same-host-neighbors from being backups of each other (default is {@code false}).
-     * <p>
-     * Note that {@code backupFilter} is ignored if {@code excludeNeighbors} is set to {@code true}.
-     *
-     * @param exclNeighbors {@code True} if nodes residing on the same host may not act as backups of each other.
-     * @return {@code this} for chaining.
-     */
-    public FairAffinityFunction setExcludeNeighbors(boolean exclNeighbors) {
-        this.exclNeighbors = exclNeighbors;
-
-        return this;
-    }
-
-    /** {@inheritDoc} */
-    @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext ctx) {
-        List<ClusterNode> topSnapshot = ctx.currentTopologySnapshot();
-
-        if (topSnapshot.size() == 1) {
-            ClusterNode primary = topSnapshot.get(0);
-
-            return Collections.nCopies(parts, Collections.singletonList(primary));
-        }
-
-        Map<UUID, Collection<ClusterNode>> neighborhoodMap = exclNeighbors
-            ? GridCacheUtils.neighbors(ctx.currentTopologySnapshot())
-            : null;
-
-        List<List<ClusterNode>> assignment = createCopy(ctx, neighborhoodMap);
-
-        int backups = ctx.backups();
-
-        int tiers = backups == Integer.MAX_VALUE ? topSnapshot.size() : Math.min(backups + 1, topSnapshot.size());
-
-        // Per tier pending partitions.
-        Map<Integer, Queue<Integer>> pendingParts = new HashMap<>();
-
-        FullAssignmentMap fullMap = new FullAssignmentMap(tiers, assignment, topSnapshot, neighborhoodMap);
-
-        for (int tier = 0; tier < tiers; tier++) {
-            // Check if this is a new tier and add pending partitions.
-            Queue<Integer> pending = pendingParts.get(tier);
-
-            for (int part = 0; part < parts; part++) {
-                if (fullMap.assignments.get(part).size() < tier + 1) {
-                    if (pending == null)
-                        pendingParts.put(tier, pending = new LinkedList<>());
-
-                    if (!pending.contains(part))
-                        pending.add(part);
-                }
-            }
-
-            // Assign pending partitions, if any.
-            assignPending(tier, pendingParts, fullMap, topSnapshot, false);
-
-            // Balance assignments.
-            boolean balanced = balance(tier, pendingParts, fullMap, topSnapshot, false);
-
-            if (!balanced && exclNeighbors) {
-                assignPending(tier, pendingParts, fullMap, topSnapshot, true);
-
-                balance(tier, pendingParts, fullMap, topSnapshot, true);
-
-                if (!exclNeighborsWarn) {
-                    LT.warn(log, "Affinity function excludeNeighbors property is ignored " +
-                        "because topology has no enough nodes to assign backups.");
-
-                    exclNeighborsWarn = true;
-                }
-            }
-        }
-
-        return fullMap.assignments;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void reset() {
-        // No-op.
-    }
-
-    /** {@inheritDoc} */
-    @Override public int partitions() {
-        return parts;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int partition(Object key) {
-        if (key == null)
-            throw new IllegalArgumentException("Null key is passed for a partition calculation. " +
-                "Make sure that an affinity key that is used is initialized properly.");
-
-        return U.safeAbs(hash(key.hashCode())) % parts;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void removeNode(UUID nodeId) {
-        // No-op.
-    }
-
-    /**
-     * Assigns pending (unassigned) partitions to nodes.
-     *
-     * @param tier Tier to assign (0 is primary, 1 - 1st backup,...).
-     * @param pendingMap Pending partitions per tier.
-     * @param fullMap Full assignment map to modify.
-     * @param topSnapshot Topology snapshot.
-     * @param allowNeighbors Allow neighbors nodes for partition.
-     */
-    private void assignPending(int tier,
-        Map<Integer, Queue<Integer>> pendingMap,
-        FullAssignmentMap fullMap,
-        List<ClusterNode> topSnapshot,
-        boolean allowNeighbors)
-    {
-        Queue<Integer> pending = pendingMap.get(tier);
-
-        if (F.isEmpty(pending))
-            return;
-
-        int idealPartCnt = parts / topSnapshot.size();
-
-        Map<UUID, PartitionSet> tierMapping = fullMap.tierMapping(tier);
-
-        PrioritizedPartitionMap underloadedNodes = filterNodes(tierMapping, idealPartCnt, false);
-
-        // First iterate over underloaded nodes.
-        assignPendingToUnderloaded(tier, pendingMap, fullMap, underloadedNodes, topSnapshot, false, allowNeighbors);
-
-        if (!pending.isEmpty() && !underloadedNodes.isEmpty()) {
-            // Same, forcing updates.
-            assignPendingToUnderloaded(tier, pendingMap, fullMap, underloadedNodes, topSnapshot, true, allowNeighbors);
-        }
-
-        if (!pending.isEmpty())
-            assignPendingToNodes(tier, pendingMap, fullMap, topSnapshot, allowNeighbors);
-
-        if (pending.isEmpty())
-            pendingMap.remove(tier);
-    }
-
-    /**
-     * Assigns pending partitions to underloaded nodes.
-     *
-     * @param tier Tier to assign.
-     * @param pendingMap Pending partitions per tier.
-     * @param fullMap Full assignment map to modify.
-     * @param underloadedNodes Underloaded nodes.
-     * @param topSnapshot Topology snapshot.
-     * @param force {@code True} if partitions should be moved.
-     * @param allowNeighbors Allow neighbors nodes for partition.
-     */
-    private void assignPendingToUnderloaded(
-        int tier,
-        Map<Integer, Queue<Integer>> pendingMap,
-        FullAssignmentMap fullMap,
-        PrioritizedPartitionMap underloadedNodes,
-        Collection<ClusterNode> topSnapshot,
-        boolean force,
-        boolean allowNeighbors) {
-        Iterator<Integer> it = pendingMap.get(tier).iterator();
-
-        int ideal = parts / topSnapshot.size();
-
-        while (it.hasNext()) {
-            int part = it.next();
-
-            for (PartitionSet set : underloadedNodes.assignments()) {
-                ClusterNode node = set.node();
-
-                assert node != null;
-
-                if (fullMap.assign(part, tier, node, pendingMap, force, allowNeighbors)) {
-                    // We could add partition to partition map without forcing, remove partition from pending.
-                    it.remove();
-
-                    if (set.size() <= ideal)
-                        underloadedNodes.remove(set.nodeId());
-                    else
-                        underloadedNodes.update();
-
-                    break; // for, continue to the next partition.
-                }
-            }
-
-            if (underloadedNodes.isEmpty())
-                return;
-        }
-    }
-
-    /**
-     * Spreads pending partitions equally to all nodes in topology snapshot.
-     *
-     * @param tier Tier to assign.
-     * @param pendingMap Pending partitions per tier.
-     * @param fullMap Full assignment map to modify.
-     * @param topSnapshot Topology snapshot.
-     * @param allowNeighbors Allow neighbors nodes for partition.
-     */
-    private void assignPendingToNodes(int tier, Map<Integer, Queue<Integer>> pendingMap,
-        FullAssignmentMap fullMap, List<ClusterNode> topSnapshot, boolean allowNeighbors) {
-        Iterator<Integer> it = pendingMap.get(tier).iterator();
-
-        int idx = 0;
-
-        while (it.hasNext()) {
-            int part = it.next();
-
-            int i = idx;
-
-            boolean assigned = false;
-
-            do {
-                ClusterNode node = topSnapshot.get(i);
-
-                if (fullMap.assign(part, tier, node, pendingMap, false, allowNeighbors)) {
-                    it.remove();
-
-                    assigned = true;
-                }
-
-                i = (i + 1) % topSnapshot.size();
-
-                if (assigned)
-                    idx = i;
-            } while (i != idx);
-
-            if (!assigned) {
-                do {
-                    ClusterNode node = topSnapshot.get(i);
-
-                    if (fullMap.assign(part, tier, node, pendingMap, true, allowNeighbors)) {
-                        it.remove();
-
-                        assigned = true;
-                    }
-
-                    i = (i + 1) % topSnapshot.size();
-
-                    if (assigned)
-                        idx = i;
-                } while (i != idx);
-            }
-
-            if (!assigned && (!exclNeighbors || exclNeighbors && allowNeighbors))
-                throw new IllegalStateException("Failed to find assignable node for partition.");
-        }
-    }
-
-    /**
-     * Tries to balance assignments between existing nodes in topology.
-     *
-     * @param tier Tier to assign.
-     * @param pendingParts Pending partitions per tier.
-     * @param fullMap Full assignment map to modify.
-     * @param topSnapshot Topology snapshot.
-     * @param allowNeighbors Allow neighbors nodes for partition.
-     */
-    private boolean balance(int tier, Map<Integer, Queue<Integer>> pendingParts, FullAssignmentMap fullMap,
-        Collection<ClusterNode> topSnapshot, boolean allowNeighbors) {
-        int idealPartCnt = parts / topSnapshot.size();
-
-        Map<UUID, PartitionSet> mapping = fullMap.tierMapping(tier);
-
-        PrioritizedPartitionMap underloadedNodes = filterNodes(mapping, idealPartCnt, false);
-        PrioritizedPartitionMap overloadedNodes = filterNodes(mapping, idealPartCnt, true);
-
-        do {
-            boolean retry = false;
-
-            for (PartitionSet overloaded : overloadedNodes.assignments()) {
-                for (Integer part : overloaded.partitions()) {
-                    boolean assigned = false;
-
-                    for (PartitionSet underloaded : underloadedNodes.assignments()) {
-                        if (fullMap.assign(part, tier, underloaded.node(), pendingParts, false, allowNeighbors)) {
-                            // Size of partition sets has changed.
-                            if (overloaded.size() <= idealPartCnt)
-                                overloadedNodes.remove(overloaded.nodeId());
-                            else
-                                overloadedNodes.update();
-
-                            if (underloaded.size() >= idealPartCnt)
-                                underloadedNodes.remove(underloaded.nodeId());
-                            else
-                                underloadedNodes.update();
-
-                            assigned = true;
-
-                            retry = true;
-
-                            break;
-                        }
-                    }
-
-                    if (!assigned) {
-                        for (PartitionSet underloaded : underloadedNodes.assignments()) {
-                            if (fullMap.assign(part, tier, underloaded.node(), pendingParts, true, allowNeighbors)) {
-                                // Size of partition sets has changed.
-                                if (overloaded.size() <= idealPartCnt)
-                                    overloadedNodes.remove(overloaded.nodeId());
-                                else
-                                    overloadedNodes.update();
-
-                                if (underloaded.size() >= idealPartCnt)
-                                    underloadedNodes.remove(underloaded.nodeId());
-                                else
-                                    underloadedNodes.update();
-
-                                retry = true;
-
-                                break;
-                            }
-                        }
-                    }
-
-                    if (retry)
-                        break; // for part.
-                }
-
-                if (retry)
-                    break; // for overloaded.
-            }
-
-            if (!retry)
-                break;
-        }
-        while (true);
-
-        return underloadedNodes.isEmpty();
-    }
-
-    /**
-     * Constructs underloaded or overloaded partition map.
-     *
-     * @param mapping Mapping to filter.
-     * @param idealPartCnt Ideal number of partitions per node.
-     * @param overloaded {@code True} if should create overloaded map, {@code false} for underloaded.
-     * @return Prioritized partition map.
-     */
-    private PrioritizedPartitionMap filterNodes(Map<UUID, PartitionSet> mapping, int idealPartCnt, boolean overloaded) {
-        assert mapping != null;
-
-        PrioritizedPartitionMap res = new PrioritizedPartitionMap(overloaded ? DESC_CMP : ASC_CMP);
-
-        for (PartitionSet set : mapping.values()) {
-            if ((overloaded && set.size() > idealPartCnt) || (!overloaded && set.size() < idealPartCnt))
-               res.add(set);
-        }
-
-        return res;
-    }
-
-    /**
-     * Creates copy of previous partition assignment.
-     *
-     * @param ctx Affinity function context.
-     * @param neighborhoodMap Neighbors nodes grouped by target node.
-     * @return Assignment copy and per node partition map.
-     */
-    private List<List<ClusterNode>> createCopy(AffinityFunctionContext ctx,
-        Map<UUID, Collection<ClusterNode>> neighborhoodMap)
-    {
-        DiscoveryEvent discoEvt = ctx.discoveryEvent();
-
-        UUID leftNodeId = (discoEvt == null || discoEvt.type() == EventType.EVT_NODE_JOINED)
-            ? null
-            : discoEvt.eventNode().id();
-
-        List<List<ClusterNode>> cp = new ArrayList<>(parts);
-
-        for (int part = 0; part < parts; part++) {
-            List<ClusterNode> partNodes = ctx.previousAssignment(part);
-
-            List<ClusterNode> partNodesCp;
-
-            if (partNodes == null)
-                partNodesCp = new ArrayList<>();
-            else
-                partNodesCp = copyAssigments(neighborhoodMap, partNodes, leftNodeId);
-
-            cp.add(partNodesCp);
-        }
-
-        return cp;
-    }
-
-    /**
-     * @param neighborhoodMap Neighbors nodes grouped by target node.
-     * @param partNodes Partition nodes.
-     * @param leftNodeId Left node id.
-     */
-    private List<ClusterNode> copyAssigments(Map<UUID, Collection<ClusterNode>> neighborhoodMap,
-        List<ClusterNode> partNodes, UUID leftNodeId) {
-        final List<ClusterNode> partNodesCp = new ArrayList<>(partNodes.size());
-
-        for (ClusterNode node : partNodes) {
-            if (node.id().equals(leftNodeId))
-                continue;
-
-            boolean containsNeighbor = false;
-
-            if (neighborhoodMap != null)
-                containsNeighbor = F.exist(neighborhoodMap.get(node.id()), new IgnitePredicate<ClusterNode>() {
-                    @Override public boolean apply(ClusterNode node) {
-                        return partNodesCp.contains(node);
-                    }
-                });
-
-            if (!containsNeighbor)
-                partNodesCp.add(node);
-        }
-
-        return partNodesCp;
-    }
-
-    /**
-     *
-     */
-    private static class PartitionSetComparator implements Comparator<PartitionSet>, Serializable {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** {@inheritDoc} */
-        @Override public int compare(PartitionSet o1, PartitionSet o2) {
-            return Integer.compare(o1.parts.size(), o2.parts.size());
-        }
-    }
-
-    /**
-     * Prioritized partition map. Ordered structure in which nodes are ordered in ascending or descending order
-     * by number of partitions assigned to a node.
-     */
-    private static class PrioritizedPartitionMap {
-        /** Comparator. */
-        private Comparator<PartitionSet> cmp;
-
-        /** Assignment map. */
-        private Map<UUID, PartitionSet> assignmentMap = new HashMap<>();
-
-        /** Assignment list, ordered according to comparator. */
-        private List<PartitionSet> assignmentList = new ArrayList<>();
-
-        /**
-         * @param cmp Comparator.
-         */
-        private PrioritizedPartitionMap(Comparator<PartitionSet> cmp) {
-            this.cmp = cmp;
-        }
-
-        /**
-         * @param set Partition set to add.
-         */
-        public void add(PartitionSet set) {
-            PartitionSet old = assignmentMap.put(set.nodeId(), set);
-
-            if (old == null) {
-                assignmentList.add(set);
-
-                update();
-            }
-        }
-
-        /**
-         * Sorts assignment list.
-         */
-        public void update() {
-            Collections.sort(assignmentList, cmp);
-        }
-
-        /**
-         * @return Sorted assignment list.
-         */
-        public List<PartitionSet> assignments() {
-            return assignmentList;
-        }
-
-        /**
-         * @param uuid Uuid.
-         */
-        public void remove(UUID uuid) {
-            PartitionSet rmv = assignmentMap.remove(uuid);
-
-            assignmentList.remove(rmv);
-        }
-
-        /**
-         *
-         */
-        public boolean isEmpty() {
-            return assignmentList.isEmpty();
-        }
-    }
-
-    /**
-     * Full assignment map. Auxiliary data structure which maintains resulting assignment and temporary
-     * maps consistent.
-     */
-    @SuppressWarnings("unchecked")
-    private class FullAssignmentMap {
-        /** Per-tier assignment maps. */
-        private Map<UUID, PartitionSet>[] tierMaps;
-
-        /** Full assignment map. */
-        private Map<UUID, PartitionSet> fullMap;
-
-        /** Resulting assignment. */
-        private List<List<ClusterNode>> assignments;
-
-        /** Neighborhood map. */
-        private final Map<UUID, Collection<ClusterNode>> neighborhoodMap;
-
-        /**
-         * @param tiers Number of tiers.
-         * @param assignments Assignments to modify.
-         * @param topSnapshot Topology snapshot.
-         * @param neighborhoodMap Neighbors nodes grouped by target node.
-         */
-        private FullAssignmentMap(int tiers,
-            List<List<ClusterNode>> assignments,
-            Collection<ClusterNode> topSnapshot,
-            Map<UUID, Collection<ClusterNode>> neighborhoodMap)
-        {
-            this.assignments = assignments;
-            this.neighborhoodMap = neighborhoodMap;
-            this.tierMaps = new Map[tiers];
-
-            for (int tier = 0; tier < tiers; tier++)
-                tierMaps[tier] = assignments(tier, topSnapshot);
-
-            fullMap = assignments(-1, topSnapshot);
-        }
-
-        /**
-         * Tries to assign partition to given node on specified tier. If force is false, assignment will succeed
-         * only if this partition is not already assigned to a node. If force is true, then assignment will succeed
-         * only if partition is not assigned to a tier with number less than passed in. Assigned partition from
-         * greater tier will be moved to pending queue.
-         *
-         * @param part Partition to assign.
-         * @param tier Tier number to assign.
-         * @param node Node to move partition to.
-         * @param pendingParts per tier pending partitions map.
-         * @param force Force flag.
-         * @param allowNeighbors Allow neighbors nodes for partition.
-         * @return {@code True} if assignment succeeded.
-         */
-        boolean assign(int part,
-            int tier,
-            ClusterNode node,
-            Map<Integer, Queue<Integer>> pendingParts, boolean force,
-            boolean allowNeighbors)
-        {
-            UUID nodeId = node.id();
-
-            if (isAssignable(part, tier, node, allowNeighbors)) {
-                tierMaps[tier].get(nodeId).add(part);
-
-                fullMap.get(nodeId).add(part);
-
-                List<ClusterNode> assignment = assignments.get(part);
-
-                if (assignment.size() <= tier)
-                    assignment.add(node);
-                else {
-                    ClusterNode oldNode = assignment.set(tier, node);
-
-                    if (oldNode != null) {
-                        UUID oldNodeId = oldNode.id();
-
-                        tierMaps[tier].get(oldNodeId).remove(part);
-                        fullMap.get(oldNodeId).remove(part);
-                    }
-                }
-
-                return true;
-            }
-            else if (force) {
-                assert !tierMaps[tier].get(nodeId).contains(part);
-
-                // Check previous tiers first.
-                for (int t = 0; t < tier; t++) {
-                    if (tierMaps[t].get(nodeId).contains(part))
-                        return false;
-                }
-
-                // Partition is on some lower tier, switch it.
-                for (int t = tier + 1; t < tierMaps.length; t++) {
-                    if (tierMaps[t].get(nodeId).contains(part)) {
-                        ClusterNode oldNode = assignments.get(part).get(tier);
-
-                        // Move partition from level t to tier.
-                        assignments.get(part).set(tier, node);
-                        assignments.get(part).set(t, null);
-
-                        if (oldNode != null) {
-                            tierMaps[tier].get(oldNode.id()).remove(part);
-                            fullMap.get(oldNode.id()).remove(part);
-                        }
-
-                        tierMaps[tier].get(nodeId).add(part);
-                        tierMaps[t].get(nodeId).remove(part);
-
-                        Queue<Integer> pending = pendingParts.get(t);
-
-                        if (pending == null)
-                            pendingParts.put(t, pending = new LinkedList<>());
-
-                        pending.add(part);
-
-                        return true;
-                    }
-                }
-
-                return false;
-            }
-
-            // !force.
-            return false;
-        }
-
-        /**
-         * Gets tier mapping.
-         *
-         * @param tier Tier to get mapping.
-         * @return Per node map.
-         */
-        public Map<UUID, PartitionSet> tierMapping(int tier) {
-            return tierMaps[tier];
-        }
-
-        /**
-         * @param part Partition.
-         * @param tier Tier.
-         * @param node Node.
-         * @param allowNeighbors Allow neighbors.
-         * @return {@code true} if the partition is assignable to the node.
-         */
-        private boolean isAssignable(int part, int tier, final ClusterNode node, boolean allowNeighbors) {
-            if (containsPartition(part, node))
-                return false;
-
-            if (exclNeighbors)
-                return allowNeighbors || !neighborsContainPartition(node, part);
-            else if (affinityBackupFilter != null) {
-                List<ClusterNode> assignment = assignments.get(part);
-
-                if (assignment.isEmpty())
-                    return true;
-
-                List<ClusterNode> newAssignment;
-
-                if (tier == 0) {
-                    for (int t = 1; t < assignment.size(); t++) {
-                        newAssignment = new ArrayList<>(assignment.size() - 1);
-
-                        newAssignment.add(node);
-
-                        if (t != 1)
-                            newAssignment.addAll(assignment.subList(1, t));
-
-                        if (t + 1 < assignment.size())
-                            newAssignment.addAll(assignment.subList(t + 1, assignment.size()));
-
-                        if (!affinityBackupFilter.apply(assignment.get(t), newAssignment))
-                            return false;
-                    }
-
-                    return true;
-                }
-                else if (tier < assignment.size()) {
-                    newAssignment = new ArrayList<>(assignment.size() - 1);
-
-                    int i = 0;
-
-                    for (ClusterNode assignmentNode: assignment) {
-                        if (i != tier)
-                            newAssignment.add(assignmentNode);
-
-                        i++;
-                    }
-                }
-                else
-                    newAssignment = assignment;
-
-                return affinityBackupFilter.apply(node, newAssignment);
-            }
-            else if (backupFilter != null) {
-                if (tier == 0) {
-                    List<ClusterNode> assignment = assignments.get(part);
-
-                    if (assignment.isEmpty())
-                        return true;
-
-                    List<ClusterNode> backups = assignment.subList(1, assignment.size());
-
-                    return !F.exist(backups, new IgnitePredicate<ClusterNode>() {
-                        @Override public boolean apply(ClusterNode n) {
-                            return !backupFilter.apply(node, n);
-                        }
-                    });
-                }
-                else
-                    return (backupFilter.apply(assignments.get(part).get(0), node));
-            }
-            else
-                return true;
-        }
-
-        /**
-         * @param part Partition.
-         * @param node Node.
-         */
-        private boolean containsPartition(int part, ClusterNode node) {
-            return fullMap.get(node.id()).contains(part);
-        }
-
-        /**
-         * @param node Node.
-         * @param part Partition.
-         */
-        private boolean neighborsContainPartition(ClusterNode node, final int part) {
-            return F.exist(neighborhoodMap.get(node.id()), new IgnitePredicate<ClusterNode>() {
-                @Override public boolean apply(ClusterNode n) {
-                    return fullMap.get(n.id()).contains(part);
-                }
-            });
-        }
-
-        /**
-         * Constructs assignments map for specified tier.
-         *
-         * @param tier Tier number, -1 for all tiers altogether.
-         * @param topSnapshot Topology snapshot.
-         * @return Assignment map.
-         */
-        private Map<UUID, PartitionSet> assignments(int tier, Collection<ClusterNode> topSnapshot) {
-            Map<UUID, PartitionSet> tmp = new LinkedHashMap<>();
-
-            for (int part = 0; part < assignments.size(); part++) {
-                List<ClusterNode> nodes = assignments.get(part);
-
-                assert nodes instanceof RandomAccess;
-
-                if (nodes.size() <= tier)
-                    continue;
-
-                int start = tier < 0 ? 0 : tier;
-                int end = tier < 0 ? nodes.size() : tier + 1;
-
-                for (int i = start; i < end; i++) {
-                    ClusterNode n = nodes.get(i);
-
-                    PartitionSet set = tmp.get(n.id());
-
-                    if (set == null)
-                        tmp.put(n.id(), set = new PartitionSet(n));
-
-                    set.add(part);
-                }
-            }
-
-            if (tmp.size() < topSnapshot.size()) {
-                for (ClusterNode node : topSnapshot) {
-                    if (!tmp.containsKey(node.id()))
-                        tmp.put(node.id(), new PartitionSet(node));
-                }
-            }
-
-            return tmp;
-        }
-    }
-
-    /**
-     * Applies a supplemental hash function to a given hashCode, which
-     * defends against poor quality hash functions.
-     *
-     * @param h Hash code.
-     * @return Enhanced hash code.
-     */
-    private static int hash(int h) {
-        // Spread bits to regularize both segment and index locations,
-        // using variant of single-word Wang/Jenkins hash.
-        h += (h <<  15) ^ 0xffffcd7d;
-        h ^= (h >>> 10);
-        h += (h <<   3);
-        h ^= (h >>>  6);
-        h += (h <<   2) + (h << 14);
-        return h ^ (h >>> 16);
-    }
-
-    /**
-     *
-     */
-    @SuppressWarnings("ComparableImplementedButEqualsNotOverridden")
-    private static class PartitionSet {
-        /** */
-        private ClusterNode node;
-
-        /** Partitions. */
-        private Collection<Integer> parts = new LinkedList<>();
-
-        /**
-         * @param node Node.
-         */
-        private PartitionSet(ClusterNode node) {
-            this.node = node;
-        }
-
-        /**
-         * @return Node.
-         */
-        private ClusterNode node() {
-            return node;
-        }
-
-        /**
-         * @return Node ID.
-         */
-        private UUID nodeId() {
-            return node.id();
-        }
-
-        /**
-         * @return Partition set size.
-         */
-        private int size() {
-            return parts.size();
-        }
-
-        /**
-         * Adds partition to partition set.
-         *
-         * @param part Partition to add.
-         * @return {@code True} if partition was added, {@code false} if partition already exists.
-         */
-        private boolean add(int part) {
-            if (!parts.contains(part)) {
-                parts.add(part);
-
-                return true;
-            }
-
-            return false;
-        }
-
-        /**
-         * @param part Partition to remove.
-         */
-        private void remove(Integer part) {
-            parts.remove(part); // Remove object, not index.
-        }
-
-        /**
-         * @return Partitions.
-         */
-        @SuppressWarnings("TypeMayBeWeakened")
-        private Collection<Integer> partitions() {
-            return parts;
-        }
-
-        /**
-         * Checks if partition set contains given partition.
-         *
-         * @param part Partition to check.
-         * @return {@code True} if partition set contains given partition.
-         */
-        private boolean contains(int part) {
-            return parts.contains(part);
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return "PartSet [nodeId=" + node.id() + ", size=" + parts.size() + ", parts=" + parts + ']';
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/package-info.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/package-info.java b/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/package-info.java
deleted file mode 100644
index bd706cb..0000000
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/fair/package-info.java
+++ /dev/null
@@ -1,21 +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.
- */
-
-/**
- * Contains fair cache affinity for partitioned cache.
- */
-package org.apache.ignite.cache.affinity.fair;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index d7395df..46a9899 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -19,26 +19,23 @@ package org.apache.ignite.internal.processors.platform.utils;
 
 import java.lang.management.ManagementFactory;
 import java.net.InetSocketAddress;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.Collections;
 import java.util.ServiceLoader;
+import java.util.Set;
 import javax.cache.configuration.Factory;
 import javax.cache.expiry.ExpiryPolicy;
 import org.apache.ignite.IgniteException;
-import org.apache.ignite.internal.binary.BinaryArrayIdentityResolver;
-import org.apache.ignite.internal.binary.BinaryIdentityResolver;
 import org.apache.ignite.binary.BinaryRawReader;
 import org.apache.ignite.binary.BinaryRawWriter;
-import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.cache.CacheAtomicWriteOrderMode;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
@@ -48,7 +45,6 @@ import org.apache.ignite.cache.QueryEntity;
 import org.apache.ignite.cache.QueryIndex;
 import org.apache.ignite.cache.QueryIndexType;
 import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cache.eviction.EvictionPolicy;
 import org.apache.ignite.cache.eviction.fifo.FifoEvictionPolicy;
@@ -59,16 +55,18 @@ import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.NearCacheConfiguration;
 import org.apache.ignite.configuration.TransactionConfiguration;
+import org.apache.ignite.internal.binary.BinaryArrayIdentityResolver;
+import org.apache.ignite.internal.binary.BinaryIdentityResolver;
 import org.apache.ignite.internal.binary.BinaryRawReaderEx;
 import org.apache.ignite.internal.binary.BinaryRawWriterEx;
 import org.apache.ignite.internal.processors.platform.cache.affinity.PlatformAffinityFunction;
 import org.apache.ignite.internal.processors.platform.cache.expiry.PlatformExpiryPolicyFactory;
+import org.apache.ignite.internal.processors.platform.plugin.cache.PlatformCachePluginConfiguration;
 import org.apache.ignite.platform.dotnet.PlatformDotNetAffinityFunction;
 import org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration;
 import org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration;
 import org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactoryNative;
 import org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration;
-import org.apache.ignite.internal.processors.platform.plugin.cache.PlatformCachePluginConfiguration;
 import org.apache.ignite.plugin.CachePluginConfiguration;
 import org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosure;
 import org.apache.ignite.plugin.platform.PlatformCachePluginConfigurationClosureFactory;
@@ -324,11 +322,7 @@ public class PlatformConfigurationUtils {
 
         switch (plcTyp) {
             case 1: {
-                FairAffinityFunction f = new FairAffinityFunction();
-                f.setPartitions(partitions);
-                f.setExcludeNeighbors(exclNeighbours);
-                baseFunc = f;
-                break;
+                throw new IllegalStateException("FairAffinityFunction");
             }
             case 2: {
                 RendezvousAffinityFunction f = new RendezvousAffinityFunction();
@@ -368,15 +362,7 @@ public class PlatformConfigurationUtils {
         if (f instanceof PlatformDotNetAffinityFunction)
             f = ((PlatformDotNetAffinityFunction)f).getFunc();
 
-        if (f instanceof FairAffinityFunction) {
-            out.writeByte((byte) 1);
-
-            FairAffinityFunction f0 = (FairAffinityFunction) f;
-            out.writeInt(f0.getPartitions());
-            out.writeBoolean(f0.isExcludeNeighbors());
-            out.writeByte((byte) 0);  // override flags
-            out.writeObject(null);  // user func
-        } else if (f instanceof RendezvousAffinityFunction) {
+        if (f instanceof RendezvousAffinityFunction) {
             out.writeByte((byte) 2);
 
             RendezvousAffinityFunction f0 = (RendezvousAffinityFunction) f;
@@ -388,13 +374,7 @@ public class PlatformConfigurationUtils {
             PlatformAffinityFunction f0 = (PlatformAffinityFunction) f;
             AffinityFunction baseFunc = f0.getBaseFunc();
 
-            if (baseFunc instanceof FairAffinityFunction) {
-                out.writeByte((byte) 1);
-                out.writeInt(f0.partitions());
-                out.writeBoolean(((FairAffinityFunction) baseFunc).isExcludeNeighbors());
-                out.writeByte(f0.getOverrideFlags());
-                out.writeObject(f0.getUserFunc());
-            } else if (baseFunc instanceof RendezvousAffinityFunction) {
+            if (baseFunc instanceof RendezvousAffinityFunction) {
                 out.writeByte((byte) 2);
                 out.writeInt(f0.partitions());
                 out.writeBoolean(((RendezvousAffinityFunction) baseFunc).isExcludeNeighbors());

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
index ada9477..b8a931f 100644
--- a/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/GridCacheAffinityBackupsSelfTest.java
@@ -21,7 +21,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.UUID;
 import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -41,9 +40,6 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
     /** Number of backups. */
     private int backups;
 
-    /** Affinity function. */
-    private int funcType;
-
     /** */
     private int nodesCnt = 5;
 
@@ -57,7 +53,7 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
 
         ccfg.setCacheMode(CacheMode.PARTITIONED);
         ccfg.setBackups(backups);
-        ccfg.setAffinity(funcType == 0 ? new FairAffinityFunction() : new RendezvousAffinityFunction());
+        ccfg.setAffinity(new RendezvousAffinityFunction());
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -69,25 +65,15 @@ public class GridCacheAffinityBackupsSelfTest extends GridCommonAbstractTest {
      */
     public void testRendezvousBackups() throws Exception {
         for (int i = 0; i < nodesCnt; i++)
-            checkBackups(i, 1);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testFairBackups() throws Exception {
-        for (int i = 0; i < nodesCnt; i++)
-            checkBackups(i, 0);
+            checkBackups(i);
     }
 
     /**
      * @param backups Number of backups.
-     * @param funcType Affinity function type.
      * @throws Exception If failed.
      */
-    private void checkBackups(int backups, int funcType) throws Exception {
+    private void checkBackups(int backups) throws Exception {
         this.backups = backups;
-        this.funcType = funcType;
 
         startGridsMultiThreaded(nodesCnt, true);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
index 26dc2dc..21e54db 100644
--- a/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/IgniteCacheAffinitySelfTest.java
@@ -25,7 +25,6 @@ import java.util.Map;
 import org.apache.ignite.cache.CacheAtomicityMode;
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.cache.affinity.Affinity;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -45,9 +44,6 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest {
     private int GRID_CNT = 3;
 
     /** Cache name */
-    private final String CACHE1 = "Fair";
-
-    /** Cache name */
     private final String CACHE2 = "Rendezvous";
 
     /** {@inheritDoc} */
@@ -61,10 +57,6 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest {
 
         CacheConfiguration cache0 = cacheConfiguration(null);
 
-        CacheConfiguration cache1 = cacheConfiguration(null);
-        cache1.setName(CACHE1);
-        cache1.setAffinity(new FairAffinityFunction());
-
         CacheConfiguration cache2 = cacheConfiguration(null);
         cache2.setName(CACHE2);
         cache2.setAffinity(new RendezvousAffinityFunction());
@@ -72,7 +64,7 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest {
         if (igniteInstanceName.contains("0"))
             cfg.setCacheConfiguration(cache0);
         else
-            cfg.setCacheConfiguration(cache0, cache1, cache2);
+            cfg.setCacheConfiguration(cache0, cache2);
 
         return cfg;
     }
@@ -113,8 +105,6 @@ public class IgniteCacheAffinitySelfTest extends IgniteCacheAbstractTest {
      */
     private void checkAffinity() {
         checkAffinity(grid(0).affinity(null), internalCache(1, null).affinity());
-        checkAffinity(grid(0).affinity(CACHE1), internalCache(1, CACHE1).affinity());
-        checkAffinity(grid(0).affinity(CACHE1), internalCache(1, CACHE1).affinity());
         checkAffinity(grid(0).affinity(CACHE2), internalCache(1, CACHE2).affinity());
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java
index 0a3f96c..04c6061 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityClientNodeSelfTest.java
@@ -20,7 +20,6 @@ package org.apache.ignite.cache.affinity;
 import java.util.Collection;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.configuration.CacheConfiguration;
@@ -52,9 +51,6 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest {
     private static final String CACHE2 = "cache2";
 
     /** */
-    private static final String CACHE3 = "cache3";
-
-    /** */
     private static final String CACHE4 = "cache4";
 
     /** */
@@ -79,13 +75,6 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest {
         ccfg2.setName(CACHE2);
         ccfg2.setAffinity(new RendezvousAffinityFunction());
 
-        CacheConfiguration ccfg3 = new CacheConfiguration();
-
-        ccfg3.setBackups(1);
-        ccfg3.setName(CACHE3);
-        ccfg3.setAffinity(new FairAffinityFunction());
-        ccfg3.setNodeFilter(new TestNodesFilter());
-
         CacheConfiguration ccfg4 = new CacheConfiguration();
 
         ccfg4.setCacheMode(REPLICATED);
@@ -103,7 +92,7 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest {
             cfg.setCacheConfiguration(ccfg5);
         }
         else
-            cfg.setCacheConfiguration(ccfg1, ccfg2, ccfg3, ccfg4);
+            cfg.setCacheConfiguration(ccfg1, ccfg2, ccfg4);
 
         return cfg;
     }
@@ -130,8 +119,6 @@ public class AffinityClientNodeSelfTest extends GridCommonAbstractTest {
 
         checkCache(CACHE2, 2);
 
-        checkCache(CACHE3, 2);
-
         checkCache(CACHE4, 3);
 
         checkCache(CACHE5, 2);

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java
index 06964e0..87b472d 100644
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/AffinityHistoryCleanupTest.java
@@ -22,7 +22,6 @@ import java.util.Map;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteSystemProperties;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
 import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
@@ -63,7 +62,7 @@ public class AffinityHistoryCleanupTest extends GridCommonAbstractTest {
             CacheConfiguration ccfg = new CacheConfiguration();
 
             ccfg.setName("static-cache-" + i);
-            ccfg.setAffinity(i % 2 == 0 ? new RendezvousAffinityFunction() : new FairAffinityFunction());
+            ccfg.setAffinity(new RendezvousAffinityFunction());
 
             ccfgs[i] = ccfg;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
deleted file mode 100644
index 65f08c2..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityDynamicCacheSelfTest.java
+++ /dev/null
@@ -1,86 +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.apache.ignite.cache.affinity.fair;
-
-import java.util.concurrent.Callable;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteInternalFuture;
-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;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- *
- */
-public class FairAffinityDynamicCacheSelfTest extends GridCommonAbstractTest {
-    /** */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        ((TcpDiscoverySpi)cfg.getDiscoverySpi()).setIpFinder(IP_FINDER);
-
-        return cfg;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void beforeTestsStarted() throws Exception {
-        startGridsMultiThreaded(3);
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void afterTestsStopped() throws Exception {
-        stopAllGrids();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testStartStopCache() throws Exception {
-        CacheConfiguration<Integer, Integer> cacheCfg = new CacheConfiguration<>();
-
-        cacheCfg.setCacheMode(CacheMode.PARTITIONED);
-        cacheCfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-        cacheCfg.setBackups(1);
-        cacheCfg.setName("test");
-        cacheCfg.setAffinity(new FairAffinityFunction());
-
-        final IgniteCache<Integer, Integer> cache = ignite(0).createCache(cacheCfg);
-
-        for (int i = 0; i < 10_000; i++)
-            cache.put(i, i);
-
-        IgniteInternalFuture<Object> destFut = GridTestUtils.runAsync(new Callable<Object>() {
-            @Override public Object call() throws Exception {
-                ignite(0).destroyCache(cache.getName());
-
-                return null;
-            }
-        });
-
-        destFut.get(5000L);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionBackupFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionBackupFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionBackupFilterSelfTest.java
deleted file mode 100644
index 7fddf30..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionBackupFilterSelfTest.java
+++ /dev/null
@@ -1,44 +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.apache.ignite.cache.affinity.fair;
-
-import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.AffinityFunctionBackupFilterAbstractSelfTest;
-
-/**
- * Tests backup filter for {@link FairAffinityFunction}.
- */
-public class FairAffinityFunctionBackupFilterSelfTest extends AffinityFunctionBackupFilterAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected AffinityFunction affinityFunction() {
-        FairAffinityFunction aff = new FairAffinityFunction(false);
-
-        aff.setBackupFilter(backupFilter);
-
-        return aff;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected AffinityFunction affinityFunctionWithAffinityBackupFilter() {
-        FairAffinityFunction aff = new FairAffinityFunction(false);
-
-        aff.setAffinityBackupFilter(affinityBackupFilter);
-
-        return aff;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionExcludeNeighborsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionExcludeNeighborsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionExcludeNeighborsSelfTest.java
deleted file mode 100644
index 4182cd3..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionExcludeNeighborsSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.cache.affinity.fair;
-
-import org.apache.ignite.cache.affinity.AffinityFunction;
-import org.apache.ignite.cache.affinity.AffinityFunctionExcludeNeighborsAbstractSelfTest;
-
-/**
- * Tests exclude neighbors flag for {@link FairAffinityFunction}.
- */
-public class FairAffinityFunctionExcludeNeighborsSelfTest extends AffinityFunctionExcludeNeighborsAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected AffinityFunction affinityFunction() {
-        return new FairAffinityFunction(true);
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionNodesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionNodesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionNodesSelfTest.java
deleted file mode 100644
index 95bf30c..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionNodesSelfTest.java
+++ /dev/null
@@ -1,247 +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.apache.ignite.cache.affinity.fair;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.TreeSet;
-import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteKernal;
-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;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Tests partition fair affinity in real grid.
- */
-public class FairAffinityFunctionNodesSelfTest extends GridCommonAbstractTest {
-    /** IP finder. */
-    private static final TcpDiscoveryIpFinder IP_FINDER = new TcpDiscoveryVmIpFinder(true);
-
-    /** Number of backups. */
-    private int backups;
-
-    /** Number of partitions. */
-    private int parts = 512;
-
-    /** Add nodes test. */
-    private static final boolean[] ADD_ONLY = new boolean[] {true, true, true, true, true, true};
-
-    /** Add nodes test. */
-    private static final boolean[] ADD_REMOVE = new boolean[]
-        {
-            true,  true,  true,  true,  true, true,
-            false, false, false, false, false
-        };
-
-    /** */
-    private static final boolean[] MIXED1 = new boolean[]
-        {
-            // 1     2     3      2     3     4      3     4     5      4      3      2
-            true, true, true, false, true, true, false, true, true, false, false, false
-        };
-
-    /** */
-    private static final boolean[] MIXED2 = new boolean[]
-        {
-            // 1     2     3      2      1     2      1     2     3      2      1     2
-            true, true, true, false, false, true, false, true, true, false, false, true
-        };
-
-    /** */
-    private static final boolean[] MIXED3 = new boolean[]
-        {
-            // 1     2     3     4     5     6      5     6     7     8     9      8      7     8     9
-            true, true, true, true, true, true, false, true, true, true, true, false, false, true, true,
-            //  8      7      6
-            false, false, false
-        };
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
-
-        CacheConfiguration ccfg = cacheConfiguration();
-
-        cfg.setCacheConfiguration(ccfg);
-
-        TcpDiscoverySpi discoSpi = new TcpDiscoverySpi();
-
-        discoSpi.setIpFinder(IP_FINDER);
-
-        cfg.setDiscoverySpi(discoSpi);
-
-        return cfg;
-    }
-
-    /**
-     * @return Cache configuration.
-     */
-    private CacheConfiguration cacheConfiguration() {
-        CacheConfiguration cfg = new CacheConfiguration();
-
-        cfg.setBackups(backups);
-
-        cfg.setCacheMode(CacheMode.PARTITIONED);
-
-        cfg.setNearConfiguration(null);
-
-        cfg.setAffinity(new FairAffinityFunction(parts));
-
-        return cfg;
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAdd() throws Exception {
-        checkSequence(ADD_ONLY);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAddRemove() throws Exception {
-        checkSequence(ADD_REMOVE);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMixed1() throws Exception {
-        checkSequence(MIXED1);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMixed2() throws Exception {
-        checkSequence(MIXED2);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testMixed3() throws Exception {
-        checkSequence(MIXED3);
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    private void checkSequence(boolean[] seq) throws Exception {
-        for (int b = 0; b < 3; b++) {
-            backups = b;
-
-            info(">>>>>>>>>>>>>>>> Checking backups: " + backups);
-
-            checkSequence0(seq);
-
-            info(">>>>>>>>>>>>>>>> Finished check: " + backups);
-        }
-    }
-
-    /**
-     * @param seq Start/stop sequence.
-     * @throws Exception If failed.
-     */
-    private void checkSequence0(boolean[] seq) throws Exception {
-        try {
-            startGrid(0);
-
-            TreeSet<Integer> started = new TreeSet<>();
-
-            started.add(0);
-
-            int topVer = 1;
-
-            for (boolean start : seq) {
-                if (start) {
-                    int nextIdx = nextIndex(started);
-
-                    startGrid(nextIdx);
-
-                    started.add(nextIdx);
-                }
-                else {
-                    int idx = started.last();
-
-                    stopGrid(idx);
-
-                    started.remove(idx);
-                }
-
-                awaitPartitionMapExchange();
-
-                topVer++;
-
-                info("Grid 0: " + grid(0).localNode().id());
-
-                ((IgniteKernal)grid(0)).internalCache().context().affinity().affinityReadyFuture(topVer).get();
-
-                for (int i : started) {
-                    if (i != 0) {
-                        IgniteEx grid = grid(i);
-
-                        ((IgniteKernal)grid).internalCache().context().affinity().affinityReadyFuture(topVer).get();
-
-                        info("Grid " + i + ": " + grid.localNode().id());
-
-                        for (int part = 0; part < parts; part++) {
-                            List<ClusterNode> firstNodes = (List<ClusterNode>)grid(0).affinity(null)
-                                .mapPartitionToPrimaryAndBackups(part);
-
-                            List<ClusterNode> secondNodes = (List<ClusterNode>)grid.affinity(null)
-                                .mapPartitionToPrimaryAndBackups(part);
-
-                            assertEquals(firstNodes.size(), secondNodes.size());
-
-                            for (int n = 0; n < firstNodes.size(); n++)
-                                assertEquals(firstNodes.get(n), secondNodes.get(n));
-                        }
-                    }
-                }
-            }
-        }
-        finally {
-            stopAllGrids();
-        }
-    }
-
-    /**
-     * First positive integer that is not present in started set.
-     *
-     * @param started Already started indices.
-     * @return First positive integer that is not present in started set.
-     */
-    private int nextIndex(Collection<Integer> started) {
-        assert started.contains(0);
-
-        for (int i = 1; i < 10000; i++) {
-            if (!started.contains(i))
-                return i;
-        }
-
-        throw new IllegalStateException();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionSelfTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionSelfTest.java
deleted file mode 100644
index a79c9fc..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityFunctionSelfTest.java
+++ /dev/null
@@ -1,31 +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.apache.ignite.cache.affinity.fair;
-
-import org.apache.ignite.cache.affinity.AbstractAffinityFunctionSelfTest;
-import org.apache.ignite.cache.affinity.AffinityFunction;
-
-/**
- * Tests for {@link FairAffinityFunction}.
- */
-public class FairAffinityFunctionSelfTest extends AbstractAffinityFunctionSelfTest {
-    /** {@inheritDoc} */
-    @Override protected AffinityFunction affinityFunction() {
-        return new FairAffinityFunction();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityNodesRestart.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityNodesRestart.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityNodesRestart.java
deleted file mode 100644
index 37f1bfb..0000000
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/fair/FairAffinityNodesRestart.java
+++ /dev/null
@@ -1,130 +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.apache.ignite.cache.affinity.fair;
-
-import java.util.List;
-import java.util.concurrent.Callable;
-import org.apache.ignite.IgniteCache;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cluster.ClusterNode;
-import org.apache.ignite.configuration.CacheConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.IgniteEx;
-import org.apache.ignite.internal.IgniteInternalFuture;
-import org.apache.ignite.internal.util.typedef.P2;
-import org.apache.ignite.testframework.GridTestUtils;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-/**
- * Tests that FairAffinityFunction doesn't throw exception on nodes restart,
- * with backup filter set and 0 cache backups.
- */
-public class FairAffinityNodesRestart extends GridCommonAbstractTest {
-    /** */
-    private final static P2<ClusterNode, ClusterNode> BACKUP_FILTER = new P2<ClusterNode, ClusterNode>() {
-        @Override public boolean apply(ClusterNode node, ClusterNode node2) {
-            return true;
-        }
-    };
-
-    /** */
-    private final static P2<ClusterNode, List<ClusterNode>> AFF_BACKUP_FILTER = new P2<ClusterNode, List<ClusterNode>>() {
-        @Override public boolean apply(ClusterNode node, List<ClusterNode> nodes) {
-            return true;
-        }
-    };
-
-    /** */
-    private boolean affBackup;
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        CacheConfiguration ccfg = new CacheConfiguration("fair-cache");
-
-        FairAffinityFunction aff = new FairAffinityFunction(32);
-
-        if (!affBackup)
-            aff.setBackupFilter(BACKUP_FILTER);
-        else
-            aff.setAffinityBackupFilter(AFF_BACKUP_FILTER);
-
-        ccfg.setAffinity(aff);
-        ccfg.setBackups(0);
-        ccfg.setAtomicityMode(CacheAtomicityMode.ATOMIC);
-
-        cfg.setCacheConfiguration(ccfg);
-
-        return cfg;
-    }
-
-    /**
-     * @param idx Node index.
-     * @return Future.
-     */
-    private IgniteInternalFuture<IgniteEx> startAsyncGrid(final int idx) {
-        return GridTestUtils.runAsync(new Callable<IgniteEx>() {
-            @Override public IgniteEx call() throws Exception {
-                return startGrid(idx);
-            }
-        });
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testBackupFilter() throws Exception {
-        affBackup = false;
-
-        check();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testAffinityBackupFilter() throws Exception {
-        affBackup = true;
-
-        check();
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    private void check() throws Exception {
-        for (int i = 0; i < 2; i++) {
-            IgniteInternalFuture<IgniteEx> fut0 = startAsyncGrid(0);
-            IgniteInternalFuture<IgniteEx> fut1 = startAsyncGrid(1);
-            IgniteInternalFuture<IgniteEx> fut2 = startAsyncGrid(2);
-
-            IgniteEx ignite = fut0.get();
-            fut1.get();
-            fut2.get();
-
-            IgniteCache<Integer, String> cache = ignite.cache("fair-cache");
-
-            for (int j = 0; j < 100; j++)
-                cache.put(i, String.valueOf(i));
-
-            stopGrid(0);
-            stopGrid(1);
-            stopGrid(2);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/f9b64246/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java
index b2847ea..fe3de71 100755
--- a/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/cache/affinity/local/LocalAffinityFunctionTest.java
@@ -19,7 +19,7 @@ package org.apache.ignite.cache.affinity.local;
 
 import org.apache.ignite.Ignite;
 import org.apache.ignite.cache.CacheMode;
-import org.apache.ignite.cache.affinity.fair.FairAffinityFunction;
+import org.apache.ignite.cache.affinity.rendezvous.RendezvousAffinityFunction;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
@@ -50,7 +50,7 @@ public class LocalAffinityFunctionTest extends GridCommonAbstractTest {
         ccfg.setBackups(1);
         ccfg.setName(CACHE1);
         ccfg.setCacheMode(CacheMode.LOCAL);
-        ccfg.setAffinity(new FairAffinityFunction());
+        ccfg.setAffinity(new RendezvousAffinityFunction());
         cfg.setCacheConfiguration(ccfg);
 
         return cfg;