public class TxLock extends Object implements Message
GridCacheMvccCandidate from local MVCC candidates queue.
There is one exclusion: TxLock instance with OWNERSHIP_REQUESTED corresponds to lock request
to remote node from near node that isn't primary node for key.| Constructor and Description |
|---|
TxLock()
Default constructor.
|
TxLock(GridCacheVersion txId,
UUID nearNodeId,
long threadId,
byte ownership) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
candiate() |
byte |
directType()
Gets message type.
|
byte |
fieldsCount()
Gets fields count.
|
UUID |
nearNodeId() |
void |
onAckReceived()
Method called when ack message received.
|
boolean |
owner() |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
boolean |
requested() |
long |
threadId() |
String |
toString() |
GridCacheVersion |
txId() |
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public TxLock()
public TxLock(GridCacheVersion txId, UUID nearNodeId, long threadId, byte ownership)
txId - Tx ID.nearNodeId - Near node ID.threadId - Thread ID.ownership - Ownership.public UUID nearNodeId()
public GridCacheVersion txId()
public long threadId()
public boolean owner()
True if transaction hold lock on the key, otherwise false.public boolean candiate()
True if there is MVCC candidate for this transaction and key, otherwise false.public boolean requested()
True if transaction requested lock for key from primary remote node
but response isn't received because other transaction hold lock on the key.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public byte directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Messagepublic void onAckReceived()
onAckReceived in interface Message
Follow @ApacheIgnite
Ignite Fabric : ver. 1.7.0 Release Date : August 1 2016