org.apache.ignite.internal.processors.cache.mvcc

## Class DeadlockProbe

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.mvcc.DeadlockProbe

All Implemented Interfaces:
  Serializable, Message

    public class DeadlockProbe
    extends Object
    implements Message

Probe message travelling between transactions (from waiting to blocking) during deadlock detection.

See Also:
  `DeadlockDetectionManager`, Serialized Form

### Field Summary

### Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message

`DIRECT_TYPE_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`DeadlockProbe()`
`DeadlockProbe(GridCacheVersion initiatorVer, Collection<ProbedTx> waitChain, ProbedTx blocker, boolean nearCheck)`

### Method Summary

All Methods Instance Methods Concrete Methods
`ProbedTx` `blocker()`
`short` `directType()` Gets message type.
`byte` `fieldsCount()` Gets fields count.
`GridCacheVersion` `initiatorVersion()`
`boolean` `nearCheck()`
`void` `onAckReceived()` Method called when ack message received.
`boolean` `readFrom(ByteBuffer buf, MessageReader reader)` Reads this message from provided byte buffer.
`String` `toString()`
`Collection<ProbedTx>` `waitChain()`
`boolean` `writeTo(ByteBuffer buf, MessageWriter writer)` Writes this message to provided byte buffer.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### DeadlockProbe

    public DeadlockProbe()

#### DeadlockProbe

    public DeadlockProbe(GridCacheVersion initiatorVer,
                         Collection<ProbedTx> waitChain,
                         ProbedTx blocker,
                         boolean nearCheck)

### Method Detail

#### initiatorVersion

    public GridCacheVersion initiatorVersion()

Returns:
  Identifier of a transaction started a deadlock detection process. Can be used for diagnostics.

#### waitChain

    public Collection<ProbedTx> waitChain()

Returns:
  Chain of transactions identified as waiting during deadlock detection.

#### blocker

    public ProbedTx blocker()

Returns:
  Identifier of a transaction identified as blocking last transaction in the wait chain during deadlock deteciton.

#### nearCheck

    public boolean nearCheck()

Returns:
  `True` if checks if near transaction is waiting. `False` if checks dht transaction.

#### 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`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.0
Release Date | : September 11 2021