Package org.apache.ignite.spi.communication.tcp.messages

## Class HandshakeMessage

- java.lang.Object
- - org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage

- All Implemented Interfaces:
    `Message`

      public class HandshakeMessage
      extends Object
      implements Message

  Handshake message.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int` | `MESSAGE_FULL_SIZE` | Full message size (with message type) in bytes.

    - ### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

      `DIRECT_TYPE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HandshakeMessage()` | Default constructor.
    `HandshakeMessage​(UUID nodeId, long connectCnt, long rcvCnt, int connIdx)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `long` | `connectCount()` |
    `void` | `connectCount​(long connectCnt)` |
    `int` | `connectionIndex()` |
    `void` | `connectionIndex​(int connIdx)` |
    `short` | `directType()` | Gets message type.
    `int` | `getMessageSize()` |
    `UUID` | `nodeId()` |
    `void` | `nodeId​(UUID nodeId)` |
    `long` | `received()` |
    `void` | `received​(long rcvCnt)` |
    `String` | `toString()`

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

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

    - ### Methods inherited from interface org.apache.ignite.plugin.extensions.communication.Message

      `readFrom, writeTo`

- - ### Field Detail

    - #### MESSAGE_FULL_SIZE

          public static final int MESSAGE_FULL_SIZE

      Full message size (with message type) in bytes.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HandshakeMessage

          public HandshakeMessage()

      Default constructor.

    - #### HandshakeMessage

          public HandshakeMessage​(UUID nodeId,
                                  long connectCnt,
                                  long rcvCnt,
                                  int connIdx)

      Parameters:
        `nodeId` - Node ID.
        `connectCnt` - Connect count.
        `rcvCnt` - Number of received messages.
        `connIdx` - Connection index.

  - ### Method Detail

    - #### connectionIndex

          public int connectionIndex()

      Returns:
        Connection index.

    - #### connectCount

          public long connectCount()

      Returns:
        Connect count.

    - #### received

          public long received()

      Returns:
        Number of received messages.

    - #### nodeId

          public UUID nodeId()

      Returns:
        Node ID.

    - #### connectionIndex

          public void connectionIndex​(int connIdx)

      Parameters:
        `connIdx` - Connection index.

    - #### connectCount

          public void connectCount​(long connectCnt)

      Parameters:
        `connectCnt` - Connect count.

    - #### received

          public void received​(long rcvCnt)

      Parameters:
        `rcvCnt` - Number of received messages.

    - #### nodeId

          public void nodeId​(UUID nodeId)

      Parameters:
        `nodeId` - Node ID.

    - #### getMessageSize

          public int getMessageSize()

      Returns:
        Message size in bytes.

    - #### directType

          public short directType()

      Gets message type.
      Specified by:
        `directType` in interface `Message`
      Returns:
        Message type.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`