Class StandaloneNoopCommunicationSpi

    • Constructor Detail

      • StandaloneNoopCommunicationSpi

        public StandaloneNoopCommunicationSpi()
    • Method Detail

      • spiStart

        public void spiStart​(@Nullable
                             @Nullable String igniteInstanceName)
                      throws IgniteSpiException
        This method is called to start SPI. After this method returns successfully kernel assumes that SPI is fully operational.
        Specified by:
        spiStart in interface IgniteSpi
        Parameters:
        igniteInstanceName - Name of Ignite instance this SPI is being started for (null for default Ignite instance).
        Throws:
        IgniteSpiException - Throws in case of any error during SPI start.
      • spiStop

        public void spiStop()
                     throws IgniteSpiException
        This 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:
        spiStop in interface IgniteSpi
        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:
        sendMessage in interface CommunicationSpi
        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:
        getSentMessagesCount in interface CommunicationSpi
        Returns:
        Sent messages count.
      • getSentBytesCount

        public long getSentBytesCount()
        Gets sent bytes count.
        Specified by:
        getSentBytesCount in interface CommunicationSpi
        Returns:
        Sent bytes count.
      • getReceivedMessagesCount

        public int getReceivedMessagesCount()
        Gets received messages count.
        Specified by:
        getReceivedMessagesCount in interface CommunicationSpi
        Returns:
        Received messages count.
      • getReceivedBytesCount

        public long getReceivedBytesCount()
        Gets received bytes count.
        Specified by:
        getReceivedBytesCount in interface CommunicationSpi
        Returns:
        Received bytes count.
      • getOutboundMessagesQueueSize

        public int getOutboundMessagesQueueSize()
        Gets outbound messages queue size.
        Specified by:
        getOutboundMessagesQueueSize in interface CommunicationSpi
        Returns:
        Outbound messages queue size.
      • resetMetrics

        public void resetMetrics()
        Resets metrics for this SPI instance.
        Specified by:
        resetMetrics in interface CommunicationSpi
      • setListener

        public void setListener​(@Nullable
                                @Nullable CommunicationListener lsnr)
        Set communication listener.
        Specified by:
        setListener in interface CommunicationSpi
        Parameters:
        lsnr - Listener to set or null to unset the listener.