ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [25/50] [abbrv] incubator-ignite git commit: #ignite-237: return to Visor excludeNeighbors attribute.
Date Wed, 04 Mar 2015 08:32:08 GMT
#ignite-237: return to Visor excludeNeighbors attribute.


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

Branch: refs/heads/ignite-51
Commit: 414410bea39a7d8bdc46b1b63c5f506ec96d653e
Parents: 936b879
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Fri Feb 27 18:34:08 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Fri Feb 27 18:34:08 2015 +0300

----------------------------------------------------------------------
 .../visor/cache/VisorCacheAffinityConfiguration.java        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/414410be/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheAffinityConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheAffinityConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheAffinityConfiguration.java
index c43dc1c..47a2cf4 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheAffinityConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheAffinityConfiguration.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.visor.cache;
 
 import org.apache.ignite.cache.affinity.*;
+import org.apache.ignite.cache.affinity.rendezvous.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jetbrains.annotations.*;
@@ -58,15 +59,19 @@ public class VisorCacheAffinityConfiguration implements Serializable {
     public static VisorCacheAffinityConfiguration from(CacheConfiguration ccfg) {
         CacheAffinityFunction aff = ccfg.getAffinity();
 
-        Integer dfltReplicas = null;
         Boolean excludeNeighbors = null;
 
+        if (aff instanceof CacheRendezvousAffinityFunction) {
+            CacheRendezvousAffinityFunction hashAffFunc = (CacheRendezvousAffinityFunction)aff;
+
+            excludeNeighbors = hashAffFunc.isExcludeNeighbors();
+        }
+
         VisorCacheAffinityConfiguration cfg = new VisorCacheAffinityConfiguration();
 
         cfg.function(compactClass(aff));
         cfg.mapper(compactClass(ccfg.getAffinityMapper()));
         cfg.partitionedBackups(ccfg.getBackups());
-        cfg.defaultReplicas(dfltReplicas);
         cfg.excludeNeighbors(excludeNeighbors);
 
         return cfg;


Mime
View raw message