org.apache.ignite.spi.communication.tcp.internal

## Class TcpHandshakeExecutor

- java.lang.Object
- - org.apache.ignite.spi.communication.tcp.internal.TcpHandshakeExecutor

    public class TcpHandshakeExecutor
    extends Object

Executor for synchronously establishing a connection with a node.

### Constructor Summary

Constructors
Constructor and Description
`TcpHandshakeExecutor(IgniteLogger log, ClusterStateProvider stateProvider, boolean directBuffer)`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `tcpHandshake(SocketChannel ch, UUID rmtNodeId, GridSslMeta sslMeta, HandshakeMessage msg)` Establish the first connection to the node and receive connection recovery information.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TcpHandshakeExecutor

    public TcpHandshakeExecutor(IgniteLogger log,
                                ClusterStateProvider stateProvider,
                                boolean directBuffer)

Parameters:
  `log` - Logger.
  `stateProvider` - State provider.
  `directBuffer` - `true` if direct buffer for ssl handler is required.

### Method Detail

#### tcpHandshake

    public long tcpHandshake(SocketChannel ch,
                             UUID rmtNodeId,
                             GridSslMeta sslMeta,
                             HandshakeMessage msg)
                      throws IgniteCheckedException,
                             IOException

Establish the first connection to the node and receive connection recovery information.

Parameters:
  `ch` - Socket channel which using for handshake.
  `rmtNodeId` - Expected remote node.
  `sslMeta` - Required data for ssl.
  `msg` - Handshake message which should be send during handshake.
Returns:
  Handshake response from predefined variants from `RecoveryLastReceivedMessage`.
Throws:
  `IgniteCheckedException` - If not related to IO exception happened.
  `IOException` - If reading or writing to socket is failed.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022