ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [25/27] incubator-ignite git commit: ignite-688 Age related cluster group doesn't refresh dynamically
Date Tue, 07 Apr 2015 19:26:57 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/6fd16157
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6fd16157
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6fd16157

Branch: refs/heads/ignite-688
Commit: 6fd16157825a600119b26d9b4b5f6166cc97c093
Parents: f11e357
Author: agura <agura@gridgain.com>
Authored: Tue Apr 7 02:03:50 2015 +0300
Committer: Andrey Gura <agura@gridgain.com>
Committed: Tue Apr 7 18:31:37 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/6fd16157/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