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

## Class HandshakeMessage2

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

- All Implemented Interfaces:
    Serializable, Message

      public class HandshakeMessage2
      extends HandshakeMessage

  Updated handshake message.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `HANDSHAKE2_MESSAGE_SIZE` Message size in bytes including `HandshakeMessage` fields.

    - ### Fields inherited from class org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage

      `MESSAGE_FULL_SIZE`

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

      `DIRECT_TYPE_SIZE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HandshakeMessage2()`
    `HandshakeMessage2(UUID nodeId, long connectCnt, long rcvCnt, int connIdx)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `connectionIndex()`
    `short` | `directType()` Gets message type.
    `int` | `getMessageSize()`
    `boolean` | `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
    `String` | `toString()`
    `boolean` | `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

    - ### Methods inherited from class org.apache.ignite.spi.communication.tcp.messages.HandshakeMessage

      `connectCount, fieldsCount, nodeId, onAckReceived, received`

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

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

- - ### Field Detail

    - #### HANDSHAKE2_MESSAGE_SIZE

          public static final int HANDSHAKE2_MESSAGE_SIZE

      Message size in bytes including `HandshakeMessage` fields.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### HandshakeMessage2

          public HandshakeMessage2()

    - #### HandshakeMessage2

          public HandshakeMessage2(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

    - #### directType

          public short directType()

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

    - #### connectionIndex

          public int connectionIndex()

      Overrides:
        `connectionIndex` in class `HandshakeMessage`
      Returns:
        Connection index.

    - #### getMessageSize

          public int getMessageSize()

      Overrides:
        `getMessageSize` in class `HandshakeMessage`
      Returns:
        Message size in bytes.

    - #### writeTo

          public boolean writeTo(ByteBuffer buf,
                                 MessageWriter writer)

      Writes this message to provided byte buffer.
      Specified by:
        `writeTo` in interface `Message`
      Overrides:
        `writeTo` in class `HandshakeMessage`
      Parameters:
        `buf` - Byte buffer.
        `writer` - Writer.
      Returns:
        Whether message was fully written.

    - #### readFrom

          public boolean readFrom(ByteBuffer buf,
                                  MessageReader reader)

      Reads this message from provided byte buffer.
      Specified by:
        `readFrom` in interface `Message`
      Overrides:
        `readFrom` in class `HandshakeMessage`
      Parameters:
        `buf` - Byte buffer.
        `reader` - Reader.
      Returns:
        Whether message was fully read.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `HandshakeMessage`

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021