ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/36] incubator-ignite git commit: # ignite-1017
Date Tue, 30 Jun 2015 08:58:27 GMT
# ignite-1017


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

Branch: refs/heads/ignite-gg-10424
Commit: 5b237e15ccab0e48b69045cd1c55698ac26b8cd0
Parents: 01d842a
Author: Atri <atri.jiit@gmail.com>
Authored: Tue Jun 23 19:02:23 2015 +0530
Committer: ashutak <ashutak@gridgain.com>
Committed: Fri Jun 26 14:11:35 2015 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/cluster/ClusterGroup.java     | 16 ++++++++++++++++
 .../internal/cluster/ClusterGroupAdapter.java       |  7 +++++++
 .../internal/cluster/IgniteClusterAsyncImpl.java    |  5 +++++
 3 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
index 2f43fc6..9627f76 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterGroup.java
@@ -131,10 +131,26 @@ public interface ClusterGroup {
      * @param name Name of the attribute.
      * @param val Optional attribute value to match.
      * @return Cluster group for nodes containing specified attribute.
+     *
+     * @deprecated use {@link ClusterGroup#forAttribute(String name, @Nullable Object val}
      */
     public ClusterGroup forAttribute(String name, @Nullable String val);
 
     /**
+     * Creates a new cluster group for nodes containing given name and value
+     * specified in user attributes.
+     * <p>
+     * User attributes for every node are optional and can be specified in
+     * grid node configuration. See {@link IgniteConfiguration#getUserAttributes()}
+     * for more information.
+     *
+     * @param name Name of the attribute.
+     * @param val Optional attribute value to match.
+     * @return Cluster group for nodes containing specified attribute.
+     */
+    public ClusterGroup forAttribute(String name, @Nullable Object val);
+
+    /**
      * Creates a cluster group of nodes started in server mode.
      *
      * @see Ignition#setClientMode(boolean)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/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 b940017..414f5ba 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
@@ -352,6 +352,13 @@ public class ClusterGroupAdapter implements ClusterGroupEx, Externalizable
{
     }
 
     /** {@inheritDoc} */
+    @Override public final ClusterGroup forAttribute(String name, @Nullable final Object
val) {
+        A.notNull(name, "n");
+
+        return forPredicate(new AttributeFilter(name, val));
+    }
+
+    /** {@inheritDoc} */
     @Override public ClusterGroup forServers() {
         return forPredicate(new AttributeFilter(IgniteNodeAttributes.ATTR_CLIENT_MODE, false));
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/5b237e15/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
index 6e68527..f676261 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/cluster/IgniteClusterAsyncImpl.java
@@ -197,6 +197,11 @@ public class IgniteClusterAsyncImpl extends AsyncSupportAdapter<IgniteCluster>
     }
 
     /** {@inheritDoc} */
+    @Override public ClusterGroup forAttribute(String name, @Nullable Object val) {
+        return cluster.forAttribute(name, val);
+    }
+
+    /** {@inheritDoc} */
     @Override public ClusterGroup forServers() {
         return cluster.forServers();
     }


Mime
View raw message