org.apache.ignite.plugin.extensions.communication

## Interface Message

- All Superinterfaces:
    Serializable
  All Known Implementing Classes:
    HandshakeMessage, HandshakeMessage2, HandshakeWaitMessage, JobStealingRequest, NodeIdMessage, RecoveryLastReceivedMessage

      public interface Message
      extends Serializable

  Base class for all communication messages.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DIRECT_TYPE_SIZE` Direct type size in bytes.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `short` | `directType()` Gets message type.
    `byte` | `fieldsCount()` Gets fields count.
    `void` | `onAckReceived()` Method called when ack message received.
    `boolean` | `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
    `boolean` | `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

- - ### Field Detail

    - #### DIRECT_TYPE_SIZE

          static final int DIRECT_TYPE_SIZE

      Direct type size in bytes.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### writeTo

          boolean writeTo(ByteBuffer buf,
                          MessageWriter writer)

      Writes this message to provided byte buffer.
      Parameters:
        `buf` - Byte buffer.
        `writer` - Writer.
      Returns:
        Whether message was fully written.

    - #### readFrom

          boolean readFrom(ByteBuffer buf,
                           MessageReader reader)

      Reads this message from provided byte buffer.
      Parameters:
        `buf` - Byte buffer.
        `reader` - Reader.
      Returns:
        Whether message was fully read.

    - #### directType

          short directType()

      Gets message type.
      Returns:
        Message type.

    - #### fieldsCount

          byte fieldsCount()

      Gets fields count.
      Returns:
        Fields count.

    - #### onAckReceived

          void onAckReceived()

      Method called when ack message received.

2022 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.12.0
Release Date | : January 10 2022