org.apache.ignite.internal.visor.tx

## Class VisorTxInfo

- java.lang.Object
- - org.apache.ignite.internal.visor.VisorDataTransferObject
  - - org.apache.ignite.internal.visor.tx.VisorTxInfo

All Implemented Interfaces:
  Externalizable, Serializable

    public class VisorTxInfo
    extends VisorDataTransferObject

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`V1, V2, V3, V4`

### Constructor Summary

Constructors
Constructor and Description
`VisorTxInfo()` Default constructor.
`VisorTxInfo(IgniteUuid xid, long startTime, long duration, TransactionIsolation isolation, TransactionConcurrency concurrency, long timeout, String lb, Collection<UUID> primaryNodes, TransactionState state, int size, IgniteUuid nearXid, Collection<UUID> masterNodeIds, AffinityTopologyVersion topVer, TxVerboseInfo info)`
`VisorTxInfo(IgniteUuid xid, TransactionState state)` Constructor for historical mode.

### Method Summary

All Methods Instance Methods Concrete Methods
`TransactionConcurrency` `getConcurrency()`
`long` `getDuration()`
`String` `getFormattedStartTime()`
`TransactionIsolation` `getIsolation()`
`String` `getLabel()`
`@Nullable Collection<UUID>` `getMasterNodeIds()`
`@Nullable IgniteUuid` `getNearXid()`
`Collection<UUID>` `getPrimaryNodes()`
`byte` `getProtocolVersion()`
`int` `getSize()`
`long` `getStartTime()`
`TransactionState` `getState()`
`long` `getTimeout()`
`AffinityTopologyVersion` `getTopologyVersion()`
`TxVerboseInfo` `getTxVerboseInfo()`
`IgniteUuid` `getXid()`
`protected void` `readExternalData(byte protoVer, ObjectInput in)` Load object's specific data content.
`String` `toString()`
`String` `toUserString()` Get tx info as user string.
`protected void` `writeExternalData(ObjectOutput out)` Save object's specific data content.

### Methods inherited from class org.apache.ignite.internal.visor.VisorDataTransferObject

`readExternal, toList, toSet, writeExternal`

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

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

### Constructor Detail

#### VisorTxInfo

    public VisorTxInfo()

Default constructor.

#### VisorTxInfo

    public VisorTxInfo(IgniteUuid xid,
                       long startTime,
                       long duration,
                       TransactionIsolation isolation,
                       TransactionConcurrency concurrency,
                       long timeout,
                       String lb,
                       Collection<UUID> primaryNodes,
                       TransactionState state,
                       int size,
                       IgniteUuid nearXid,
                       Collection<UUID> masterNodeIds,
                       AffinityTopologyVersion topVer,
                       TxVerboseInfo info)

Parameters:
  `xid` - Xid.
  `startTime` - Start time of transaction.
  `duration` - Duration.
  `isolation` - Isolation.
  `concurrency` - Concurrency.
  `timeout` - Timeout.
  `lb` - Label.
  `primaryNodes` - Primary nodes.
  `state` - State.
  `size` - Size.
  `info` - Verbose TX info.

#### VisorTxInfo

    public VisorTxInfo(IgniteUuid xid,
                       TransactionState state)

Constructor for historical mode. Used to encapsulate information about tx commit/rollback from completed versions history map.

Parameters:
  `xid` - Xid.
  `state` - State.

### Method Detail

#### getProtocolVersion

    public byte getProtocolVersion()

Overrides:
  `getProtocolVersion` in class `VisorDataTransferObject`
Returns:
  Transfer object version.

#### getXid

    public IgniteUuid getXid()

#### getStartTime

    public long getStartTime()

#### getFormattedStartTime

    public String getFormattedStartTime()

#### getDuration

    public long getDuration()

#### getIsolation

    public TransactionIsolation getIsolation()

#### getConcurrency

    public TransactionConcurrency getConcurrency()

#### getTopologyVersion

    public AffinityTopologyVersion getTopologyVersion()

#### getTimeout

    public long getTimeout()

#### getLabel

    public String getLabel()

#### getPrimaryNodes

    public Collection<UUID> getPrimaryNodes()

#### getState

    public TransactionState getState()

#### getSize

    public int getSize()

#### getNearXid

    @Nullable
    public @Nullable IgniteUuid getNearXid()

#### getMasterNodeIds

    @Nullable
    public @Nullable Collection<UUID> getMasterNodeIds()

#### getTxVerboseInfo

    public TxVerboseInfo getTxVerboseInfo()

Returns:
  Tx verbose info.

#### writeExternalData

    protected void writeExternalData(ObjectOutput out)
                              throws IOException

Save object's specific data content.

Specified by:
  `writeExternalData` in class `VisorDataTransferObject`
Parameters:
  `out` - Output object to write data content.
Throws:
  `IOException` - If I/O errors occur.

#### readExternalData

    protected void readExternalData(byte protoVer,
                                    ObjectInput in)
                             throws IOException,
                                    ClassNotFoundException

Load object's specific data content.

Specified by:
  `readExternalData` in class `VisorDataTransferObject`
Parameters:
  `protoVer` - Input object version.
  `in` - Input object to load data content.
Throws:
  `IOException` - If I/O errors occur.
  `ClassNotFoundException` - If the class for an object being restored cannot be found.

#### toUserString

    public String toUserString()

Get tx info as user string.

Returns:
  User string.

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