Class GridIoMessage
- java.lang.Object
-
- org.apache.ignite.internal.managers.communication.GridIoMessage
-
- All Implemented Interfaces:
Serializable,SpanTransport,Message
- Direct Known Subclasses:
GridIoSecurityAwareMessage
public class GridIoMessage extends Object implements Message, SpanTransport
Wrapper for all grid messages.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static IntegerSTRIPE_DISABLED_PART-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description GridIoMessage()No-op constructor to supportExternalizableinterface.GridIoMessage(byte plc, Object topic, int topicOrd, Message msg, boolean ordered, long timeout, boolean skipOnTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description shortdirectType()Gets message type.booleanequals(Object obj)@Nullable StringexecutorName()bytefieldsCount()Gets fields count.inthashCode()Messagemessage()voidonAckReceived()Method called when ack message received.intpartition()Get single partition for this message (if applicable).booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.booleanskipOnTimeout()byte[]span()voidspan(byte[] span)Stored span for transferring.longtimeout()StringtoString()booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Field Detail
-
STRIPE_DISABLED_PART
public static final Integer STRIPE_DISABLED_PART
-
-
Constructor Detail
-
GridIoMessage
public GridIoMessage()
No-op constructor to supportExternalizableinterface. This constructor is not meant to be used for other purposes.
-
GridIoMessage
public GridIoMessage(byte plc, Object topic, int topicOrd, Message msg, boolean ordered, long timeout, boolean skipOnTimeout)- Parameters:
plc- Policy.topic- Communication topic.topicOrd- Topic ordinal value.msg- Message.ordered- Message ordered flag.timeout- Timeout.skipOnTimeout- Whether message can be skipped on timeout.
-
-
Method Detail
-
message
public Message message()
- Returns:
- Message.
-
timeout
public long timeout()
- Returns:
- Message timeout.
-
skipOnTimeout
public boolean skipOnTimeout()
- Returns:
- Whether message can be skipped on timeout.
-
onAckReceived
public void onAckReceived()
Method called when ack message received.- Specified by:
onAckReceivedin interfaceMessage
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Returns:
- Fields count.
-
span
public void span(byte[] span)
Stored span for transferring.- Specified by:
spanin interfaceSpanTransport- Parameters:
span- Binary view of span.
-
span
public byte[] span()
- Specified by:
spanin interfaceSpanTransport- Returns:
- Binary view of span.
-
partition
public int partition()
Get single partition for this message (if applicable).- Returns:
- Partition ID.
-
executorName
@Nullable public @Nullable String executorName()
- Returns:
- Executor name (if available).
-
-