Class TxLock

    • Constructor Detail

      • TxLock

        public TxLock()
        Default constructor.
      • TxLock

        public TxLock​(GridCacheVersion txId,
                      UUID nearNodeId,
                      long threadId,
                      byte ownership)
        Parameters:
        txId - Tx ID.
        nearNodeId - Near node ID.
        threadId - Thread ID.
        ownership - Ownership.
    • Method Detail

      • nearNodeId

        public UUID nearNodeId()
        Returns:
        Near node ID.
      • threadId

        public long threadId()
        Returns:
        Thread ID.
      • owner

        public boolean owner()
        Returns:
        True if transaction hold lock on the key, otherwise false.
      • candiate

        public boolean candiate()
        Returns:
        True if there is MVCC candidate for this transaction and key, otherwise false.
      • requested

        public boolean requested()
        Returns:
        True if transaction requested lock for key from primary remote node but response isn't received because other transaction hold lock on the key.
      • 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