ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [36/37] incubator-ignite git commit: ignite-688 Age related cluster group doesn't refresh dynamically
Date Tue, 07 Apr 2015 11:55:33 GMT
ignite-688 Age related cluster group doesn't refresh dynamically


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

Branch: refs/heads/ignite-688
Commit: 90969ce9e5245df2ee4c52df037188af40537a17
Parents: 238cbb1
Author: agura <agura@gridgain.com>
Authored: Tue Apr 7 02:03:50 2015 +0300
Committer: Andrey Gura <agura@gridgain.com>
Committed: Tue Apr 7 12:57:31 2015 +0300

----------------------------------------------------------------------
 .../internal/cluster/ClusterGroupAdapter.java   | 29 ++++----------------
 1 file changed, 5 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/90969ce9/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
index 0daffcc..40462c3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/ClusterGroupAdapter.java
@@ -114,28 +114,6 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable
{
     }
 
     /**
-     * @param subjId Subject ID.
-     * @param ctx Grid kernal context.
-     * @param p Predicate.
-     * @param ids Node IDs.
-     */
-    private ClusterGroupAdapter(@Nullable GridKernalContext ctx,
-        @Nullable UUID subjId,
-        @Nullable IgnitePredicate<ClusterNode> p,
-        Set<UUID> ids)
-    {
-        if (ctx != null)
-            setKernalContext(ctx);
-
-        this.subjId = subjId;
-        this.p = p;
-        this.ids = ids;
-
-        if (p == null && ids != null)
-            this.p = F.nodeForNodeIds(ids);
-    }
-
-    /**
      * <tt>ctx.gateway().readLock()</tt>
      */
     protected void guard() {
@@ -806,7 +784,7 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable
{
          * @param isOldest Oldest flag.
          */
         private AgeClusterGroup(ClusterGroupAdapter parent, boolean isOldest) {
-            super(parent.ctx, parent.subjId, (IgnitePredicate<ClusterNode>) null);
+            super(parent.ctx, parent.subjId, (IgnitePredicate<ClusterNode>)null);
 
             this.isOldest = isOldest;
 
@@ -822,7 +800,10 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable
{
             try {
                 lastTopVer = ctx.discovery().topologyVersion();
 
-                this.node = isOldest ? U.oldest(super.nodes(), null) : U.youngest(super.nodes(),
null);
+                Collection<ClusterNode> nodes = ctx.discovery().allNodes();
+
+                this.node = isOldest ? U.oldest(nodes, null) : U.youngest(nodes, null);
+
                 this.p = F.nodeForNodes(node);
             }
             finally {


Mime
View raw message