# Class MariaDbXid

java.lang.Object
org.mariadb.jdbc.MariaDbXid

All Implemented Interfaces:
  `Xid`

public class MariaDbXid extends Object implements Xid
MariaDB XID implementation

## Field Summary

### Fields inherited from interface Xid

`MAXBQUALSIZE, MAXGTRIDSIZE`

## Constructor Summary

Constructors
Constructor
Description
`MariaDbXid(int formatId, byte[] globalTransactionId, byte[] branchQualifier)`
Global transaction identifier.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
Equal implementation.
`byte[]`
`getBranchQualifier()`
Get branch qualifier from XID
`int`
`getFormatId()`
Get format id from XID
`byte[]`
`getGlobalTransactionId()`
Get global transaction id from XID
`int`
`hashCode()`

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MariaDbXid

public MariaDbXid(int formatId, byte[] globalTransactionId, byte[] branchQualifier)
Global transaction identifier.

Parameters:
  `formatId` - the format identifier part of the XID.
  `globalTransactionId` - the global transaction identifier part of XID as an array of bytes.
  `branchQualifier` - the transaction branch identifier part of XID as an array of bytes.

## Method Details

### equals

public boolean equals(Object obj)
Equal implementation.

Overrides:
  `equals` in class `Object`
Parameters:
  `obj` - object to compare
Returns:
  true if object is MariaDbXi and as same parameters

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### getFormatId

public int getFormatId()
Get format id from XID

Specified by:
  `getFormatId` in interface `Xid`
Returns:
  format id

### getGlobalTransactionId

public byte[] getGlobalTransactionId()
Get global transaction id from XID

Specified by:
  `getGlobalTransactionId` in interface `Xid`
Returns:
  global transaction id

### getBranchQualifier

public byte[] getBranchQualifier()
Get branch qualifier from XID

Specified by:
  `getBranchQualifier` in interface `Xid`
Returns:
  branch qualifier