@IgniteSpiMultipleInstancesSupport(value=true) @DiscoverySpiHistorySupport(value=true) @DiscoverySpiOrderSupport(value=true) public class IsolatedDiscoverySpi extends IgniteSpiAdapter implements org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpi
ignite, igniteInstanceName, log| Constructor and Description |
|---|
IsolatedDiscoverySpi() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allNodesSupport(org.apache.ignite.internal.IgniteFeatures feature) |
boolean |
allNodesSupport(org.apache.ignite.internal.IgniteFeatures feature,
IgnitePredicate<ClusterNode> nodesPred) |
void |
clientReconnect() |
boolean |
clientReconnectSupported() |
Serializable |
consistentId()
Gets consistent ID.
|
void |
disconnect()
Tells discovery SPI to disconnect from topology.
|
void |
failNode(UUID nodeId,
@Nullable String warning)
Initiates failure of provided node.
|
long |
getGridStartTime()
Gets start time of the very first node in the grid.
|
ClusterNode |
getLocalNode()
Gets local node.
|
ClusterNode |
getNode(UUID nodeId)
Gets node by ID.
|
Collection<ClusterNode> |
getRemoteNodes()
Gets collection of remote nodes in grid or empty collection if no remote nodes found.
|
protected void |
injectResources(Ignite ignite)
Inject ignite instance.
|
boolean |
isClientMode()
Whether or not discovery is started in client mode.
|
boolean |
knownNode(UUID nodeId) |
protected void |
onContextInitialized0(IgniteSpiContext spiCtx)
Method to be called in the end of onContextInitialized method.
|
boolean |
pingNode(UUID nodeId)
Pings the remote node to see if it's alive.
|
void |
resolveCommunicationFailure(ClusterNode node,
Exception err) |
void |
sendCustomEvent(DiscoverySpiCustomMessage msg)
Sends custom message across the ring.
|
void |
setAuthenticator(DiscoverySpiNodeAuthenticator auth)
Sets discovery SPI node authenticator.
|
void |
setDataExchange(DiscoverySpiDataExchange exchange)
Sets a handler for initial data exchange between Ignite nodes.
|
void |
setInternalListener(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpiInternalListener lsnr)
For TESTING only.
|
void |
setListener(@Nullable DiscoverySpiListener lsnr)
Sets a listener for discovery events.
|
void |
setMetricsProvider(DiscoveryMetricsProvider metricsProvider)
Sets discovery metrics provider.
|
void |
setNodeAttributes(Map<String,Object> attrs,
IgniteProductVersion ver)
Sets node attributes and node version which will be distributed in grid during
join process.
|
void |
simulateNodeFailure()
For TESTING only.
|
void |
spiStart(@Nullable String igniteInstanceName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
boolean |
supportsCommunicationFailureResolve() |
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitializedpublic Serializable consistentId() throws IgniteSpiException
consistentId in interface DiscoverySpinull if not applicable.IgniteSpiException - If failed.public Collection<ClusterNode> getRemoteNodes()
getRemoteNodes in interface DiscoverySpipublic ClusterNode getLocalNode()
getLocalNode in interface DiscoverySpigetLocalNode in class IgniteSpiAdapterpublic ClusterNode getNode(UUID nodeId)
getNode in interface DiscoverySpinodeId - Node ID.null if node is not found.public boolean pingNode(UUID nodeId)
pingNode in interface DiscoverySpinodeId - Node Id.true if node alive, false otherwise.public void setNodeAttributes(Map<String,Object> attrs, IgniteProductVersion ver)
setNodeAttributes in interface DiscoverySpiattrs - Map of node attributes.ver - Product version.public void setListener(@Nullable
@Nullable DiscoverySpiListener lsnr)
DiscoveryEvent for a set of all possible
discovery events.
TODO: This method should be removed from public API in Apache Ignite 3.0
setListener in interface DiscoverySpilsnr - Listener to discovery events or null to unset the listener.public void setDataExchange(DiscoverySpiDataExchange exchange)
setDataExchange in interface DiscoverySpiexchange - Discovery data exchange handler.public void setMetricsProvider(DiscoveryMetricsProvider metricsProvider)
DiscoveryMetricsProvider.metrics() method to exchange
dynamic metrics between nodes.setMetricsProvider in interface DiscoverySpimetricsProvider - Provider of metrics data.public void disconnect()
throws IgniteSpiException
IgniteSpi.spiStop() with accounting that it is not a full stop,
but disconnect due to segmentation.disconnect in interface DiscoverySpiIgniteSpiException - If any error occurs.protected void injectResources(Ignite ignite)
injectResources in class IgniteSpiAdapterignite - Ignite instance.public void setAuthenticator(DiscoverySpiNodeAuthenticator auth)
setAuthenticator in interface DiscoverySpiauth - Discovery SPI authenticator.public long getGridStartTime()
getGridStartTime in interface DiscoverySpi0 if SPI implementation
does not support this method.public void sendCustomEvent(DiscoverySpiCustomMessage msg) throws IgniteException
sendCustomEvent in interface DiscoverySpimsg - Custom message.IgniteException - if failed to sent the event message.public void failNode(UUID nodeId, @Nullable @Nullable String warning)
failNode in interface DiscoverySpinodeId - Node ID.warning - Optional warning to be shown on all cluster nodes.public boolean isClientMode()
throws IllegalStateException
isClientMode in interface DiscoverySpitrue if node is in client mode.IllegalStateException - If discovery SPI has not started.public void spiStart(@Nullable
@Nullable String igniteInstanceName)
throws IgniteSpiException
spiStart in interface IgniteSpiigniteInstanceName - Name of Ignite instance this SPI is being started for
(null for default Ignite instance).IgniteSpiException - Throws in case of any error during SPI start.public void spiStop()
throws IgniteSpiException
Note that this method can be called at any point including during recovery of failed start. It should make no assumptions on what state SPI will be in when this method is called.
spiStop in interface IgniteSpiIgniteSpiException - Thrown in case of any error during SPI stop.protected void onContextInitialized0(IgniteSpiContext spiCtx) throws IgniteSpiException
onContextInitialized0 in class IgniteSpiAdapterspiCtx - SPI context.IgniteSpiException - In case of errors.public boolean knownNode(UUID nodeId)
knownNode in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpinodeId - Node ID.True if node joining or already joined topology.public boolean clientReconnectSupported()
clientReconnectSupported in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpiTrue if SPI supports client reconnect.public void clientReconnect()
clientReconnect in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpipublic boolean allNodesSupport(org.apache.ignite.internal.IgniteFeatures feature)
allNodesSupport in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpifeature - Feature to check.true if all nodes support the given feature.public boolean allNodesSupport(org.apache.ignite.internal.IgniteFeatures feature,
IgnitePredicate<ClusterNode> nodesPred)
allNodesSupport in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpifeature - Feature to check.nodesPred - Predicate to filter cluster nodes.true if all nodes passed the filter support the given feature.public void simulateNodeFailure()
simulateNodeFailure in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpipublic void setInternalListener(org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpiInternalListener lsnr)
setInternalListener in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpilsnr - Listener.public boolean supportsCommunicationFailureResolve()
supportsCommunicationFailureResolve in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpiTrue if supports communication error resolve.public void resolveCommunicationFailure(ClusterNode node, Exception err)
resolveCommunicationFailure in interface org.apache.ignite.internal.managers.discovery.IgniteDiscoverySpinode - Problem node.err - Connection error.
GridGain In-Memory Computing Platform : ver. 8.9.26 Release Date : October 16 2025