Public Member Functions | Properties | List of all members
GridGain.Cluster.ICluster Interface Reference

Represents whole cluster (group of all nodes in a cluster). All members are thread-safe and may be used concurrently from multiple threads. More...

Inherits GridGain.Cluster.IClusterGroup.

Public Member Functions

IClusterGroup ForLocal ()
 Gets monadic projection consisting from the local node. More...
 
bool PingNode (Guid nodeId)
 Pings a remote node. More...
 
ICollection< IClusterNode > Topology (long ver)
 Gets a topology by version. Returns null if topology history storage doesn't contain specified topology version (history currently keeps the last 1000 snapshots). More...
 
void ResetMetrics ()
 Resets local I/O, job, and task execution metrics. More...
 
- Public Member Functions inherited from GridGain.Cluster.IClusterGroup
ICompute Compute ()
 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 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 GridGain.exe. More...
 
ICollection< IClusterNode > Nodes ()
 Gets read-only collections of nodes in this projection. More...
 
IClusterNode Node (Guid id)
 Gets a node for given ID from this grid projection. More...
 
IClusterNode Node ()
 Gets first node from the list of nodes in this projection. More...
 
IClusterMetrics Metrics ()
 Gets a metrics snapshot for this projection More...
 
IMessaging Message ()
 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 Events ()
 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 Services ()
 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

IClusterNode LocalNode [get]
 Gets local grid node. More...
 
long TopologyVersion [get]
 Gets current topology version. In case of TCP discovery topology versions are sequential More...
 
- Properties inherited from GridGain.Cluster.IClusterGroup
IGrid Grid [get]
 Instance of grid. More...
 

Detailed Description

Member Function Documentation

IClusterGroup GridGain.Cluster.ICluster.ForLocal ( )
Returns
Monadic projection consisting from the local node.
bool GridGain.Cluster.ICluster.PingNode ( Guid  nodeId)
Parameters
nodeIdID of a node to ping.
Returns
True if node for a given ID is alive, false otherwise.
void GridGain.Cluster.ICluster.ResetMetrics ( )
ICollection<IClusterNode> GridGain.Cluster.ICluster.Topology ( long  ver)
Parameters
verTopology version.
Returns
Collection of grid nodes which represented by specified topology version, if it is present in history storage, null otherwise.
Exceptions
GridExceptionIf underlying SPI implementation does not support topology history. Currently only
org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
supports topology history.

Property Documentation

IClusterNode GridGain.Cluster.ICluster.LocalNode
get
Returns
Local grid node.
long GridGain.Cluster.ICluster.TopologyVersion
get
  • they start from 1 and get incremented every time whenever a node joins or leaves. For other discovery SPIs topology versions may not be (and likely are not) sequential.

Current topology version.