ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [03/12] incubator-ignite git commit: IGNITE-575 - Renaimings
Date Wed, 25 Mar 2015 06:38:58 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 21b82b1..f6ed7b2 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
@@ -46,7 +46,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     private CacheMode cacheMode;
 
     /** Cache eviction policy. */
-    private CacheEvictionPolicy evictionPlc;
+    private EvictionPolicy evictionPlc;
 
     /** Near enabled flag. */
     private boolean nearEnabled;
@@ -81,7 +81,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     /** @throws Exception If failed. */
     public void testLocalCacheFifoEvictionPolicy() throws Exception {
         cacheMode = LOCAL;
-        evictionPlc = new CacheFifoEvictionPolicy();
+        evictionPlc = new FifoEvictionPolicy();
 
         checkToString();
     }
@@ -89,7 +89,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     /** @throws Exception If failed. */
     public void testLocalCacheLruEvictionPolicy() throws Exception {
         cacheMode = LOCAL;
-        evictionPlc = new CacheLruEvictionPolicy();
+        evictionPlc = new LruEvictionPolicy();
 
         checkToString();
     }
@@ -97,7 +97,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     /** @throws Exception If failed. */
     public void testReplicatedCacheFifoEvictionPolicy() throws Exception {
         cacheMode = REPLICATED;
-        evictionPlc = new CacheFifoEvictionPolicy();
+        evictionPlc = new FifoEvictionPolicy();
 
         checkToString();
     }
@@ -105,7 +105,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     /** @throws Exception If failed. */
     public void testReplicatedCacheLruEvictionPolicy() throws Exception {
         cacheMode = REPLICATED;
-        evictionPlc = new CacheLruEvictionPolicy();
+        evictionPlc = new LruEvictionPolicy();
 
         checkToString();
     }
@@ -114,7 +114,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     public void testPartitionedCacheFifoEvictionPolicy() throws Exception {
         cacheMode = PARTITIONED;
         nearEnabled = true;
-        evictionPlc = new CacheFifoEvictionPolicy();
+        evictionPlc = new FifoEvictionPolicy();
 
         checkToString();
     }
@@ -123,7 +123,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     public void testPartitionedCacheLruEvictionPolicy() throws Exception {
         cacheMode = PARTITIONED;
         nearEnabled = true;
-        evictionPlc = new CacheLruEvictionPolicy();
+        evictionPlc = new LruEvictionPolicy();
 
         checkToString();
     }
@@ -132,7 +132,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     public void testColocatedCacheFifoEvictionPolicy() throws Exception {
         cacheMode = PARTITIONED;
         nearEnabled = false;
-        evictionPlc = new CacheFifoEvictionPolicy();
+        evictionPlc = new FifoEvictionPolicy();
 
         checkToString();
     }
@@ -141,7 +141,7 @@ public class GridCacheObjectToStringSelfTest extends GridCommonAbstractTest {
     public void testColocatedCacheLruEvictionPolicy() throws Exception {
         cacheMode = PARTITIONED;
         nearEnabled = false;
-        evictionPlc = new CacheLruEvictionPolicy();
+        evictionPlc = new LruEvictionPolicy();
 
         checkToString();
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTest.java
index 52076cd..f5563c4 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheOffHeapTest.java
@@ -76,7 +76,7 @@ public class GridCacheOffHeapTest extends GridCommonAbstractTest {
         cacheCfg.setStartSize(startSize);
 
         if (onheap > 0) {
-            cacheCfg.setEvictionPolicy(new CacheFifoEvictionPolicy(onheap));
+            cacheCfg.setEvictionPolicy(new FifoEvictionPolicy(onheap));
 
             cacheCfg.setOffHeapMaxMemory(80 * 1024L * 1024L * 1024L); // 10GB
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedAffinitySpreadTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedAffinitySpreadTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedAffinitySpreadTest.java
index 47ccb5e..00ca06d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedAffinitySpreadTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCachePartitionedAffinitySpreadTest.java
@@ -42,7 +42,7 @@ public class GridCachePartitionedAffinitySpreadTest extends GridCommonAbstractTe
             for (int replicas = 128; replicas <= 4096; replicas*=2) {
                 Collection<ClusterNode> nodes = createNodes(i, replicas);
 
-                CacheRendezvousAffinityFunction aff = new CacheRendezvousAffinityFunction(false, 10000);
+                RendezvousAffinityFunction aff = new RendezvousAffinityFunction(false, 10000);
 
                 checkDistribution(aff, nodes);
             }
@@ -69,7 +69,7 @@ public class GridCachePartitionedAffinitySpreadTest extends GridCommonAbstractTe
      * @param aff Affinity to check.
      * @param nodes Collection of nodes to test on.
      */
-    private void checkDistribution(CacheRendezvousAffinityFunction aff, Collection<ClusterNode> nodes) {
+    private void checkDistribution(RendezvousAffinityFunction aff, Collection<ClusterNode> nodes) {
         Map<ClusterNode, Integer> parts = new HashMap<>(nodes.size());
 
         for (int part = 0; part < aff.getPartitions(); part++) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 d6eed5a..d9364c8 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
@@ -74,7 +74,7 @@ public class GridCacheReloadSelfTest extends GridCommonAbstractTest {
         CacheConfiguration cacheCfg = defaultCacheConfiguration();
         cacheCfg.setName(CACHE_NAME);
         cacheCfg.setCacheMode(cacheMode);
-        cacheCfg.setEvictionPolicy(new CacheLruEvictionPolicy(MAX_CACHE_ENTRIES));
+        cacheCfg.setEvictionPolicy(new LruEvictionPolicy(MAX_CACHE_ENTRIES));
         cacheCfg.setNearConfiguration(nearEnabled ? new NearCacheConfiguration() : null);
 
         final CacheStore store = new CacheStoreAdapter<Integer, Integer>() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 de6e0ed..bacd832 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
@@ -118,7 +118,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements Gr
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public CacheEvictableEntry wrapEviction() {
+    @Nullable @Override public EvictableEntry wrapEviction() {
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 a740532..4418bcd 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
@@ -84,7 +84,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
         if (hasNearCache())
             ccfg.setNearConfiguration(new NearCacheConfiguration());
 
-        ccfg.setEvictionPolicy(new CacheFifoEvictionPolicy(HEAP_ENTRIES));
+        ccfg.setEvictionPolicy(new FifoEvictionPolicy(HEAP_ENTRIES));
 
         return ccfg;
     }
@@ -180,7 +180,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
                 assertNull(cache0.localPeek(key, BACKUP));
             }
 
-            CacheAffinity<Integer> aff = ignite(0).affinity(null);
+            Affinity<Integer> aff = ignite(0).affinity(null);
 
             for (int i = 0; i < gridCount(); i++) {
                 if (i == nodeIdx)
@@ -537,7 +537,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
             checkPrimarySize(PUT_KEYS);
 
-            CacheAffinity<Integer> aff = ignite(0).affinity(null);
+            Affinity<Integer> aff = ignite(0).affinity(null);
 
             for (int i = 0; i < gridCount(); i++) {
                 if (i == nodeIdx)
@@ -620,7 +620,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
 
         assertNotNull(it);
 
-        CacheAffinity aff = ignite(nodeIdx).affinity(null);
+        Affinity aff = ignite(nodeIdx).affinity(null);
 
         ClusterNode node = ignite(nodeIdx).cluster().localNode();
 
@@ -667,7 +667,7 @@ public abstract class IgniteCachePeekModesAbstractTest extends IgniteCacheAbstra
         else
             offheapIt = internalCache.context().swap().lazyOffHeapIterator();
 
-        CacheAffinity aff = ignite(nodeIdx).affinity(null);
+        Affinity aff = ignite(nodeIdx).affinity(null);
 
         ClusterNode node = ignite(nodeIdx).cluster().localNode();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
index 87c55b2..f17e6a8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheTxPreloadNoWriteTest.java
@@ -58,7 +58,7 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest {
         ccfg.setCacheMode(REPLICATED);
         ccfg.setAtomicityMode(TRANSACTIONAL);
         ccfg.setRebalanceMode(CacheRebalanceMode.ASYNC);
-        ccfg.setAffinity(new CacheRendezvousAffinityFunction(false, 100));
+        ccfg.setAffinity(new RendezvousAffinityFunction(false, 100));
 
         cfg.setCacheConfiguration(ccfg);
 
@@ -78,7 +78,7 @@ public class IgniteCacheTxPreloadNoWriteTest extends GridCommonAbstractTest {
     public void testTxNoWrite() throws Exception {
         Ignite ignite0 = startGrid(0);
 
-        CacheAffinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(null);
 
         IgniteCache<Integer, Object> cache0 = ignite0.cache(null);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 63bf095..c87a878 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
@@ -56,9 +56,9 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
             ccfg.setNearConfiguration(null);
 
             if (aff == 0)
-                ccfg.setAffinity(new CacheRendezvousAffinityFunction(false, PARTS));
+                ccfg.setAffinity(new RendezvousAffinityFunction(false, PARTS));
             else
-                ccfg.setAffinity(new CachePartitionFairAffinity(PARTS));
+                ccfg.setAffinity(new FairAffinityFunction(PARTS));
 
             cfg.setCacheConfiguration(ccfg);
         }
@@ -132,14 +132,14 @@ public class IgniteClientAffinityAssignmentSelfTest extends GridCommonAbstractTe
      * @throws Exception If failed.
      */
     private void checkAffinity() throws Exception {
-        CacheAffinity<Object> aff = ((IgniteKernal)grid(0)).getCache(null).affinity();
+        Affinity<Object> aff = ((IgniteKernal)grid(0)).getCache(null).affinity();
 
         for (Ignite grid : Ignition.allGrids()) {
             try {
                 if (grid.cluster().localNode().id().equals(grid(0).localNode().id()))
                     continue;
 
-                CacheAffinity<Object> checkAff = ((IgniteKernal)grid).getCache(null).affinity();
+                Affinity<Object> checkAff = ((IgniteKernal)grid).getCache(null).affinity();
 
                 for (int p = 0; p < PARTS; p++)
                     assertEquals(aff.mapPartitionToPrimaryAndBackups(p), checkAff.mapPartitionToPrimaryAndBackups(p));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
index 67450b8..606991a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxAbstractTest.java
@@ -175,7 +175,7 @@ abstract class IgniteTxAbstractTest extends GridCommonAbstractTest {
                     assert key >= prevKey : "key: " + key + ", prevKey: " + prevKey;
 
                     if (isTestDebug()) {
-                        CacheAffinityFunction aff = cache.getConfiguration(CacheConfiguration.class).getAffinity();
+                        AffinityFunction aff = cache.getConfiguration(CacheConfiguration.class).getAffinity();
 
                         int part = aff.partition(key);
 
@@ -307,7 +307,7 @@ abstract class IgniteTxAbstractTest extends GridCommonAbstractTest {
             try {
                 for (Integer key : getKeys()) {
                     if (isTestDebug()) {
-                        CacheAffinityFunction aff = cache.getConfiguration(CacheConfiguration.class).getAffinity();
+                        AffinityFunction aff = cache.getConfiguration(CacheConfiguration.class).getAffinity();
 
                         int part = aff.partition(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
index 3d743e6..138307a 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxMultiNodeAbstractTest.java
@@ -109,7 +109,7 @@ public abstract class IgniteTxMultiNodeAbstractTest extends GridCommonAbstractTe
      */
     @SuppressWarnings("unchecked")
     private static UUID primaryId(Ignite ignite, Object key) {
-        CacheAffinity aff = ignite.affinity(null);
+        Affinity aff = ignite.affinity(null);
 
         Collection<ClusterNode> affNodes = aff.mapPartitionToPrimaryAndBackups(aff.partition(key));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartSelfTest.java
index 44f2853..7074d3c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/datastructures/partitioned/GridCachePartitionedNodeRestartSelfTest.java
@@ -58,7 +58,7 @@ public class GridCachePartitionedNodeRestartSelfTest extends GridCommonAbstractT
         cc.setBackups(1);
         cc.setWriteSynchronizationMode(FULL_SYNC);
         cc.setRebalanceMode(SYNC);
-        cc.setEvictionPolicy(new CacheFifoEvictionPolicy(100));
+        cc.setEvictionPolicy(new FifoEvictionPolicy(100));
 
         c.setCacheConfiguration(cc);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 57f426b..5cd967f 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
@@ -195,8 +195,8 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection
      * @throws Exception If failed.
      */
     private void startAdditionalNodes(int cnt, String queueName) throws Exception {
-        CacheAffinityFunction aff = jcache(0).getConfiguration(CacheConfiguration.class).getAffinity();
-        CacheAffinityKeyMapper mapper = jcache(0).getConfiguration(CacheConfiguration.class).getAffinityMapper();
+        AffinityFunction aff = jcache(0).getConfiguration(CacheConfiguration.class).getAffinity();
+        AffinityKeyMapper mapper = jcache(0).getConfiguration(CacheConfiguration.class).getAffinityMapper();
 
         assertNotNull(aff);
         assertNotNull(mapper);
@@ -248,9 +248,9 @@ public class GridCachePartitionedQueueEntryMoveSelfTest extends IgniteCollection
      * @param nodes Topology nodes.
      * @return Affinity nodes for partition.
      */
-    private Collection<ClusterNode> nodes(CacheAffinityFunction aff, int part, Collection<ClusterNode> nodes) {
+    private Collection<ClusterNode> nodes(AffinityFunction aff, int part, Collection<ClusterNode> nodes) {
         List<List<ClusterNode>> assignment = aff.assignPartitions(
-            new GridCacheAffinityFunctionContextImpl(new ArrayList<>(nodes), null, null, new AffinityTopologyVersion(1),
+            new GridAffinityFunctionContextImpl(new ArrayList<>(nodes), null, null, new AffinityTopologyVersion(1),
                 BACKUP_CNT));
 
         return assignment.get(part);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
index 89e38f1..bde9ec7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAtomicTimeoutSelfTest.java
@@ -267,7 +267,7 @@ public class GridCacheAtomicTimeoutSelfTest extends GridCommonAbstractTest {
     private int keyForTest() {
         int i = 0;
 
-        CacheAffinity<Object> aff = grid(0).affinity(null);
+        Affinity<Object> aff = grid(0).affinity(null);
 
         while (!aff.isPrimary(grid(1).localNode(), i) || !aff.isBackup(grid(2).localNode(), i))
             i++;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
index e1e5c36..9edbdd3 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheClientModesAbstractSelfTest.java
@@ -75,7 +75,7 @@ public abstract class GridCacheClientModesAbstractSelfTest extends GridCacheAbst
         cfg.setCacheStoreFactory(null);
         cfg.setReadThrough(false);
         cfg.setWriteThrough(false);
-        cfg.setAffinity(new CacheRendezvousAffinityFunction(false, 32));
+        cfg.setAffinity(new RendezvousAffinityFunction(false, 32));
         cfg.setBackups(1);
 
         return cfg;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java
index 5f07043..ec4f0db 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheModuloAffinityFunction.java
@@ -27,7 +27,7 @@ import java.util.*;
 /**
  * Affinity which controls where nodes end up using mod operation.
  */
-public class GridCacheModuloAffinityFunction implements CacheAffinityFunction {
+public class GridCacheModuloAffinityFunction implements AffinityFunction {
     /** Node attribute for index. */
     public static final String IDX_ATTR = "nodeIndex";
 
@@ -83,7 +83,7 @@ public class GridCacheModuloAffinityFunction implements CacheAffinityFunction {
 
     /** {@inheritDoc} */
     @SuppressWarnings("unchecked")
-    @Override public List<List<ClusterNode>> assignPartitions(CacheAffinityFunctionContext ctx) {
+    @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext ctx) {
         List<List<ClusterNode>> res = new ArrayList<>(parts);
 
         Collection<ClusterNode> topSnapshot = ctx.currentTopologySnapshot();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
index aa4b9c0..cc034e8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedAffinityFilterSelfTest.java
@@ -66,7 +66,7 @@ public class GridCachePartitionedAffinityFilterSelfTest extends GridCommonAbstra
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        CacheRendezvousAffinityFunction aff = new CacheRendezvousAffinityFunction();
+        RendezvousAffinityFunction aff = new RendezvousAffinityFunction();
 
         aff.setBackupFilter(backupFilter);
 
@@ -121,9 +121,9 @@ public class GridCachePartitionedAffinityFilterSelfTest extends GridCommonAbstra
      * @throws Exception If failed.
      */
     private void checkPartitions() throws Exception {
-        int partCnt = CacheRendezvousAffinityFunction.DFLT_PARTITION_COUNT;
+        int partCnt = RendezvousAffinityFunction.DFLT_PARTITION_COUNT;
 
-        CacheAffinityFunction aff = cacheConfiguration(grid(0).configuration(), null).getAffinity();
+        AffinityFunction aff = cacheConfiguration(grid(0).configuration(), null).getAffinity();
 
         IgniteCache<Object, Object> cache = grid(0).cache(null);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
index 1417ede..36aeab6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePartitionedReloadAllAbstractSelfTest.java
@@ -200,7 +200,7 @@ public abstract class GridCachePartitionedReloadAllAbstractSelfTest extends Grid
 
         fut.get();
 
-        CacheAffinity aff = ignite(0).affinity(null);
+        Affinity aff = ignite(0).affinity(null);
 
         for (IgniteCache<Integer, String> cache : caches) {
             for (Integer key : map.keySet()) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
index 22f2347..a674016 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCachePreloadRestartAbstractSelfTest.java
@@ -114,7 +114,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon
         cc.setStartSize(20);
         cc.setRebalanceMode(preloadMode);
         cc.setRebalanceBatchSize(preloadBatchSize);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+        cc.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cc.setBackups(backups);
         cc.setAtomicityMode(TRANSACTIONAL);
 
@@ -211,7 +211,7 @@ public abstract class GridCachePreloadRestartAbstractSelfTest extends GridCommon
      * @return Affinity.
      */
     @SuppressWarnings({"unchecked"})
-    private CacheAffinityFunction affinity(GridCache<Integer, ?> cache) {
+    private AffinityFunction affinity(GridCache<Integer, ?> cache) {
         return cache.configuration().getAffinity();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
index 9c5bbbc..459e015 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheTransformEventSelfTest.java
@@ -241,7 +241,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest {
      * @return {@code True} if grid is primary for given key.
      */
     private boolean primary(int gridIdx, Object key) {
-        CacheAffinity<Object> aff = grid(0).affinity(CACHE_NAME);
+        Affinity<Object> aff = grid(0).affinity(CACHE_NAME);
 
         return aff.isPrimary(grid(gridIdx).cluster().localNode(), key);
     }
@@ -252,7 +252,7 @@ public class GridCacheTransformEventSelfTest extends GridCommonAbstractTest {
      * @return {@code True} if grid is primary for given key.
      */
     private boolean backup(int gridIdx, Object key) {
-        CacheAffinity<Object> aff = grid(0).affinity(CACHE_NAME);
+        Affinity<Object> aff = grid(0).affinity(CACHE_NAME);
 
         return aff.isBackup(grid(gridIdx).cluster().localNode(), key);
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
index 8f1cdc1..8bb1845 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAbstractTransformWriteThroughSelfTest.java
@@ -313,7 +313,7 @@ public abstract class GridCacheAbstractTransformWriteThroughSelfTest extends Gri
         while (keys.size() < 30) {
             String key = String.valueOf(numKey);
 
-            CacheAffinity<Object> affinity = ignite(0).affinity(null);
+            Affinity<Object> affinity = ignite(0).affinity(null);
 
             if (nodeType == NEAR_NODE) {
                 if (!affinity.isPrimaryOrBackup(grid(0).localNode(), key))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
index 67f391f..adf8253 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheAtomicNearCacheSelfTest.java
@@ -162,7 +162,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -264,7 +264,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Object> aff = ignite0.affinity(null);
+        Affinity<Object> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -341,7 +341,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Object> aff = ignite0.affinity(null);
+        Affinity<Object> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -478,7 +478,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -601,7 +601,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -651,7 +651,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
 
         IgniteCache<Integer, Integer> cache0 = ignite0.cache(null);
 
-        CacheAffinity<Integer> aff = ignite0.affinity(null);
+        Affinity<Integer> aff = ignite0.affinity(null);
 
         UUID id0 = ignite0.cluster().localNode().id();
 
@@ -740,8 +740,8 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
             assertNull("Unexpected dht entry: " + dhtEntry + ", grid: " + ignite.name(), dhtEntry);
 
         if (!expectNear && !expectDht) {
-            assertNull("Unexpected peek value for grid: " + ignite.name(),
-                ignite.cache(near.name()).localPeek(key, CachePeekMode.ONHEAP));
+            assertNull("Unexpected peek value for grid: " + ignite.name(), ignite.cache(near.name()).localPeek(key,
+                CachePeekMode.ONHEAP));
         }
     }
 
@@ -751,7 +751,7 @@ public class GridCacheAtomicNearCacheSelfTest extends GridCommonAbstractTest {
      * @return Key with properties specified by the given mode.
      */
     private Integer key(Ignite ignite, int mode) {
-        CacheAffinity<Integer> aff = ignite.affinity(null);
+        Affinity<Integer> aff = ignite.affinity(null);
 
         Integer key = null;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
index 9f92b24..65d3e37 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheColocatedDebugTest.java
@@ -69,7 +69,7 @@ public class GridCacheColocatedDebugTest extends GridCommonAbstractTest {
 
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setNearConfiguration(null);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, 30));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, 30));
         cacheCfg.setBackups(1);
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setSwapEnabled(false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 5dd10b8..b6cff17 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
@@ -61,7 +61,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
         CacheConfiguration cacheCfg = defaultCacheConfiguration();
 
         cacheCfg.setCacheMode(PARTITIONED);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, 10));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
         cacheCfg.setBackups(0);
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cacheCfg.setSwapEnabled(false);
@@ -289,7 +289,7 @@ public class GridCacheDhtEntrySelfTest extends GridCommonAbstractTest {
      * @return For the given key pair {primary node, some other node}.
      */
     private IgniteBiTuple<ClusterNode, ClusterNode> getNodes(Integer key) {
-        CacheAffinity<Integer> aff = grid(0).affinity(null);
+        Affinity<Integer> aff = grid(0).affinity(null);
 
         int part = aff.partition(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 1252326..cf1882a 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
@@ -77,11 +77,11 @@ public class GridCacheDhtEvictionNearReadersSelfTest extends GridCommonAbstractT
         // Set eviction queue size explicitly.
         cacheCfg.setEvictSynchronizedKeyBufferSize(1);
         cacheCfg.setEvictMaxOverflowRatio(0);
-        cacheCfg.setEvictionPolicy(new CacheFifoEvictionPolicy(10));
+        cacheCfg.setEvictionPolicy(new FifoEvictionPolicy(10));
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();
 
-        nearCfg.setNearEvictionPolicy(new CacheFifoEvictionPolicy(10));
+        nearCfg.setNearEvictionPolicy(new FifoEvictionPolicy(10));
 
         cfg.setNearCacheConfiguration(nearCfg);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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
index 64f26aa..3b16864 100644
--- 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
@@ -76,13 +76,13 @@ public class GridCacheDhtEvictionSelfTest extends GridCommonAbstractTest {
         cacheCfg.setBackups(1);
 
         NearCacheConfiguration nearCfg = new NearCacheConfiguration();
-        nearCfg.setNearEvictionPolicy(new CacheFifoEvictionPolicy(10000));
+        nearCfg.setNearEvictionPolicy(new FifoEvictionPolicy(10000));
         cacheCfg.setNearConfiguration(nearCfg);
 
         // Set eviction queue size explicitly.
         cacheCfg.setEvictMaxOverflowRatio(0);
         cacheCfg.setEvictSynchronizedKeyBufferSize(1);
-        cacheCfg.setEvictionPolicy(new CacheFifoEvictionPolicy(10000));
+        cacheCfg.setEvictionPolicy(new FifoEvictionPolicy(10000));
 
 
         cfg.setCacheConfiguration(cacheCfg);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java
index 82bf5ae..3d5d6d0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtInternalEntrySelfTest.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
-import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cache.affinity.rendezvous.*;
@@ -65,7 +64,7 @@ public class GridCacheDhtInternalEntrySelfTest extends GridCommonAbstractTest {
 
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setRebalanceMode(SYNC);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, 2));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, 2));
         cacheCfg.setBackups(0);
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
@@ -180,7 +179,7 @@ public class GridCacheDhtInternalEntrySelfTest extends GridCommonAbstractTest {
      * @return Pair {primary node, some other node}.
      */
     private IgniteBiTuple<ClusterNode, ClusterNode> getNodes(String key) {
-        CacheAffinity<Object> aff = grid(0).affinity(null);
+        Affinity<Object> aff = grid(0).affinity(null);
 
         ClusterNode primary = aff.mapKeyToNode(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
index 547ba06..2aa4a2d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadBigDataSelfTest.java
@@ -85,7 +85,7 @@ public class GridCacheDhtPreloadBigDataSelfTest extends GridCommonAbstractTest {
         cc.setRebalanceBatchSize(preloadBatchSize);
         cc.setWriteSynchronizationMode(FULL_SYNC);
         cc.setRebalanceMode(preloadMode);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+        cc.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cc.setBackups(backups);
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
index e3e878f..6c3f914 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDelayedSelfTest.java
@@ -74,7 +74,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest {
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setRebalanceMode(preloadMode);
         cc.setRebalanceDelay(delay);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, 128));
+        cc.setAffinity(new RendezvousAffinityFunction(false, 128));
         cc.setBackups(1);
         cc.setAtomicityMode(TRANSACTIONAL);
 
@@ -371,7 +371,7 @@ public class GridCacheDhtPreloadDelayedSelfTest extends GridCommonAbstractTest {
      * @param g Grid.
      * @return Affinity.
      */
-    private CacheAffinity<Object> affinity(Ignite g) {
+    private Affinity<Object> affinity(Ignite g) {
         return g.affinity(null);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
index 3b28045..5057ad2 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadDisabledSelfTest.java
@@ -83,7 +83,7 @@ public class GridCacheDhtPreloadDisabledSelfTest extends GridCommonAbstractTest
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_ASYNC);
         cacheCfg.setRebalanceMode(NONE);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cacheCfg.setBackups(backups);
         cacheCfg.setAtomicityMode(TRANSACTIONAL);
         //cacheCfg.setRebalanceThreadPoolSize(1);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
index 5addf2d..0650436 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMessageCountTest.java
@@ -63,7 +63,7 @@ public class GridCacheDhtPreloadMessageCountTest extends GridCommonAbstractTest
         cc.setCacheMode(PARTITIONED);
         cc.setWriteSynchronizationMode(FULL_SYNC);
         cc.setRebalanceMode(preloadMode);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, 521));
+        cc.setAffinity(new RendezvousAffinityFunction(false, 521));
         cc.setBackups(1);
 
         TcpDiscoverySpi disco = new TcpDiscoverySpi();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java
index 538fb9f..37597ce 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadMultiThreadedSelfTest.java
@@ -163,7 +163,7 @@ public class GridCacheDhtPreloadMultiThreadedSelfTest extends GridCommonAbstract
 
         for (CacheConfiguration cCfg : cfg.getCacheConfiguration()) {
             if (cCfg.getCacheMode() == CacheMode.PARTITIONED) {
-                cCfg.setAffinity(new CacheRendezvousAffinityFunction(2048, null));
+                cCfg.setAffinity(new RendezvousAffinityFunction(2048, null));
                 cCfg.setBackups(1);
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 647ff05..4e2a082 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
@@ -113,7 +113,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
         cacheCfg.setRebalanceBatchSize(preloadBatchSize);
         cacheCfg.setWriteSynchronizationMode(FULL_SYNC);
         cacheCfg.setRebalanceMode(preloadMode);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cacheCfg.setBackups(backups);
 
         return cacheCfg;
@@ -305,7 +305,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
 
             GridDhtCacheAdapter<Integer, String> dht = dht(lastCache);
 
-            CacheAffinity<Integer> aff = affinity(lastCache);
+            Affinity<Integer> aff = affinity(lastCache);
 
             info("Finished waiting for all exchange futures...");
 
@@ -571,7 +571,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
 
             GridDhtCacheAdapter<Integer, String> dht = dht(lastCache);
 
-            CacheAffinity<Integer> aff = affinity(lastCache);
+            Affinity<Integer> aff = affinity(lastCache);
 
             for (int i = 0; i < keyCnt; i++) {
                 if (aff.mapPartitionToPrimaryAndBackups(aff.partition(i)).contains(last.cluster().localNode())) {
@@ -613,7 +613,7 @@ public class GridCacheDhtPreloadSelfTest extends GridCommonAbstractTest {
      * @param grids Grids.
      */
     private void checkKeys(IgniteCache<Integer, String> cache, int cnt, Iterable<Ignite> grids) {
-        CacheAffinity<Integer> aff = affinity(cache);
+        Affinity<Integer> aff = affinity(cache);
 
         Ignite ignite = cache.unwrap(Ignite.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
index 6d3ba30..367575e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadStartStopSelfTest.java
@@ -98,7 +98,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest
             cacheCfg.setRebalanceBatchSize(preloadBatchSize);
             cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
             cacheCfg.setRebalanceMode(preloadMode);
-            cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+            cacheCfg.setAffinity(new RendezvousAffinityFunction(false, partitions));
             cacheCfg.setBackups(backups);
             cacheCfg.setAtomicityMode(TRANSACTIONAL);
 
@@ -210,7 +210,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest
             for (IgniteInternalFuture<?> fut : exchMgr.exchangeFutures())
                 fut.get();
 
-            CacheAffinity<Integer> aff = affinity(c1);
+            Affinity<Integer> aff = affinity(c1);
 
             for (int i = 0; i < keyCnt; i++) {
                 if (aff.mapPartitionToPrimaryAndBackups(aff.partition(i)).contains(g1.cluster().localNode())) {
@@ -240,7 +240,7 @@ public class GridCacheDhtPreloadStartStopSelfTest extends GridCommonAbstractTest
      * @param cnt Key count.
      */
     private void checkKeys(IgniteCache<Integer, String> c, int cnt) {
-        CacheAffinity<Integer> aff = affinity(c);
+        Affinity<Integer> aff = affinity(c);
 
         boolean sync = isSync(c);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
index 07c6ab8..e2fd38d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtPreloadUnloadSelfTest.java
@@ -86,7 +86,7 @@ public class GridCacheDhtPreloadUnloadSelfTest extends GridCommonAbstractTest {
         cc.setRebalanceBatchSize(preloadBatchSize);
         cc.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
         cc.setRebalanceMode(preloadMode);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, partitions));
+        cc.setAffinity(new RendezvousAffinityFunction(false, partitions));
         cc.setBackups(backups);
         cc.setAtomicityMode(TRANSACTIONAL);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
index cdb29d2..ab6d635 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCacheDhtTestUtils.java
@@ -18,7 +18,6 @@
 package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.affinity.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.internal.processors.affinity.*;
@@ -50,7 +49,7 @@ public class GridCacheDhtTestUtils {
      */
     @SuppressWarnings({"UnusedAssignment", "unchecked"})
     static void prepareKeys(GridDhtCache<Integer, String> dht, int keyCnt) throws IgniteCheckedException {
-        CacheAffinityFunction aff = dht.context().config().getAffinity();
+        AffinityFunction aff = dht.context().config().getAffinity();
 
         GridCacheConcurrentMap cacheMap;
 
@@ -71,7 +70,7 @@ public class GridCacheDhtTestUtils {
 
         for (int i = 0; i < keyCnt; i++) {
             KeyCacheObject cacheKey = ctx.toCacheKeyObject(i);
-            
+
             cacheMap.putEntry(AffinityTopologyVersion.NONE, cacheKey, ctx.toCacheKeyObject("value" + i), 0);
 
             dht.preloader().request(Collections.singleton(cacheKey), AffinityTopologyVersion.NONE);
@@ -99,7 +98,7 @@ public class GridCacheDhtTestUtils {
      * @param idx Cache index
      */
     static void printDhtTopology(GridDhtCache<Integer, String> dht, int idx) {
-        final CacheAffinity<Integer> aff = dht.affinity();
+        final Affinity<Integer> aff = dht.affinity();
 
         Ignite ignite = dht.context().grid();
         ClusterNode locNode = ignite.cluster().localNode();
@@ -170,7 +169,7 @@ public class GridCacheDhtTestUtils {
 
         log.info("Checking balanced state of cache #" + idx);
 
-        CacheAffinity<Object> aff = (CacheAffinity)dht.affinity();
+        Affinity<Object> aff = (Affinity)dht.affinity();
 
         Ignite ignite = dht.context().grid();
         ClusterNode locNode = ignite.cluster().localNode();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedPreloadEventsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedPreloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedPreloadEventsSelfTest.java
index 5866ed7..b6cd71f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedPreloadEventsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedPreloadEventsSelfTest.java
@@ -48,7 +48,7 @@ public class GridCachePartitionedPreloadEventsSelfTest extends GridCachePreloadE
 
         if (replicatedAffinity)
             // replicate entries to all nodes
-            cacheCfg.setAffinity(notSerializableProxy(new CacheAffinityFunction() {
+            cacheCfg.setAffinity(notSerializableProxy(new AffinityFunction() {
                 /** {@inheritDoc} */
                 @Override public void reset() {
                 }
@@ -64,7 +64,7 @@ public class GridCachePartitionedPreloadEventsSelfTest extends GridCachePreloadE
                 }
 
                 /** {@inheritDoc} */
-                @Override public List<List<ClusterNode>> assignPartitions(CacheAffinityFunctionContext affCtx) {
+                @Override public List<List<ClusterNode>> assignPartitions(AffinityFunctionContext affCtx) {
                     List<ClusterNode> nodes = new ArrayList<>(affCtx.currentTopologySnapshot());
 
                     return Collections.singletonList(nodes);
@@ -73,7 +73,7 @@ public class GridCachePartitionedPreloadEventsSelfTest extends GridCachePreloadE
                 /** {@inheritDoc} */
                 @Override public void removeNode(UUID nodeId) {
                 }
-            }, CacheAffinityFunction.class));
+            }, AffinityFunction.class));
 
         cacheCfg.setRebalanceDelay(rebalanceDelay);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
index 11d8ba0..7bd3876 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedTopologyChangeSelfTest.java
@@ -74,7 +74,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
         CacheConfiguration cc = defaultCacheConfiguration();
 
         cc.setCacheMode(PARTITIONED);
-        cc.setAffinity(new CacheRendezvousAffinityFunction(false, 18));
+        cc.setAffinity(new RendezvousAffinityFunction(false, 18));
         cc.setBackups(1);
         cc.setRebalanceMode(SYNC);
         cc.setNearConfiguration(null);
@@ -497,7 +497,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
                 txFut.get(1000);
 
             for (int i = 0; i < 3; i++) {
-                CacheAffinity affinity = grid(i).affinity(null);
+                Affinity affinity = grid(i).affinity(null);
 
                 ConcurrentMap addedNodes = U.field(affinity, "addedNodes");
 
@@ -563,7 +563,7 @@ public class GridCachePartitionedTopologyChangeSelfTest extends GridCommonAbstra
     private List<Integer> partitions(Ignite node, int partType) {
         List<Integer> res = new LinkedList<>();
 
-        CacheAffinity<Object> aff = node.affinity(null);
+        Affinity<Object> aff = node.affinity(null);
 
         for (int partCnt = aff.partitions(), i = 0; i < partCnt; i++) {
             ClusterNode locNode = node.cluster().localNode();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java
index 121d72c..11131ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedUnloadEventsSelfTest.java
@@ -61,7 +61,7 @@ public class GridCachePartitionedUnloadEventsSelfTest extends GridCommonAbstract
         CacheConfiguration cacheCfg = defaultCacheConfiguration();
         cacheCfg.setCacheMode(PARTITIONED);
         cacheCfg.setRebalanceMode(SYNC);
-        cacheCfg.setAffinity(new CacheRendezvousAffinityFunction(false, 10));
+        cacheCfg.setAffinity(new RendezvousAffinityFunction(false, 10));
         cacheCfg.setBackups(0);
         return cacheCfg;
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 495942a..1c507ca 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
@@ -177,7 +177,7 @@ public class GridCacheAtomicInvalidPartitionHandlingSelfTest extends GridCommonA
                     System.err.println("Put: " + i);
             }
 
-            final CacheAffinity<Integer> aff = grid(0).affinity(null);
+            final Affinity<Integer> aff = grid(0).affinity(null);
 
             boolean putDone = GridTestUtils.waitForCondition(new GridAbsPredicate() {
                 @Override public boolean apply() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
index cf4a736..1a37c97 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheAtomicPreloadSelfTest.java
@@ -186,7 +186,7 @@ public class GridCacheAtomicPreloadSelfTest extends GridCommonAbstractTest {
     private List<Integer> generateKeys(ClusterNode node, IgniteCache<Object, Object> cache) {
         List<Integer> keys = new ArrayList<>(3);
 
-        CacheAffinity<Object> aff = affinity(cache);
+        Affinity<Object> aff = affinity(cache);
 
         int base = 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest.java
index c98f6e9..fcc15e0 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest.java
@@ -89,14 +89,14 @@ public abstract class GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest
     /**
      * @return Affinity function for test.
      */
-    protected abstract CacheAffinityFunction affinityFunction();
+    protected abstract AffinityFunction affinityFunction();
 
     /**
      * @param aff Affinity.
      * @param key Key.
      * @return Nodes.
      */
-    private static Collection<? extends ClusterNode> nodes(CacheAffinity<Object> aff, Object key) {
+    private static Collection<? extends ClusterNode> nodes(Affinity<Object> aff, Object key) {
         return aff.mapKeyToPrimaryAndBackups(key);
     }
 
@@ -116,7 +116,7 @@ public abstract class GridCacheAffinityFunctionExcludeNeighborsAbstractSelfTest
             for (int i = 0; i < grids; i++) {
                 final Ignite g = grid(i);
 
-                CacheAffinity<Object> aff = g.affinity(null);
+                Affinity<Object> aff = g.affinity(null);
 
                 List<TcpDiscoveryNode> top = new ArrayList<>();
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 1a78a47..ac93adb 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
@@ -142,7 +142,7 @@ public class GridCacheAtomicNearOnlyMultiNodeFullApiSelfTest extends GridCacheNe
 
         load(cache, key, true);
 
-        CacheAffinity<String> aff = ignite(0).affinity(null);
+        Affinity<String> aff = ignite(0).affinity(null);
 
         for (int i = 0; i < gridCount(); i++) {
             if (aff.isPrimaryOrBackup(grid(i).cluster().localNode(), key))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java
index 37e5b90..94f3efb 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiGetSelfTest.java
@@ -235,7 +235,7 @@ public class GridCacheNearMultiGetSelfTest extends GridCommonAbstractTest {
             if (isTestDebug()) {
                 info("Started transaction.");
 
-                CacheAffinity<Integer> aff = affinity(cache);
+                Affinity<Integer> aff = affinity(cache);
 
                 int part = aff.partition(key);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
index 94a64ab..8f7a4d9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearMultiNodeSelfTest.java
@@ -68,7 +68,7 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
     private AtomicInteger cntr = new AtomicInteger(0);
 
     /** Affinity based on node index mode. */
-    private CacheAffinityFunction aff = new GridCacheModuloAffinityFunction(GRID_CNT, BACKUPS);
+    private AffinityFunction aff = new GridCacheModuloAffinityFunction(GRID_CNT, BACKUPS);
 
     /** Debug flag for mappings. */
     private boolean mapDebug = true;
@@ -198,13 +198,13 @@ public class GridCacheNearMultiNodeSelfTest extends GridCommonAbstractTest {
      * @param idx Index.
      * @return Affinity.
      */
-    private CacheAffinity<Object> affinity(int idx) {
+    private Affinity<Object> affinity(int idx) {
         return grid(idx).affinity(null);
     }
 
     /** @param cnt Count. */
     private Map<UUID, T2<Set<Integer>, Set<Integer>>> mapKeys(int cnt) {
-        CacheAffinity<Object> aff = affinity(0);
+        Affinity<Object> aff = affinity(0);
 
         //Mapping primary and backup keys on node
         Map<UUID, T2<Set<Integer>, Set<Integer>>> map = new HashMap<>();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
index e890d39..ef0ab48 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCacheNearTxMultiNodeSelfTest.java
@@ -128,7 +128,7 @@ public class GridCacheNearTxMultiNodeSelfTest extends GridCommonAbstractTest {
 
                 Ignite g = F.rand(ignites);
 
-                g.cache(null).put(new CacheAffinityKey<>(i, mainKey), Integer.toString(cntr++));
+                g.cache(null).put(new AffinityKey<>(i, mainKey), Integer.toString(cntr++));
             }
 
             IgniteCache cache = priIgnite.cache(null);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java
index 293593a..e8b1d89 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityExcludeNeighborsPerformanceTest.java
@@ -69,7 +69,7 @@ public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends
 
         cc.setBackups(2);
 
-        CacheAffinityFunction aff = new CacheRendezvousAffinityFunction(excNeighbores);
+        AffinityFunction aff = new RendezvousAffinityFunction(excNeighbores);
 
         cc.setAffinity(aff);
 
@@ -89,7 +89,7 @@ public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends
      * @param ignite Grid.
      * @return Affinity.
      */
-    static CacheAffinity<Object> affinity(Ignite ignite) {
+    static Affinity<Object> affinity(Ignite ignite) {
         return ignite.affinity(null);
     }
 
@@ -98,7 +98,7 @@ public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends
      * @param key Key.
      * @return Nodes.
      */
-    private static Collection<? extends ClusterNode> nodes(CacheAffinity<Object> aff, Object key) {
+    private static Collection<? extends ClusterNode> nodes(Affinity<Object> aff, Object key) {
         return aff.mapKeyToPrimaryAndBackups(key);
     }
 
@@ -166,7 +166,7 @@ public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends
      * @throws Exception If failed.
      */
     private long checkCountPerformance0(Ignite g, int cnt) throws Exception {
-        CacheAffinity<Object> aff = affinity(g);
+        Affinity<Object> aff = affinity(g);
 
         GridTimer timer = new GridTimer("test");
 
@@ -217,7 +217,7 @@ public class GridCachePartitionedAffinityExcludeNeighborsPerformanceTest extends
         try {
             Ignite g = grid(0);
 
-            CacheAffinity<Object> aff = affinity(g);
+            Affinity<Object> aff = affinity(g);
 
             // Warmup.
             checkCountPerformance0(g, 10000);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityHashIdResolverSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityHashIdResolverSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityHashIdResolverSelfTest.java
index 83a3e65..29679b6 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityHashIdResolverSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinityHashIdResolverSelfTest.java
@@ -40,11 +40,11 @@ public class GridCachePartitionedAffinityHashIdResolverSelfTest extends GridComm
     private static TcpDiscoveryIpFinder ipFinder = new TcpDiscoveryVmIpFinder(true);
 
     /** Hash ID resolver. */
-    private CacheAffinityNodeHashResolver rslvr;
+    private AffinityNodeHashResolver rslvr;
 
     /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        CacheRendezvousAffinityFunction aff = new CacheRendezvousAffinityFunction();
+        RendezvousAffinityFunction aff = new RendezvousAffinityFunction();
 
         aff.setHashIdResolver(rslvr);
 
@@ -93,7 +93,7 @@ public class GridCachePartitionedAffinityHashIdResolverSelfTest extends GridComm
     /**
      *
      */
-    private static class BogusHashResolver implements CacheAffinityNodeHashResolver {
+    private static class BogusHashResolver implements AffinityNodeHashResolver {
         /** {@inheritDoc} */
         @Override public Object resolve(ClusterNode node) {
             return 1;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java
index 8a979a9..b529bbf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedAffinitySelfTest.java
@@ -94,7 +94,7 @@ public class GridCachePartitionedAffinitySelfTest extends GridCommonAbstractTest
      * @param ignite Grid.
      * @return Affinity.
      */
-    static CacheAffinity<Object> affinity(Ignite ignite) {
+    static Affinity<Object> affinity(Ignite ignite) {
         return ignite.affinity(null);
     }
 
@@ -103,7 +103,7 @@ public class GridCachePartitionedAffinitySelfTest extends GridCommonAbstractTest
      * @param key Key.
      * @return Nodes.
      */
-    private static Collection<? extends ClusterNode> nodes(CacheAffinity<Object> aff, Object key) {
+    private static Collection<? extends ClusterNode> nodes(Affinity<Object> aff, Object key) {
         return aff.mapKeyToPrimaryAndBackups(key);
     }
 
@@ -135,7 +135,7 @@ public class GridCachePartitionedAffinitySelfTest extends GridCommonAbstractTest
         X.println(">>>");
         X.println(">>> Printing affinity for node: " + g.name());
 
-        CacheAffinity<Object> aff = affinity(g);
+        Affinity<Object> aff = affinity(g);
 
         for (int i = 0; i < keyCnt; i++) {
             Collection<? extends ClusterNode> affNodes = nodes(aff, i);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 378dcf5..28ad7a8 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
@@ -78,8 +78,8 @@ public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfT
 
         cc.setCacheMode(PARTITIONED);
         cc.setWriteSynchronizationMode(FULL_SYNC);
-        cc.setEvictionPolicy(new CacheFifoEvictionPolicy(EVICT_CACHE_SIZE));
-        cc.getNearConfiguration().setNearEvictionPolicy(new CacheFifoEvictionPolicy(EVICT_CACHE_SIZE));
+        cc.setEvictionPolicy(new FifoEvictionPolicy(EVICT_CACHE_SIZE));
+        cc.getNearConfiguration().setNearEvictionPolicy(new FifoEvictionPolicy(EVICT_CACHE_SIZE));
         cc.setSwapEnabled(false);
 
         // We set 1 backup explicitly.
@@ -168,7 +168,7 @@ public class GridCachePartitionedEvictionSelfTest extends GridCacheAbstractSelfT
         GridDhtCacheAdapter<String, Integer> dht0 = dht(jcache(0));
         GridDhtCacheAdapter<String, Integer> dht1 = dht(jcache(1));
 
-        CacheAffinity<String> aff = dht0.affinity();
+        Affinity<String> aff = dht0.affinity();
 
         TouchedExpiryPolicy plc = new TouchedExpiryPolicy(new Duration(MILLISECONDS, 10));
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/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 e6ae7a5..76b8036 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
@@ -67,7 +67,7 @@ public class GridCachePartitionedFullApiSelfTest extends GridCacheAbstractFullAp
             cache.put(key, i);
         }
 
-        CacheAffinity aff = grid(0).affinity(cache.name());
+        Affinity aff = grid(0).affinity(cache.name());
 
         for (int i = 0 ; i < aff.partitions(); i++)
             String.valueOf(cache.entrySet(i));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4ba0b01a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
index 9fe125c..109ef6d 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/GridCachePartitionedLoadCacheSelfTest.java
@@ -108,7 +108,7 @@ public class GridCachePartitionedLoadCacheSelfTest extends GridCommonAbstractTes
             else
                 cache.localLoadCache(null, PUT_CNT);
 
-            CacheAffinity<Integer> aff = grid(0).affinity(null);
+            Affinity<Integer> aff = grid(0).affinity(null);
 
             int[] parts = aff.allPartitions(grid(0).localNode());
 


Mime
View raw message