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 Description static int
HANDSHAKE2_MESSAGE_SIZE
Message size in bytes includingHandshakeMessage
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 Description HandshakeMessage2()
HandshakeMessage2(UUID nodeId, long connectCnt, long rcvCnt, int connIdx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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
-
-
-
-
Field Detail
-
HANDSHAKE2_MESSAGE_SIZE
public static final int HANDSHAKE2_MESSAGE_SIZE
Message size in bytes includingHandshakeMessage
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 interfaceMessage
- Overrides:
directType
in classHandshakeMessage
- Returns:
- Message type.
-
connectionIndex
public int connectionIndex()
- Overrides:
connectionIndex
in classHandshakeMessage
- Returns:
- Connection index.
-
getMessageSize
public int getMessageSize()
- Overrides:
getMessageSize
in classHandshakeMessage
- Returns:
- Message size in bytes.
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.- Specified by:
writeTo
in interfaceMessage
- Overrides:
writeTo
in classHandshakeMessage
- 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 interfaceMessage
- Overrides:
readFrom
in classHandshakeMessage
- Parameters:
buf
- Byte buffer.reader
- Reader.- Returns:
- Whether message was fully read.
-
toString
public String toString()
- Overrides:
toString
in classHandshakeMessage
-
-