public class ClusterProcessor extends GridProcessorAdapter implements DistributedMetastorageLifecycleListener
GridComponent.DiscoveryDataExchangeType| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_BASELINE_NODES
Active baseline nodes count metric name.
|
static boolean |
DFLT_DIAGNOSTIC_ENABLED |
static boolean |
DFLT_UPDATE_NOTIFIER |
static String |
TOTAL_BASELINE_NODES
Total baseline nodes count metric name.
|
static String |
TOTAL_CLIENT_NODES
Total client nodes count metric name.
|
static String |
TOTAL_SERVER_NODES
Total server nodes count metric name.
|
ctx, diagnosticLog, log| Constructor and Description |
|---|
ClusterProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
IgniteFuture<?> |
clientReconnectFuture() |
String |
clusterName()
Get cluster name.
|
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. |
boolean |
diagnosticEnabled() |
IgniteLogger |
diagnosticLog() |
void |
disableUpdateNotifier()
Disables update notifier.
|
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
IgniteClusterImpl |
get() |
void |
initDiagnosticListeners() |
String |
latestVersion() |
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 |
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.
|
void |
onLocalJoin()
Node makes ID and tag available through public API on local join event.
|
void |
onReadyForRead(ReadableDistributedMetaStorage metastorage)
Called when global metastorage is ready for reading.
|
void |
onReadyForWrite(DistributedMetaStorage metastorage)
Called when global metastorage is available for writing.
|
IgniteInternalFuture<?> |
onReconnected(boolean clusterRestarted)
Client reconnected callback.
|
void |
registerMetrics()
Registers cluster metrics.
|
IgniteInternalFuture<String> |
requestDiagnosticInfo(UUID nodeId,
IgniteClosure<GridKernalContext,IgniteDiagnosticInfo> c,
String baseMsg)
Sends diagnostic message closure to remote node.
|
void |
start()
Starts grid component.
|
void |
stop(boolean cancel)
Stops grid component.
|
boolean |
updateNotifierEnabled() |
void |
updateTag(String newTag)
Method is called when user requests updating tag through public API.
|
assertParameter, onJoiningNodeDataReceived, printMemoryStats, toString, validateNode, validateNodepublic static final String TOTAL_SERVER_NODES
public static final String TOTAL_CLIENT_NODES
public static final String TOTAL_BASELINE_NODES
public static final String ACTIVE_BASELINE_NODES
public static final boolean DFLT_UPDATE_NOTIFIER
public static final boolean DFLT_DIAGNOSTIC_ENABLED
public ClusterProcessor(GridKernalContext ctx)
ctx - Kernal context.public boolean diagnosticEnabled()
public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.public void onReadyForRead(ReadableDistributedMetaStorage metastorage)
onReadyForRead in interface DistributedMetastorageLifecycleListenermetastorage - Read-only global metastorage.DistributedMetaStorageListenerpublic void onReadyForWrite(DistributedMetaStorage metastorage)
onReadyForWrite in interface DistributedMetastorageLifecycleListenermetastorage - Global metastorage instance.public void updateTag(String newTag) throws IgniteCheckedException
newTag - New tag.IgniteCheckedExceptionpublic void onLocalJoin()
public void onDisconnected(IgniteFuture<?> reconnectFut)
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted)
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapterclusterRestarted - Cluster restarted flag.public void initDiagnosticListeners()
throws IgniteCheckedException
IgniteCheckedException - If failed.public IgniteLogger diagnosticLog()
public IgniteClusterImpl get()
public IgniteFuture<?> clientReconnectFuture()
@Nullable public @Nullable 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 void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public 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.public void registerMetrics()
public void disableUpdateNotifier()
public boolean updateNotifierEnabled()
public String latestVersion()
public String clusterName()
public IgniteInternalFuture<String> requestDiagnosticInfo(UUID nodeId, IgniteClosure<GridKernalContext,IgniteDiagnosticInfo> c, String baseMsg)
nodeId - Target node ID.c - Closure to send.baseMsg - Local message to log.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021