ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [14/18] ignite git commit: IGNITE-2263: DANGEROUS! Removed view() from GridManagerAdapter.
Date Fri, 01 Jan 2016 21:07:41 GMT
IGNITE-2263: DANGEROUS! Removed view() from GridManagerAdapter.


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

Branch: refs/heads/ignite-2263
Commit: 6b00ea64f3326dbf84060d4534c429fade7e9a50
Parents: ef4736f
Author: thatcoach <ppozerov@list.ru>
Authored: Fri Jan 1 23:22:00 2016 +0300
Committer: thatcoach <ppozerov@list.ru>
Committed: Fri Jan 1 23:22:00 2016 +0300

----------------------------------------------------------------------
 .../internal/managers/GridManagerAdapter.java   | 29 +++++++++++---------
 1 file changed, 16 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6b00ea64/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
index 21a80c3..950d1c9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/GridManagerAdapter.java
@@ -17,13 +17,6 @@
 
 package org.apache.ignite.internal.managers;
 
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.Map;
-import java.util.UUID;
-import javax.cache.expiry.Duration;
-import javax.cache.expiry.ExpiryPolicy;
-import javax.cache.expiry.TouchedExpiryPolicy;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
@@ -58,9 +51,17 @@ import org.apache.ignite.spi.IgniteSpiNoop;
 import org.apache.ignite.spi.IgniteSpiTimeoutObject;
 import org.jetbrains.annotations.Nullable;
 
-import static java.util.Arrays.asList;
-import static java.util.concurrent.TimeUnit.MILLISECONDS;
-import static org.apache.ignite.internal.managers.communication.GridIoPolicy.SYSTEM_POOL;
+import javax.cache.expiry.Duration;
+import javax.cache.expiry.ExpiryPolicy;
+import javax.cache.expiry.TouchedExpiryPolicy;
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Map;
+import java.util.UUID;
+
+import static java.util.Arrays.*;
+import static java.util.concurrent.TimeUnit.*;
+import static org.apache.ignite.internal.managers.communication.GridIoPolicy.*;
 
 /**
  * Convenience adapter for grid managers.
@@ -334,13 +335,15 @@ public abstract class GridManagerAdapter<T extends IgniteSpi>
implements GridMan
                     @Override public Collection<ClusterNode> remoteDaemonNodes() {
                         final Collection<ClusterNode> all = ctx.discovery().daemonNodes();
 
-                        return !localNode().isDaemon() ?
-                            all :
-                            F.view(all, new IgnitePredicate<ClusterNode>() {
+                        if (localNode().isDaemon()) {
+                            return F.retain(all, true, new IgnitePredicate<ClusterNode>()
{
                                 @Override public boolean apply(ClusterNode n) {
                                     return n.isDaemon();
                                 }
                             });
+                        }
+                        else
+                            return all;
                     }
 
                     @Nullable @Override public ClusterNode node(UUID nodeId) {


Mime
View raw message