# sprint-2 - javadoc fixes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/542cea74 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/542cea74 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/542cea74 Branch: refs/heads/ignite-497 Commit: 542cea748f993a04356e2dc012b4b541667f40a4 Parents: 3751ed1 Author: Dmitiry Setrakyan <dsetrak...@gridgain.com> Authored: Wed Mar 25 22:25:04 2015 -0700 Committer: Dmitiry Setrakyan <dsetrak...@gridgain.com> Committed: Wed Mar 25 22:25:04 2015 -0700 ---------------------------------------------------------------------- .../org/apache/ignite/cluster/ClusterGroup.java | 43 ++++++++--------- .../org/apache/ignite/cluster/ClusterNode.java | 49 ++++++++------------ 2 files changed, 39 insertions(+), 53 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/542cea74/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 c416b4b..6947f76 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 @@ -25,37 +25,32 @@ import org.jetbrains.annotations.*; import java.util.*; /** - * Defines grid projection which represents a common functionality over a group of nodes. - * The {@link Ignite} interface itself also extends {@code GridProjection} which makes - * an instance of {@link Ignite} a projection over all grid nodes. + * Defines a cluster group which contains all or a subset of cluster nodes. + * The {@link IgniteCluster} interface itself also extends {@code ClusterGroup} which makes + * an instance of {@link IgniteCluster} into a cluster group containing all cluster nodes. * <h1 class="header">Clustering</h1> - * Grid projection allows to group grid nodes into various subgroups to perform distributed - * operations on them. All {@code 'forXXX(...)'} methods will create a child grid projection - * from existing projection. If you create a new projection from current one, then the resulting - * projection will include a subset of nodes from current projection. The following code snippet - * shows how to create and nest grid projections: + * Cluster group allows to group cluster nodes into various subgroups to perform distributed + * operations on them. All {@code 'forXXX(...)'} methods will create a child cluster group + * from the existing cluster group. If you create a new cluster group from the current one, then + * the resulting cluster group will include a subset of nodes from the current one. The following + * code shows how to create and nest cluster groups: * <pre name="code" class="java"> - * Grid g = Ignition.ignite(); + * Ignite ignite = Ignition.ignite(); * - * // Projection over remote nodes. - * GridProjection remoteNodes = g.forRemotes(); + * IgniteCluster cluster = ignite.cluster(); * - * // Projection over random remote node. - * GridProjection randomNode = remoteNodes.forRandom(); + * // Cluster group over remote nodes. + * ClusterGroup remoteNodes = cluster.forRemotes(); * - * // Projection over all nodes with cache named "myCache" enabled. - * GridProjection cacheNodes = g.forCacheNodes("myCache"); + * // Cluster group over random remote node. + * ClusterGroup randomNode = remoteNodes.forRandom(); * - * // Projection over all nodes that have user attribute "group" set to value "worker". - * GridProjection workerNodes = g.forAttribute("group", "worker"); + * // Cluster group over all nodes with cache named "myCache" enabled. + * ClusterGroup cacheNodes = cluster.forCacheNodes("myCache"); + * + * // Cluster group over all nodes that have the user attribute "group" set to the value "worker". + * ClusterGroup workerNodes = cluster.forAttribute("group", "worker"); * </pre> - * <h1 class="header">Features</h1> - * Grid projection provides the following functionality over the underlying group of nodes: - * <ul> - * <li>{@link IgniteCompute} - functionality for executing tasks and closures over nodes in this projection.</li> - * <li>{@link IgniteMessaging} - functionality for topic-based message exchange over nodes in this projection.</li> - * <li>{@link IgniteEvents} - functionality for querying and listening to events on nodes in this projection.</li> - * </ul> */ public interface ClusterGroup { /** http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/542cea74/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java index 75bdc67..9cb5d3d 100644 --- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java +++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterNode.java @@ -24,23 +24,19 @@ import org.jetbrains.annotations.*; import java.util.*; /** - * Interface representing a single grid node. Use {@link #attribute(String)} or - * {@link #metrics()} to get static and dynamic information about remote nodes. - * {@code GridNode} list, which includes all nodes within task topology, is provided - * to {@link org.apache.ignite.compute.ComputeTask#map(List, Object)} method. You can also get a handle on - * discovered nodes by calling any of the following methods: - * <ul> - * <li>{@link IgniteCluster#localNode()}</li> - * </ul> + * Interface representing a single cluster node. Use {@link #attribute(String)} or + * {@link #metrics()} to get static and dynamic information about cluster nodes. + * {@code ClusterNode} list, which includes all nodes within task topology, is provided + * to {@link org.apache.ignite.compute.ComputeTask#map(List, Object)} method. * <p> - * <h1 class="header">Grid Node Attributes</h1> - * You can use grid node attributes to provide static information about a node. - * This information is initialized once within grid, during node startup, and + * <h1 class="header">Cluster Node Attributes</h1> + * You can use cluster node attributes to provide static information about a node. + * This information is initialized once within a cluster, during the node startup, and * remains the same throughout the lifetime of a node. Use * {@link org.apache.ignite.configuration.IgniteConfiguration#getUserAttributes()} method to initialize your custom * node attributes at startup. Here is an example of how to assign an attribute to a node at startup: * <pre name="code" class="xml"> - * <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration"> + * <bean class="org.apache.ignite.configuration.IgniteConfiguration"> * ... * <property name="userAttributes"> * <map> @@ -59,7 +55,7 @@ import java.util.*; * <li>{@code org.apache.ignite.jit.name} - Name of JIT compiler used.</li> * <li>{@code org.apache.ignite.net.itf.name} - Name of network interface.</li> * <li>{@code org.apache.ignite.user.name} - Operating system user name.</li> - * <li>{@code org.apache.ignite.ignite.name} - Grid name (see {@link org.apache.ignite.Ignite#name()}).</li> + * <li>{@code org.apache.ignite.ignite.name} - Ignite name (see {@link Ignite#name()}).</li> * <li> * {@code spiName.org.apache.ignite.spi.class} - SPI implementation class for every SPI, * where {@code spiName} is the name of the SPI (see {@link org.apache.ignite.spi.IgniteSpi#getName()}. @@ -75,30 +71,25 @@ import java.util.*; * in {@link System#getProperties()} about any node. So for example, in order to print out * information about Operating System for all nodes you would do the following: * <pre name="code" class="java"> - * for (GridNode node : G.grid().nodes()) { + * for (ClusterNode node : ignite.cluster().nodes()) { * System.out.println("Operating system name: " + node.getAttribute("os.name")); * System.out.println("Operating system architecture: " + node.getAttribute("os.arch")); * System.out.println("Operating system version: " + node.getAttribute("os.version")); * } * </pre> * <p> - * This interface provide a system view on the node instance. All user-level APIs work with - * {@link ClusterNode} interface that provides much more functionality and extends this - * interface. Consult {@link ClusterNode} for more information. - * <p> - * <h1 class="header">Grid Node Metrics</h1> - * Grid node metrics (see {@link #metrics()}) are updated frequently for all nodes + * <h1 class="header">Cluster Node Metrics</h1> + * Cluster node metrics (see {@link #metrics()}) are updated frequently for all nodes * and can be used to get dynamic information about a node. The frequency of update * is often directly related to the heartbeat exchange between nodes. So if, for example, * default {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi} is used, * the metrics data will be updated every {@code 2} seconds by default. * <p> - * Grid node metrics provide information about other nodes that can frequently change, + * Grid node metrics provide information that can frequently change, * such as Heap and Non-Heap memory utilization, CPU load, number of active and waiting * grid jobs, etc... This information can become useful during job collision resolution or - * {@link org.apache.ignite.compute.ComputeTask#map(List, Object)} operation when jobs are assigned to remote nodes - * for execution. For example, you can only pick nodes that don't have any jobs waiting - * to be executed. + * {@link org.apache.ignite.compute.ComputeTask#map(List, Object)} operation when jobs are + * assigned to remote nodes for execution. * <p> * Local node metrics are registered as {@code MBean} and can be accessed from * any JMX management console. The simplest way is to use standard {@code jconsole} @@ -231,14 +222,14 @@ public interface ClusterNode { /** * Tests whether or not this node is a daemon. * <p> - * Daemon nodes are the usual grid nodes that participate in topology but not - * visible on the main APIs, i.e. they are not part of any projections. The only + * Daemon nodes are the usual cluster nodes that participate in topology but are not + * visible on the main APIs, i.e. they are not part of any cluster group. The only * way to see daemon nodes is to use {@link IgniteCluster#forDaemons()} method. * <p> * Daemon nodes are used primarily for management and monitoring functionality that - * is build on Ignite and needs to participate in the topology but should be - * excluded from "normal" topology so that it won't participate in task execution - * or in-memory database. + * is build on Ignite and needs to participate in the topology, but should be + * excluded from the "normal" topology, so that they won't participate in the task execution + * or data grid operations. * <p> * Application code should never use daemon nodes. *