public class GridClusterStateProcessor extends GridProcessorAdapter implements IGridClusterStateProcessor, MetastorageLifecycleListener
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
GridClusterStateProcessor(GridKernalContext ctx) |
assertParameter, onDisconnected, onJoiningNodeDataReceived, onKernalStart, onReconnected, printMemoryStats, validateNodeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonDisconnected, onJoiningNodeDataReceived, onKernalStart, onReconnected, printMemoryStats, validateNodepublic GridClusterStateProcessor(GridKernalContext ctx)
ctx - Kernal context.public boolean compatibilityMode()
True if IGridClusterStateProcessor has detected that cluster is working
in compatibility mode (nodes of different versions are joined to the cluster).public boolean publicApiActiveState(boolean waitForTransition)
publicApiActiveState in interface IGridClusterStateProcessorpublic void onReadyForRead(ReadOnlyMetastorage metastorage) throws IgniteCheckedException
onReadyForRead in interface MetastorageLifecycleListenermetastorage - Read-only meta storage.IgniteCheckedExceptionpublic void onReadyForReadWrite(ReadWriteMetastorage metastorage) throws IgniteCheckedException
onReadyForReadWrite in interface MetastorageLifecycleListenermetastorage - Fully functional meta storage.IgniteCheckedExceptionpublic void resetBranchingHistory(long newBranchingHash)
throws IgniteCheckedException
IgniteCheckedException - If write to metastore has failed.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.@Nullable public IgniteInternalFuture<Boolean> onLocalJoin(DiscoCache discoCache)
onLocalJoin in interface IGridClusterStateProcessordiscoCache - Discovery data cache.@Nullable public ChangeGlobalStateFinishMessage onNodeLeft(ClusterNode node)
onNodeLeft in interface IGridClusterStateProcessornode - Failed node.public void onStateFinishMessage(ChangeGlobalStateFinishMessage msg)
onStateFinishMessage in interface IGridClusterStateProcessormsg - Message.protected void afterStateChangeFinished(IgniteUuid msgId, boolean success)
public boolean onStateChangeMessage(AffinityTopologyVersion topVer, ChangeGlobalStateMessage msg, DiscoCache discoCache)
onStateChangeMessage in interface IGridClusterStateProcessortopVer - Current topology version.msg - Message.discoCache - Current nodes.True if need start state change process.protected boolean isApplicable(ChangeGlobalStateMessage msg, DiscoveryDataClusterState state)
msg - State change message.state - Current cluster state.True if state change from message can be applied to the current state.protected static boolean isEquivalent(ChangeGlobalStateMessage msg, DiscoveryDataClusterState state)
msg - State change message.state - Current cluster state.True if states are equivalent.public DiscoveryDataClusterState clusterState()
clusterState in interface IGridClusterStateProcessorpublic DiscoveryDataClusterState pendingState(ChangeGlobalStateMessage stateMsg)
pendingState in interface IGridClusterStateProcessorprotected IgniteCheckedException concurrentStateChangeError(boolean activate)
activate - New state.public void cacheProcessorStarted()
cacheProcessorStarted in interface IGridClusterStateProcessorpublic void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.@Nullable public GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.GridDiscoveryData interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).public IgniteInternalFuture<?> changeGlobalState(boolean activate, Collection<? extends BaselineNode> baselineNodes, boolean forceChangeBaselineTopology)
changeGlobalState in interface IGridClusterStateProcessoractivate - New cluster state.@Nullable public IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapterprotected IgniteInternalFuture<?> wrapStateChangeFuture(IgniteInternalFuture fut, ChangeGlobalStateMessage msg)
fut - Original state change future.msg - State change message.public void onStateChangeError(Map<UUID,Exception> errs, StateChangeRequest req)
onStateChangeError in interface IGridClusterStateProcessorerrs - Errors.req - State change request.public void onStateChangeExchangeDone(StateChangeRequest req)
onStateChangeExchangeDone in interface IGridClusterStateProcessorreq - State change request.public void onBaselineTopologyChanged(BaselineTopology blt, BaselineTopologyHistoryItem prevBltHistItem) throws IgniteCheckedException
onBaselineTopologyChanged in interface IGridClusterStateProcessorblt - New baseline topology.prevBltHistItem - Previous baseline history item.IgniteCheckedExceptionpublic void onExchangeFinishedOnCoordinator(IgniteInternalFuture exchangeFuture, boolean hasMovingPartitions)
onExchangeFinishedOnCoordinator in interface IGridClusterStateProcessorexchangeFuture - Exchange future.hasMovingPartitions - True if there are moving partitions.public boolean evictionsAllowed()
evictionsAllowed in interface IGridClusterStateProcessorTrue if partition evictions are allowed in current state.public String toString()
toString in class GridProcessorAdapter
Follow @ApacheIgnite
Ignite Fabric : ver. 2.4.0 Release Date : March 5 2018