Interface ICluster
Represents whole cluster (group of all nodes in a cluster).
All members are thread-safe and may be used concurrently from multiple threads.
Inherited Members
Namespace: Apache.Ignite.Core.Cluster
Assembly: Apache.Ignite.Core.dll
Syntax
public interface ICluster : IClusterGroup
Properties
ClientReconnectTask
Gets the reconnect task, which will transition to Completed state when local client node reconnects to the cluster.
Result of the task indicates whether cluster has been restarted.
If local node is not in client mode or is not disconnected, returns completed task.
Declaration
Task<bool> ClientReconnectTask { get; }
Property Value
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<System.Boolean> | The reconnect task. |
TopologyVersion
Gets current topology version. In case of TCP discovery topology versions are sequential
- 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.
Declaration
long TopologyVersion { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 | Current topology version. |
Methods
ForLocal()
Gets monadic projection consisting from the local node.
Declaration
IClusterGroup ForLocal()
Returns
| Type | Description |
|---|---|
| IClusterGroup | Monadic projection consisting from the local node. |
GetLocalNode()
Gets local Ignite node.
Declaration
IClusterNode GetLocalNode()
Returns
| Type | Description |
|---|---|
| IClusterNode | Local Ignite node. |
GetTopology(Int64)
Gets a topology by version. Returns null if topology history storage doesn't contain specified topology version (history currently keeps the last 1000 snapshots).
Declaration
ICollection<IClusterNode> GetTopology(long ver)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int64 | ver | Topology version. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<IClusterNode> | Collection of Ignite nodes which represented by specified topology version, if it is present in history storage, null otherwise. |
Exceptions
| Type | Condition |
|---|---|
| IgniteException | If underlying SPI implementation does not support
topology history. Currently only |
PingNode(Guid)
Pings a remote node.
Declaration
bool PingNode(Guid nodeId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Guid | nodeId | ID of a node to ping. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if node for a given ID is alive, false otherwise. |
ResetMetrics()
Resets local I/O, job, and task execution metrics.
Declaration
void ResetMetrics()