Class IgniteIoTestMessage

    • Constructor Detail

      • IgniteIoTestMessage

        public IgniteIoTestMessage()
      • IgniteIoTestMessage

        public IgniteIoTestMessage​(long id,
                                   boolean req,
                                   byte[] payload)
        Parameters:
        id - Message ID.
        req - Request flag.
        payload - Payload.
    • Method Detail

      • processFromNioThread

        public boolean processFromNioThread()
        Returns:
        True if message should be processed from NIO thread (otherwise message is submitted to system pool).
      • processFromNioThread

        public void processFromNioThread​(boolean procFromNioThread)
        Parameters:
        procFromNioThread - True if message should be processed from NIO thread.
      • flags

        public void flags​(byte flags)
        Parameters:
        flags - Flags.
      • flags

        public byte flags()
        Returns:
        Flags.
      • request

        public boolean request()
        Returns:
        true if this is request.
      • id

        public long id()
        Returns:
        ID.
      • requestCreateTs

        public long requestCreateTs()
        Returns:
        Request create timestamp.
      • requestSendTs

        public long requestSendTs()
        Returns:
        Request send timestamp.
      • requestReceiveTs

        public long requestReceiveTs()
        Returns:
        Request receive timestamp.
      • requestProcessTs

        public long requestProcessTs()
        Returns:
        Request process started timestamp.
      • responseSendTs

        public long responseSendTs()
        Returns:
        Response send timestamp.
      • responseReceiveTs

        public long responseReceiveTs()
        Returns:
        Response receive timestamp.
      • responseProcessTs

        public long responseProcessTs()
        Returns:
        Response process timestamp.
      • requestSendTsMillis

        public long requestSendTsMillis()
        Returns:
        Request send timestamp (millis).
      • requestReceivedTsMillis

        public long requestReceivedTsMillis()
        Returns:
        Request received timestamp (millis).
      • responseSendTsMillis

        public long responseSendTsMillis()
        Returns:
        Response send timestamp (millis).
      • responseReceivedTsMillis

        public long responseReceivedTsMillis()
        Returns:
        Response received timestamp (millis).
      • onAfterRead

        public void onAfterRead()
        This method is called to initialize tracing variables. TODO: introduce direct message lifecycle API?
      • onBeforeWrite

        public void onBeforeWrite()
        This method is called to initialize tracing variables. TODO: introduce direct message lifecycle API?
      • onRequestProcessed

        public void onRequestProcessed()
      • onResponseProcessed

        public void onResponseProcessed()
      • responseProcessedTs

        public long responseProcessedTs()
        Returns:
        Response processed timestamp.
      • senderNodeId

        public UUID senderNodeId()
        Returns:
        Sender node ID.
      • senderNodeId

        public void senderNodeId​(UUID sndNodeId)
        Parameters:
        sndNodeId - Sender node ID.
      • writeTo

        public boolean writeTo​(ByteBuffer buf,
                               MessageWriter writer)
        Writes this message to provided byte buffer.
        Specified by:
        writeTo in interface Message
        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
        Parameters:
        buf - Byte buffer.
        reader - Reader.
        Returns:
        Whether message was fully read.
      • directType

        public short directType()
        Gets message type.
        Specified by:
        directType in interface Message
        Returns:
        Message type.
      • fieldsCount

        public byte fieldsCount()
        Gets fields count.
        Specified by:
        fieldsCount in interface Message
        Returns:
        Fields count.
      • onAckReceived

        public void onAckReceived()
        Method called when ack message received.
        Specified by:
        onAckReceived in interface Message