Package org.apache.ignite.internal
Interface GridComponent
-
- All Known Subinterfaces:
CacheObjectTransformerProcessor,DiscoveryNodeValidationProcessor,GridManager,GridProcessor,GridSecurityProcessor,GridSegmentationProcessor,IgniteCacheObjectProcessor,IgniteRestProcessor,IGridClusterStateProcessor,IndexingQueryEngine,PlatformProcessor,QueryEngine
- All Known Implementing Classes:
CacheObjectBinaryProcessorImpl,ClientListenerProcessor,ClusterProcessor,CompressionProcessor,DataStreamProcessor,DataStructuresProcessor,DiagnosticProcessor,DistributedConfigurationProcessor,DistributedMetaStorageImpl,DurableBackgroundTasksProcessor,FailureProcessor,GridAffinityProcessor,GridCacheProcessor,GridCheckpointManager,GridClosureProcessor,GridClusterStateProcessor,GridCollisionManager,GridContinuousProcessor,GridDeploymentManager,GridDiscoveryManager,GridEncryptionManager,GridEventStorageManager,GridFailoverManager,GridIndexingManager,GridInternalSubscriptionProcessor,GridIoManager,GridJobMetricsProcessor,GridJobProcessor,GridLoadBalancerManager,GridManagerAdapter,GridMarshallerMappingProcessor,GridMetricManager,GridOffHeapProcessor,GridOsSegmentationProcessor,GridPluginComponent,GridPortProcessor,GridProcessorAdapter,GridQueryProcessor,GridResourceProcessor,GridRestProcessor,GridSystemViewManager,GridTaskProcessor,GridTaskSessionProcessor,GridTimeoutProcessor,GridTracingManager,IgniteAuthenticationProcessor,IgniteNoopScheduleProcessor,IgnitePluginProcessor,IgniteScheduleProcessorAdapter,IgniteSecurityAdapter,IgniteSecurityProcessor,IgniteServiceProcessor,IndexProcessor,MaintenanceProcessor,NoOpIgniteSecurityProcessor,NoOpQueryEngine,OsDiscoveryNodeValidationProcessor,PdsConsistentIdProcessor,PerformanceStatisticsProcessor,PlatformNoopProcessor,PlatformPluginProcessor,PlatformProcessorImpl,PoolProcessor
public interface GridComponentInterface for all main internal Ignite components (managers and processors).
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classGridComponent.DiscoveryDataExchangeTypeUnique component type for discovery data exchange.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcollectGridNodeData(DiscoveryDataBag dataBag)Collects discovery data on nodes already in grid on receivingTcpDiscoveryNodeAddedMessage.voidcollectJoiningNodeData(DiscoveryDataBag dataBag)Collects discovery data on joining node before sendingTcpDiscoveryJoinRequestMessagerequest.@Nullable GridComponent.DiscoveryDataExchangeTypediscoveryDataType()Gets unique component type to distinguish components providing discovery data.voidonDisconnected(IgniteFuture<?> reconnectFut)Client disconnected callback.voidonGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)Receives discovery data object from remote nodes (called on new node during discovery process).voidonJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)Method is called on nodes that are already in grid (not on joining node).voidonKernalStart(boolean active)Callback that notifies that kernal has successfully started, including all managers and processors.voidonKernalStop(boolean cancel)Callback to notify that kernal is about to stop.@Nullable IgniteInternalFuture<?>onReconnected(boolean clusterRestarted)Client reconnected callback.voidprintMemoryStats()Prints memory statistics (sizes of internal structures, etc.).voidstart()Starts grid component.voidstop(boolean cancel)Stops grid component.@Nullable IgniteNodeValidationResultvalidateNode(ClusterNode node)Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.@Nullable IgniteNodeValidationResultvalidateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.
-
-
-
Method Detail
-
start
void start() throws IgniteCheckedExceptionStarts grid component.- Throws:
IgniteCheckedException- Throws in case of any errors.
-
stop
void stop(boolean cancel) throws IgniteCheckedException
Stops grid component.- Parameters:
cancel- Iftrue, then all ongoing tasks or jobs for relevant components need to be cancelled.- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
onKernalStart
void onKernalStart(boolean active) throws IgniteCheckedExceptionCallback that notifies that kernal has successfully started, including all managers and processors.- Parameters:
active- Cluster active flag (note: should be used carefully since state can change concurrently).- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
onKernalStop
void onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.- Parameters:
cancel- Flag indicating whether jobs should be canceled.
-
collectJoiningNodeData
void collectJoiningNodeData(DiscoveryDataBag dataBag)
Collects discovery data on joining node before sendingTcpDiscoveryJoinRequestMessagerequest.- Parameters:
dataBag- container object to store discovery data in.
-
collectGridNodeData
void collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receivingTcpDiscoveryNodeAddedMessage.- Parameters:
dataBag- container object to store discovery data in.
-
onGridDataReceived
void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called on new node during discovery process).- Parameters:
data-DiscoveryDataBag.GridDiscoveryDatainterface to retrieve discovery data collected on remote nodes (data common for all nodes in grid and specific for each node).
-
onJoiningNodeDataReceived
void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node). It receives discovery data from joining node.- Parameters:
data-DiscoveryDataBag.JoiningNodeDiscoveryDatainterface to retrieve discovery data of joining node.
-
printMemoryStats
void printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.). NOTE: this method is for testing and profiling purposes only.
-
validateNode
@Nullable @Nullable IgniteNodeValidationResult validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.- Parameters:
node- Joining node.- Returns:
- Validation result or
nullin case of success.
-
validateNode
@Nullable @Nullable IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
Validates that new node can join grid topology, this method is called on coordinator node before new node joins topology.- Parameters:
node- Joining node.discoData- Joining node discovery data.- Returns:
- Validation result or
nullin case of success.
-
discoveryDataType
@Nullable @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
Gets unique component type to distinguish components providing discovery data. Must return non-null value if component implements any of methodscollectJoiningNodeData(DiscoveryDataBag)orcollectGridNodeData(DiscoveryDataBag).- Returns:
- Unique component type for discovery data exchange.
-
onDisconnected
void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
Client disconnected callback.- Parameters:
reconnectFut- Reconnect future.- Throws:
IgniteCheckedException- If failed.
-
onReconnected
@Nullable @Nullable IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException
Client reconnected callback.- Parameters:
clusterRestarted- Cluster restarted flag.- Returns:
- Future to wait before completing reconnect future.
- Throws:
IgniteCheckedException- If failed.
-
-