public class GridPluginComponent extends Object implements GridComponent
GridComponent.DiscoveryDataExchangeType
Constructor and Description |
---|
GridPluginComponent(PluginProvider plugin) |
Modifier and Type | Method and Description |
---|---|
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. |
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node).
|
void |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
IgniteInternalFuture<?> |
onReconnected(boolean clusterRestarted)
Client reconnected callback.
|
PluginProvider |
plugin() |
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
@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.
|
@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.
|
public GridPluginComponent(PluginProvider plugin)
plugin
- Plugin provider.public PluginProvider plugin()
public void start() throws IgniteCheckedException
start
in interface GridComponent
IgniteCheckedException
- Throws in case of any errors.public void stop(boolean cancel) throws IgniteCheckedException
stop
in interface GridComponent
cancel
- If true
, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException
- Thrown in case of any errors.public void onKernalStart(boolean active) throws IgniteCheckedException
onKernalStart
in interface GridComponent
active
- Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException
- Thrown in case of any errors.public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected
in interface GridComponent
reconnectFut
- Reconnect future.public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted)
onReconnected
in interface GridComponent
clusterRestarted
- Cluster restarted flag.public void onKernalStop(boolean cancel)
onKernalStop
in interface GridComponent
cancel
- Flag indicating whether jobs should be canceled.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag)
.discoveryDataType
in interface GridComponent
public void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage
request.collectJoiningNodeData
in interface GridComponent
dataBag
- container object to store discovery data in.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage
.collectGridNodeData
in interface GridComponent
dataBag
- container object to store discovery data in.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived
in interface GridComponent
data
- DiscoveryDataBag.GridDiscoveryData
interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived
in interface GridComponent
data
- DiscoveryDataBag.JoiningNodeDiscoveryData
interface to retrieve discovery data of joining node.@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node)
validateNode
in interface GridComponent
node
- Joining node.null
in case of success.@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
validateNode
in interface GridComponent
node
- Joining node.discoData
- Joining node discovery data.null
in case of success.public void printMemoryStats()
printMemoryStats
in interface GridComponent
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020