org.apache.ignite.internal.processors.cluster

## Class GridClusterStateProcessor

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

All Implemented Interfaces:
  GridComponent, GridProcessor

    public class GridClusterStateProcessor
    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, log`

### Constructor Summary

Constructors
Constructor and Description
`GridClusterStateProcessor(GridKernalContext ctx)`

### Method Summary

Methods
`boolean` `active()`
`IgniteInternalFuture<?>` `changeGlobalState(boolean activate)`
`boolean` `changeGlobalState(Collection<DynamicCacheChangeRequest> reqs, AffinityTopologyVersion topVer)`
`void` `collectGridNodeData(DiscoveryDataBag dataBag)` Collects discovery data on nodes already in grid on receiving `TcpDiscoveryNodeAddedMessage`.
`GridComponent.DiscoveryDataExchangeType` `discoveryDataType()` Gets unique component type to distinguish components providing discovery data.
`Exception` `onChangeGlobalState()` Invoke from exchange future.
`Exception` `onDeActivate(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.ChangeGlobalStateContext cgsCtx)`
`void` `onExchangeDone()`
`void` `onFinalDeActivate(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.ChangeGlobalStateContext cgsCtx)`
`void` `onFullResponseMessage(Map<UUID,Exception> exs)`
`void` `onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)` Receives discovery data object from remote nodes (called on new node during discovery process).
`void` `start(boolean activeOnStart)` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.
`String` `toString()`

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

`assertParameter, collectJoiningNodeData, onDisconnected, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, validateNode`

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

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

### Constructor Detail

#### GridClusterStateProcessor

    public GridClusterStateProcessor(GridKernalContext ctx)

Parameters:
  `ctx` - Kernal context.

### Method Detail

#### start

    public void start(boolean activeOnStart)
               throws IgniteCheckedException

Starts grid component.

Specified by:
  `start` in interface `GridComponent`
Overrides:
  `start` in class `GridProcessorAdapter`
Throws:
  `IgniteCheckedException` - Throws 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.

#### 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.

#### 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).

#### changeGlobalState

    public IgniteInternalFuture<?> changeGlobalState(boolean activate)

#### active

    public boolean active()

#### changeGlobalState

    public boolean changeGlobalState(Collection<DynamicCacheChangeRequest> reqs,
                            AffinityTopologyVersion topVer)

Parameters:
  `reqs` - Requests.

#### onChangeGlobalState

    public Exception onChangeGlobalState()

Invoke from exchange future.

#### onFullResponseMessage

    public void onFullResponseMessage(Map<UUID,Exception> exs)

Parameters:
  `exs` - Exs.

#### onDeActivate

    public Exception onDeActivate(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.ChangeGlobalStateContext cgsCtx)

#### onFinalDeActivate

    public void onFinalDeActivate(org.apache.ignite.internal.processors.cluster.GridClusterStateProcessor.ChangeGlobalStateContext cgsCtx)

#### onExchangeDone

    public void onExchangeDone()

#### toString

    public String toString()

Overrides:
  `toString` in class `GridProcessorAdapter`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.0.0
Release Date | : April 30 2017