@IgniteSpiNoop public class StandaloneNoopDiscoverySpi extends IgniteSpiAdapter implements DiscoverySpi
ignite, igniteInstanceName, log| Constructor and Description |
|---|
StandaloneNoopDiscoverySpi() |
| Modifier and Type | Method and Description |
|---|---|
@Nullable 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.
|
@Nullable 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.
|
boolean |
isClientMode()
Whether or not discovery is started in client mode.
|
boolean |
pingNode(UUID nodeId)
Pings the remote node to see if it's alive.
|
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 |
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 |
spiStart(@Nullable String igniteInstanceName)
This method is called to start SPI.
|
void |
spiStop()
This method is called to stop SPI.
|
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBeanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized@Nullable public @Nullable 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 IgniteSpiAdapter@Nullable public @Nullable 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.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 - 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.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.1 Release Date : May 21 2020