GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid.spi.communication
Interface GridCommunicationSpi

All Superinterfaces:
GridSpi, GridSpiJsonConfigurable
All Known Implementing Classes:
GridTcpCommunicationSpi

public interface GridCommunicationSpi
extends GridSpi, GridSpiJsonConfigurable

Communication SPI is responsible for data exchange between nodes.

Communication SPI is one of the most important SPI in GridGain. It is used heavily throughout the system and provides means for all data exchanges between nodes, such as internal implementation details and user driven messages.

Functionality to this SPI is exposed directly in Grid interface:

GridGain comes with built-in communication SPI implementations:

NOTE: this SPI (i.e. methods in this interface) should never be used directly. SPIs provide internal view on the subsystem and is used internally by GridGain kernal. In rare use cases when access to a specific implementation of this SPI is required - an instance of this SPI can be obtained via Grid.configuration() method to check its configuration properties or call other non-SPI methods. Note again that calling methods from this interface on the obtained instance can lead to undefined behavior and explicitly not supported.

Wiki & Forum:


Wiki
Forum

 

Method Summary
 void sendMessage(Collection<? extends GridNode> destNodes, Serializable msg)
          Sends given message to destination nodes.
 void sendMessage(GridNode destNode, Serializable msg)
          Sends given message to destination node.
 void setListener(GridMessageListener lsnr)
          Set communication listener.
 
Methods inherited from interface org.gridgain.grid.spi.GridSpi
getName, getNodeAttributes, onContextDestroyed, onContextInitialized, spiStart, spiStop
 
Methods inherited from interface org.gridgain.grid.spi.GridSpiJsonConfigurable
setJson
 

Method Detail

sendMessage

void sendMessage(GridNode destNode,
                 Serializable msg)
                 throws GridSpiException
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.

Throws:
GridSpiException - 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.
Parameters:
destNode - Destination node.
msg - Message to send.

sendMessage

void sendMessage(Collection<? extends GridNode> destNodes,
                 Serializable msg)
                 throws GridSpiException
Sends given message to destination nodes. Note that characteristics of the exchange such as durability, guaranteed delivery or error notification is dependant on SPI implementation.

Throws:
GridSpiException - 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.
Parameters:
destNodes - Destination nodes.
msg - Message to send.

setListener

void setListener(@Nullable
                 GridMessageListener lsnr)
Set communication listener.

Parameters:
lsnr - Listener to set or null to unset the listener.

GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube