org.apache.ignite.internal.processors.cluster

## Class ClusterProcessor

- java.lang.Object
- - org.apache.ignite.internal.processors.GridProcessorAdapter
  - - org.apache.ignite.internal.processors.cluster.ClusterProcessor

All Implemented Interfaces:
  GridComponent, GridProcessor

    public class ClusterProcessor
    extends GridProcessorAdapter

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent

`GridComponent.DiscoveryDataExchangeType`

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`ctx, diagnosticLog, log`

### Constructor Summary

Constructors
Constructor and Description
`ClusterProcessor(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`IgniteFuture<?>` `clientReconnectFuture()`
`void` `collectGridNodeData(DiscoveryDataBag dataBag)` Collects discovery data on nodes already in grid on receiving `TcpDiscoveryNodeAddedMessage`.
`void` `collectJoiningNodeData(DiscoveryDataBag dataBag)` Collects discovery data on joining node before sending `TcpDiscoveryJoinRequestMessage` request.
`boolean` `diagnosticEnabled()`
`IgniteLogger` `diagnosticLog()`
`void` `disableUpdateNotifier()` Disables update notifier.
`GridComponent.DiscoveryDataExchangeType` `discoveryDataType()` Gets unique component type to distinguish components providing discovery data.
`IgniteClusterImpl` `get()`
`void` `initDiagnosticListeners()`
`String` `latestVersion()`
`void` `onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)` Receives discovery data object from remote nodes (called on new node during discovery process).
`void` `onKernalStart(boolean active)` Callback that notifies that kernal has successfully started, including all managers and processors.
`IgniteInternalFuture<String>` `requestDiagnosticInfo(UUID nodeId, IgniteClosure<GridKernalContext,IgniteDiagnosticInfo> c, String baseMsg)` Sends diagnostic message closure to remote node.
`void` `stop(boolean cancel)` Stops grid component.
`boolean` `updateNotifierEnabled()`

### Methods inherited from class org.apache.ignite.internal.processors.GridProcessorAdapter

`assertParameter, onDisconnected, onJoiningNodeDataReceived, onKernalStop, onReconnected, printMemoryStats, start, toString, validateNode, validateNode`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ClusterProcessor

    public ClusterProcessor(GridKernalContext ctx)

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### diagnosticEnabled

    public boolean diagnosticEnabled()

Returns:
  Diagnostic flag.

#### initDiagnosticListeners

    public void initDiagnosticListeners()
                                 throws IgniteCheckedException

Throws:
  `IgniteCheckedException` - If failed.

#### diagnosticLog

    public IgniteLogger diagnosticLog()

Returns:
  Logger for diagnostic category.

#### get

    public IgniteClusterImpl get()

Returns:
  Cluster.

#### clientReconnectFuture

    public IgniteFuture<?> clientReconnectFuture()

Returns:
  Client reconnect future.

#### discoveryDataType

    @Nullable
    public GridComponent.DiscoveryDataExchangeType discoveryDataType()

Gets unique component type to distinguish components providing discovery data. Must return non-null value if component implements any of methods `GridComponent.collectJoiningNodeData(DiscoveryDataBag)` or `GridComponent.collectGridNodeData(DiscoveryDataBag)`.

Specified by:
  `discoveryDataType` in interface `GridComponent`
Overrides:
  `discoveryDataType` in class `GridProcessorAdapter`
Returns:
  Unique component type for discovery data exchange.

#### collectJoiningNodeData

    public void collectJoiningNodeData(DiscoveryDataBag dataBag)

Collects discovery data on joining node before sending `TcpDiscoveryJoinRequestMessage` request.

Specified by:
  `collectJoiningNodeData` in interface `GridComponent`
Overrides:
  `collectJoiningNodeData` in class `GridProcessorAdapter`
Parameters:
  `dataBag` - container object to store discovery data in.

#### collectGridNodeData

    public void collectGridNodeData(DiscoveryDataBag dataBag)

Collects discovery data on nodes already in grid on receiving `TcpDiscoveryNodeAddedMessage`.

Specified by:
  `collectGridNodeData` in interface `GridComponent`
Overrides:
  `collectGridNodeData` in class `GridProcessorAdapter`
Parameters:
  `dataBag` - container object to store discovery data in.

#### onGridDataReceived

    public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)

Receives discovery data object from remote nodes (called on new node during discovery process).

Specified by:
  `onGridDataReceived` in interface `GridComponent`
Overrides:
  `onGridDataReceived` in class `GridProcessorAdapter`
Parameters:
  `data` - `DiscoveryDataBag.GridDiscoveryData` interface to retrieve discovery data collected on remote nodes (data common for all nodes in grid and specific for each node).

#### onKernalStart

    public void onKernalStart(boolean active)
                       throws IgniteCheckedException

Callback that notifies that kernal has successfully started, including all managers and processors.

Specified by:
  `onKernalStart` in interface `GridComponent`
Overrides:
  `onKernalStart` in class `GridProcessorAdapter`
Parameters:
  `active` - Cluster active flag (note: should be used carefully since state can change concurrently).
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Specified by:
  `stop` in interface `GridComponent`
Overrides:
  `stop` in class `GridProcessorAdapter`
Parameters:
  `cancel` - If `true`, then all ongoing tasks or jobs for relevant components need to be cancelled.
Throws:
  `IgniteCheckedException` - Thrown in case of any errors.

#### disableUpdateNotifier

    public void disableUpdateNotifier()

Disables update notifier.

#### updateNotifierEnabled

    public boolean updateNotifierEnabled()

Returns:
  Update notifier status.

#### latestVersion

    public String latestVersion()

Returns:
  Latest version string.

#### requestDiagnosticInfo

    public IgniteInternalFuture<String> requestDiagnosticInfo(UUID nodeId,
                                                              IgniteClosure<GridKernalContext,IgniteDiagnosticInfo> c,
                                                              String baseMsg)

Sends diagnostic message closure to remote node. When response received dumps remote message and local communication info about connection(s) with remote node.

Parameters:
  `nodeId` - Target node ID.
  `c` - Closure to send.
  `baseMsg` - Local message to log.
Returns:
  Message future.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018