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

Interface representing a single cluster node. Use IClusterNode.Attribute<T>(string) or IClusterNode.Metrics() to get static and dynamic information about remote nodes. You can get a list of all nodes in grid by calling IClusterGroup.Nodes() on IGrid instance. More...

Public Member Functions

T Attribute< T > (string name)
 Gets node's attribute. Attributes are assigned to nodes at startup. More...
 
bool TryGetAttribute< T > (string name, out T attr)
 Try getting node's attribute. Attributes are assigned to nodes at startup. More...
 
IDictionary< string, object > Attributes ()
 Gets all node attributes. Attributes are assigned to nodes at startup. More...
 
IClusterMetrics Metrics ()
 Gets metrics snapshot for this node. Note that node metrics are constantly updated and provide up to date information about nodes. For example, you can get an idea about CPU load on remote node via IClusterMetrics.CurrentCpuLoad. Node metrics are updated with some delay which is directly related to heartbeat frequency. For example, when used with default More...
 

Properties

Guid Id [get]
 Globally unique node ID. A new ID is generated every time a node restarts. More...
 
ICollection< string > Addresses [get]
 Collection of addresses this node is known by. More...
 
ICollection< string > HostNames [get]
 Collection of host names this node is known by. More...
 
long Order [get]
 Node order within grid topology. Discovery SPIs that support node ordering will assign a proper order to each node and will guarantee that discovery event notifications for new nodes will come in proper order. All other SPIs not supporting ordering may choose to return node startup time here. More...
 
bool IsLocal [get]
 Tests whether or not this node is a local node. More...
 
bool IsDaemon [get]
 Tests whether or not this node is a daemon. 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. Daemon nodes are used primarily for management and monitoring functionality that is build on GridGain 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. Application code should never use daemon nodes. More...
 

Detailed Description

You can use grid node attributes to provide static information about a node. This information is initialized once within grid, during node startup, and remains the same throughout the lifetime of a node.

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

Member Function Documentation

T GridGain.Cluster.IClusterNode.Attribute< T > ( string  name)

Note that attributes cannot be changed at runtime.

Parameters
nameAttribute name.
Returns
Attribute value.
IDictionary<string, object> GridGain.Cluster.IClusterNode.Attributes ( )

Note that attributes cannot be changed at runtime.

Returns
All node attributes.
IClusterMetrics GridGain.Cluster.IClusterNode.Metrics ( )

GridTcpDiscoverySpi the update will happen every 2 seconds.

Returns
Runtime metrics snapshot for this node.
bool GridGain.Cluster.IClusterNode.TryGetAttribute< T > ( string  name,
out T  attr 
)

Note that attributes cannot be changed at runtime.

Parameters
nameAttribute name.
attrAttribute value.
Returns
true
in case such attribute exists.

Property Documentation

ICollection<string> GridGain.Cluster.IClusterNode.Addresses
get
Returns
Collection of addresses.
ICollection<string> GridGain.Cluster.IClusterNode.HostNames
get
Returns
Collection of host names.
Guid GridGain.Cluster.IClusterNode.Id
get
bool GridGain.Cluster.IClusterNode.IsDaemon
get
bool GridGain.Cluster.IClusterNode.IsLocal
get
long GridGain.Cluster.IClusterNode.Order
get