Package org.apache.ignite.internal.processors.cluster

## Interface IGridClusterStateProcessor

All Superinterfaces:
  `GridComponent`, `GridProcessor`

All Known Implementing Classes:
  `GridClusterStateProcessor`

    public interface IGridClusterStateProcessor
    extends GridProcessor

### Nested Class Summary

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

`GridComponent.DiscoveryDataExchangeType`

### Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods
`void` `cacheProcessorStarted()`
`IgniteInternalFuture<?>` `changeGlobalState​(ClusterState state, boolean forceDeactivation, Collection<? extends BaselineNode> baselineNodes, boolean forceChangeBaselineTopology)`
`DiscoveryDataClusterState` `clusterState()`
`boolean` `evictionsAllowed()`
`long` `lastStateChangeTime()`
`void` `onBaselineTopologyChanged​(BaselineTopology blt, BaselineTopologyHistoryItem prevBltHistItem)`
`void` `onExchangeFinishedOnCoordinator​(IgniteInternalFuture exchangeFuture, boolean hasMovingPartitions)`
`@Nullable IgniteInternalFuture<Boolean>` `onLocalJoin​(DiscoCache discoCache)`
`@Nullable ChangeGlobalStateFinishMessage` `onNodeLeft​(ClusterNode node)`
`void` `onStateChangeError​(Map<UUID,​Exception> errs, StateChangeRequest req)`
`void` `onStateChangeExchangeDone​(StateChangeRequest req)`
`boolean` `onStateChangeMessage​(AffinityTopologyVersion topVer, ChangeGlobalStateMessage msg, DiscoCache discoCache)`
`void` `onStateFinishMessage​(ChangeGlobalStateFinishMessage msg)`
`DiscoveryDataClusterState` `pendingState​(ChangeGlobalStateMessage stateMsg)`
`boolean` `publicApiActiveState​(boolean waitForTransition)` Deprecated. Use `publicApiState(boolean)` instead.
`IgniteFuture<Boolean>` `publicApiActiveStateAsync​(boolean waitForTransition)` Deprecated. Use `publicApiStateAsync(boolean)` instead.
`ClusterState` `publicApiState​(boolean waitForTransition)`
`IgniteFuture<ClusterState>` `publicApiStateAsync​(boolean waitForTransition)`

### Methods inherited from interface org.apache.ignite.internal.GridComponent

`collectGridNodeData, collectJoiningNodeData, discoveryDataType, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStop, onReconnected, printMemoryStats, start, stop, validateNode, validateNode`

### Method Detail

#### publicApiActiveState

    @Deprecated
    boolean publicApiActiveState​(boolean waitForTransition)

Deprecated.
Use `publicApiState(boolean)` instead.

Returns:
  Cluster state to be used on public API.

#### publicApiActiveStateAsync

    @Deprecated
    IgniteFuture<Boolean> publicApiActiveStateAsync​(boolean waitForTransition)

Deprecated.
Use `publicApiStateAsync(boolean)` instead.

Returns:
  Cluster state to be used on public API.

#### publicApiState

    ClusterState publicApiState​(boolean waitForTransition)

Parameters:
  `waitForTransition` - Wait end of transition or not.
Returns:
  Current cluster state to be used on public API.

#### publicApiStateAsync

    IgniteFuture<ClusterState> publicApiStateAsync​(boolean waitForTransition)

Parameters:
  `waitForTransition` - Wait end of transition or not.
Returns:
  Current cluster state to be used on public API.

#### lastStateChangeTime

    long lastStateChangeTime()

Returns:
  Time of last cluster state change to be used on public API.

#### onLocalJoin

    @Nullable
    @Nullable IgniteInternalFuture<Boolean> onLocalJoin​(DiscoCache discoCache)

Parameters:
  `discoCache` - Discovery data cache.
Returns:
  If transition is in progress returns future which is completed when transition finishes.

#### onNodeLeft

    @Nullable
    @Nullable ChangeGlobalStateFinishMessage onNodeLeft​(ClusterNode node)

Parameters:
  `node` - Failed node.
Returns:
  Message if cluster state changed.

#### onStateFinishMessage

    void onStateFinishMessage​(ChangeGlobalStateFinishMessage msg)

Parameters:
  `msg` - Message.

#### onStateChangeMessage

    boolean onStateChangeMessage​(AffinityTopologyVersion topVer,
                                 ChangeGlobalStateMessage msg,
                                 DiscoCache discoCache)

Parameters:
  `topVer` - Current topology version.
  `msg` - Message.
  `discoCache` - Current nodes.
Returns:
  `True` if need start state change process.

#### clusterState

    DiscoveryDataClusterState clusterState()

Returns:
  Current cluster state, should be called only from discovery thread.

#### pendingState

    DiscoveryDataClusterState pendingState​(ChangeGlobalStateMessage stateMsg)

Returns:
  Pending cluster state which will be used when state transition is finished.

#### cacheProcessorStarted

    void cacheProcessorStarted()

#### changeGlobalState

    IgniteInternalFuture<?> changeGlobalState​(ClusterState state,
                                              boolean forceDeactivation,
                                              Collection<? extends BaselineNode> baselineNodes,
                                              boolean forceChangeBaselineTopology)

Parameters:
  `state` - New cluster state.
  `forceDeactivation` - If `true`, cluster deactivation will be forced.
  `baselineNodes` - New baseline nodes.
  `forceChangeBaselineTopology` - Force change baseline topology.
Returns:
  State change future.
See Also:
  `ClusterState.INACTIVE`

#### onStateChangeError

    void onStateChangeError​(Map<UUID,​Exception> errs,
                            StateChangeRequest req)

Parameters:
  `errs` - Errors.
  `req` - State change request.

#### onStateChangeExchangeDone

    void onStateChangeExchangeDone​(StateChangeRequest req)

Parameters:
  `req` - State change request.

#### onBaselineTopologyChanged

    void onBaselineTopologyChanged​(BaselineTopology blt,
                                   BaselineTopologyHistoryItem prevBltHistItem)
                            throws IgniteCheckedException

Parameters:
  `blt` - New baseline topology.
  `prevBltHistItem` - Previous baseline history item.
Throws:
  `IgniteCheckedException`

#### onExchangeFinishedOnCoordinator

    void onExchangeFinishedOnCoordinator​(IgniteInternalFuture exchangeFuture,
                                         boolean hasMovingPartitions)

Parameters:
  `exchangeFuture` - Exchange future.
  `hasMovingPartitions` - `True` if there are moving partitions.

#### evictionsAllowed

    boolean evictionsAllowed()

Returns:
  `True` if partition evictions are allowed in current state.