Class StandaloneNoopCommunicationSpi
- java.lang.Object
-
- org.apache.ignite.spi.IgniteSpiAdapter
-
- org.apache.ignite.internal.processors.cache.persistence.wal.reader.StandaloneNoopCommunicationSpi
-
- All Implemented Interfaces:
CommunicationSpi,IgniteSpi
@IgniteSpiNoop public class StandaloneNoopCommunicationSpi extends IgniteSpiAdapter implements CommunicationSpi
No-operation SPI for standalone WAL reader
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.spi.IgniteSpiAdapter
ignite, igniteInstanceName, log
-
-
Constructor Summary
Constructors Constructor Description StandaloneNoopCommunicationSpi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOutboundMessagesQueueSize()Gets outbound messages queue size.longgetReceivedBytesCount()Gets received bytes count.intgetReceivedMessagesCount()Gets received messages count.longgetSentBytesCount()Gets sent bytes count.intgetSentMessagesCount()Gets sent messages count.voidresetMetrics()Resets metrics for this SPI instance.voidsendMessage(ClusterNode destNode, Serializable msg)Sends given message to destination node.voidsetListener(@Nullable CommunicationListener lsnr)Set communication listener.voidspiStart(@Nullable String igniteInstanceName)This method is called to start SPI.voidspiStop()This method is called to stop SPI.-
Methods inherited from class org.apache.ignite.spi.IgniteSpiAdapter
addTimeoutObject, assertParameter, checkConfigurationConsistency0, clientFailureDetectionTimeout, configInfo, createSpiAttributeName, failureDetectionTimeout, failureDetectionTimeoutEnabled, failureDetectionTimeoutEnabled, getConsistentAttributeNames, getExceptionRegistry, getLocalNode, getName, getNodeAttributes, getSpiContext, ignite, initFailureDetectionTimeout, injectables, injectResources, isNodeStopping, onBeforeStart, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextDestroyed0, onContextInitialized, onContextInitialized0, registerMBean, removeTimeoutObject, setName, started, startInfo, startStopwatch, stopInfo, unregisterMBean
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ignite.spi.IgniteSpi
getName, getNodeAttributes, onClientDisconnected, onClientReconnected, onContextDestroyed, onContextInitialized
-
-
-
-
Method Detail
-
spiStart
public void spiStart(@Nullable @Nullable String igniteInstanceName) throws IgniteSpiExceptionThis method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.- Specified by:
spiStartin interfaceIgniteSpi- Parameters:
igniteInstanceName- Name of Ignite instance this SPI is being started for (nullfor default Ignite instance).- Throws:
IgniteSpiException- Throws in case of any error during SPI start.
-
spiStop
public void spiStop() throws IgniteSpiExceptionThis method is called to stop SPI. After this method returns kernel assumes that this SPI is finished and all resources acquired by it are released.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.
- Specified by:
spiStopin interfaceIgniteSpi- Throws:
IgniteSpiException- Thrown in case of any error during SPI stop.
-
sendMessage
public void sendMessage(ClusterNode destNode, Serializable msg) throws IgniteSpiException
Sends given message to destination node. Note that characteristics of the exchange such as durability, guaranteed delivery or error notification is dependant on SPI implementation.- Specified by:
sendMessagein interfaceCommunicationSpi- Parameters:
destNode- Destination node.msg- Message to send.- Throws:
IgniteSpiException- Thrown in case of any error during sending the message. Note that this is not guaranteed that failed communication will result in thrown exception as this is dependant on SPI implementation.
-
getSentMessagesCount
public int getSentMessagesCount()
Gets sent messages count.- Specified by:
getSentMessagesCountin interfaceCommunicationSpi- Returns:
- Sent messages count.
-
getSentBytesCount
public long getSentBytesCount()
Gets sent bytes count.- Specified by:
getSentBytesCountin interfaceCommunicationSpi- Returns:
- Sent bytes count.
-
getReceivedMessagesCount
public int getReceivedMessagesCount()
Gets received messages count.- Specified by:
getReceivedMessagesCountin interfaceCommunicationSpi- Returns:
- Received messages count.
-
getReceivedBytesCount
public long getReceivedBytesCount()
Gets received bytes count.- Specified by:
getReceivedBytesCountin interfaceCommunicationSpi- Returns:
- Received bytes count.
-
getOutboundMessagesQueueSize
public int getOutboundMessagesQueueSize()
Gets outbound messages queue size.- Specified by:
getOutboundMessagesQueueSizein interfaceCommunicationSpi- Returns:
- Outbound messages queue size.
-
resetMetrics
public void resetMetrics()
Resets metrics for this SPI instance.- Specified by:
resetMetricsin interfaceCommunicationSpi
-
setListener
public void setListener(@Nullable @Nullable CommunicationListener lsnr)Set communication listener.- Specified by:
setListenerin interfaceCommunicationSpi- Parameters:
lsnr- Listener to set ornullto unset the listener.
-
-