Apache Ignite.NET
Apache.Ignite.Core.Cluster.IClusterGroup Interface Reference

Defines grid projection which represents a common functionality over a group of nodes. Grid projection allows to group Ignite nodes into various subgroups to perform distributed operations on them. All 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 grid projections: More...

Inheritance diagram for Apache.Ignite.Core.Cluster.IClusterGroup:
Apache.Ignite.Core.Cluster.ICluster

Public Member Functions

ICompute GetCompute ()
 Gets compute functionality over this grid projection. All operations on the returned ICompute instance will only include nodes from this projection. More...
 
IClusterGroup ForNodes (IEnumerable< IClusterNode > nodes)
 Creates a grid projection over a given set of nodes. More...
 
IClusterGroup ForNodes (params IClusterNode[] nodes)
 Creates a grid projection over a given set of nodes. More...
 
IClusterGroup ForNodeIds (IEnumerable< Guid > ids)
 Creates a grid projection over a given set of node IDs. More...
 
IClusterGroup ForNodeIds (params Guid[] ids)
 Creates a grid projection over a given set of node IDs. More...
 
IClusterGroup ForPredicate (Func< IClusterNode, bool > p)
 Creates a grid projection which includes all nodes that pass the given predicate filter. More...
 
IClusterGroup ForAttribute (string name, string val)
 Creates projection for nodes containing given name and value specified in user attributes. More...
 
IClusterGroup ForCacheNodes (string name)
 Creates projection for all nodes that have cache with specified name running. More...
 
IClusterGroup ForDataNodes (string name)
 Creates projection for all nodes that have cache with specified name running and cache distribution mode is PARTITIONED_ONLY or NEAR_PARTITIONED. More...
 
IClusterGroup ForClientNodes (string name)
 Creates projection for all nodes that have cache with specified name running and cache distribution mode is CLIENT_ONLY or NEAR_ONLY. More...
 
IClusterGroup ForRemotes ()
 Gets grid projection consisting from the nodes in this projection excluding the local node. More...
 
IClusterGroup ForDaemons ()
 Gets a cluster group consisting of the daemon nodes. More...
 
IClusterGroup ForHost (IClusterNode node)
 Gets grid projection consisting from the nodes in this projection residing on the same host as given node. More...
 
IClusterGroup ForRandom ()
 Creates grid projection with one random node from current projection. More...
 
IClusterGroup ForOldest ()
 Creates grid projection with one oldest node in the current projection. The resulting projection is dynamic and will always pick the next oldest node if the previous one leaves topology even after the projection has been created. More...
 
IClusterGroup ForYoungest ()
 Creates grid projection with one youngest node in the current projection. The resulting projection is dynamic and will always pick the newest node in the topology, even if more nodes entered after the projection has been created. More...
 
IClusterGroup ForDotNet ()
 Creates grid projection for nodes supporting .Net, i.e. for nodes started with Apache.Ignite.exe. More...
 
IClusterGroup ForServers ()
 Creates a cluster group of nodes started in server mode (IgniteConfiguration.ClientMode). More...
 
ICollection< IClusterNodeGetNodes ()
 Gets read-only collections of nodes in this projection. More...
 
IClusterNode GetNode (Guid id)
 Gets a node for given ID from this grid projection. More...
 
IClusterNode GetNode ()
 Gets first node from the list of nodes in this projection. More...
 
IClusterMetrics GetMetrics ()
 Gets a metrics snapshot for this projection More...
 
IMessaging GetMessaging ()
 Gets messaging facade over nodes within this cluster group. All operations on the returned IMessaging> instance will only include nodes from current cluster group. More...
 
IEvents GetEvents ()
 Gets events facade over nodes within this cluster group. All operations on the returned IEvents> instance will only include nodes from current cluster group. More...
 
IServices GetServices ()
 Gets services facade over nodes within this cluster group. All operations on the returned IServices> instance will only include nodes from current cluster group. More...
 

Properties

IIgnite Ignite [get]
 Instance of Ignite. More...
 

Detailed Description

var g = Ignition.GetIgnite();

// Projection over remote nodes. var remoteNodes = g.ForRemotes();

// Projection over random remote node. var randomNode = g.ForRandom();

// Projection over all nodes with cache named "myCache" enabled. var cacheNodes = g.ForCacheNodes("myCache");

// Projection over all nodes that have user attribute "group" set to value "worker". var workerNodes = g.ForAttribute("group", "worker"); Grid projection provides functionality for executing tasks and closures over nodes in this projection using GetCompute.

All members are thread-safe and may be used concurrently from multiple threads.

Member Function Documentation

IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForAttribute ( string  name,
string  val 
)
Parameters
nameName of the attribute.
valOptional attribute value to match.
Returns
Grid projection for nodes containing specified attribute.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForCacheNodes ( string  name)
Parameters
nameCache name to include into projection.
Returns
Projection over nodes that have specified cache running.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForClientNodes ( string  name)
Parameters
nameCache name to include into projection.
Returns
Projection over nodes that have specified cache running.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForDaemons ( )

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 cluster group. The only way to see daemon nodes is to use this method.

Daemon nodes are used primarily for management and monitoring functionality that is build on Ignite and needs to participate in the topology, but also needs to be excluded from the "normal" topology, so that it won't participate in the task execution or in-memory data grid storage.

Returns
Cluster group consisting of the daemon nodes.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForDataNodes ( string  name)
Parameters
nameCache name to include into projection.
Returns
Projection over nodes that have specified cache running.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForDotNet ( )
Returns
Grid projection for nodes supporting .Net.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForHost ( IClusterNode  node)
Parameters
nodeNode residing on the host for which projection is created.
Returns
Projection for nodes residing on the same host as passed in node.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForNodeIds ( IEnumerable< Guid >  ids)
Parameters
idsCollection of node IDs to create a projection from.
Returns
Projection over provided Ignite node IDs.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForNodeIds ( params Guid[]  ids)
Parameters
idsCollection of node IDs to create a projection from.
Returns
Projection over provided Ignite node IDs.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForNodes ( IEnumerable< IClusterNode nodes)
Parameters
nodesCollection of nodes to create a projection from.
Returns
Projection over provided Ignite nodes.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForNodes ( params IClusterNode[]  nodes)
Parameters
nodesCollection of nodes to create a projection from.
Returns
Projection over provided Ignite nodes.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForOldest ( )
Returns
Grid projection with one oldest node from the current projection.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForPredicate ( Func< IClusterNode, bool >  p)
Parameters
pPredicate filter for nodes to include into this projection.
Returns
Grid projection for nodes that passed the predicate filter.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForRandom ( )
Returns
Grid projection with one random node from current projection.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForRemotes ( )
Returns
Grid projection consisting from the nodes in this projection excluding the local node.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForServers ( )
Returns
Cluster group of nodes started in server mode.
IClusterGroup Apache.Ignite.Core.Cluster.IClusterGroup.ForYoungest ( )
Returns
Grid projection with one youngest node from the current projection.
ICompute Apache.Ignite.Core.Cluster.IClusterGroup.GetCompute ( )
Returns
Compute instance over this grid projection.
IEvents Apache.Ignite.Core.Cluster.IClusterGroup.GetEvents ( )
Returns
Events instance over this cluster group.
IMessaging Apache.Ignite.Core.Cluster.IClusterGroup.GetMessaging ( )
Returns
Messaging instance over this cluster group.
IClusterMetrics Apache.Ignite.Core.Cluster.IClusterGroup.GetMetrics ( )
Returns
Grid projection metrics snapshot.
IClusterNode Apache.Ignite.Core.Cluster.IClusterGroup.GetNode ( Guid  id)
Parameters
idNode ID.
Returns
Node with given ID from this projection or null if such node does not exist in this projection.
IClusterNode Apache.Ignite.Core.Cluster.IClusterGroup.GetNode ( )
Returns
Node.
ICollection<IClusterNode> Apache.Ignite.Core.Cluster.IClusterGroup.GetNodes ( )
Returns
All nodes in this projection.
IServices Apache.Ignite.Core.Cluster.IClusterGroup.GetServices ( )
Returns
Services instance over this cluster group.

Property Documentation

IIgnite Apache.Ignite.Core.Cluster.IClusterGroup.Ignite
get