ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [34/36] incubator-ignite git commit: # IGNITE-312 Remove ugly code.
Date Sun, 22 Feb 2015 16:44:22 GMT
# IGNITE-312 Remove ugly code.


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

Branch: refs/heads/ignite-312
Commit: a50a0fb8019259d8a44cfa60e7a7c773b0137f1f
Parents: 7000676
Author: sevdokimov <sergey.evdokimov@jetbrains.com>
Authored: Sun Feb 22 19:08:41 2015 +0300
Committer: sevdokimov <sergey.evdokimov@jetbrains.com>
Committed: Sun Feb 22 19:08:41 2015 +0300

----------------------------------------------------------------------
 .../managers/discovery/GridDiscoveryManager.java         | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a50a0fb8/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index 6a14d60..449464a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -2055,12 +2055,6 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
          * @param exclNode Node to exclude.
          */
         private void filterNodeMap(ConcurrentMap<String, Collection<ClusterNode>>
map, final ClusterNode exclNode) {
-            IgnitePredicate<ClusterNode> p = new P1<ClusterNode>() {
-                @Override public boolean apply(ClusterNode e) {
-                    return exclNode.equals(e);
-                }
-            };
-
             for (String cacheName : U.cacheNames(exclNode)) {
                 String maskedName = maskNull(cacheName);
 
@@ -2070,7 +2064,10 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi>
{
                     if (oldNodes == null || oldNodes.isEmpty())
                         break;
 
-                    Collection<ClusterNode> newNodes = F.lose(oldNodes, true, p);
+                    Collection<ClusterNode> newNodes = new ArrayList<>(oldNodes);
+
+                    if (!newNodes.remove(exclNode))
+                        break;
 
                     if (map.replace(maskedName, oldNodes, newNodes))
                         break;


Mime
View raw message