Class CommunicationTcpUtils


  • public class CommunicationTcpUtils
    extends Object
    Common communication spi logic.
    • Constructor Detail

      • CommunicationTcpUtils

        public CommunicationTcpUtils()
    • Method Detail

      • usePairedConnections

        public static boolean usePairedConnections​(ClusterNode node,
                                                   String attributeName)
        Parameters:
        node - Node.
        Returns:
        True if can use in/out connection pair for communication.
      • writeMessageType

        public static void writeMessageType​(OutputStream os,
                                            short type)
                                     throws IOException
        Write message type to output stream.
        Parameters:
        os - Output stream.
        type - Message type.
        Throws:
        IOException - On error.
      • isRecoverableException

        public static boolean isRecoverableException​(Throwable errs)
        Parameters:
        errs - Error.
        Returns:
        True if error was caused by some connection IO error or IgniteCheckedException due to timeout.
      • failNode

        public static void failNode​(ClusterNode nodeToFail,
                                    IgniteSpiContext spiCtx,
                                    Throwable err,
                                    IgniteLogger log)
        Forcibly fails client node. Is used in a single situation if a client node is visible to discovery but is not reachable via comm protocol.
        Parameters:
        nodeToFail - Client node to forcible fail.
        spiCtx - Context to request node failing.
        err - Error to fail client with.
        log - Logger to print message about failed node to.