Class DRDAXid

java.lang.Object
org.apache.derby.impl.drda.DRDAXid
All Implemented Interfaces:
Xid

class DRDAXid extends Object implements Xid
  • Field Details

    • format_id

      private final int format_id
    • global_id

      private final byte[] global_id
    • branch_id

      private final byte[] branch_id
  • Constructor Details

    • DRDAXid

      DRDAXid(int formatid, byte[] globalid, byte[] branchid)
  • Method Details

    • getFormatId

      public int getFormatId()
      Obtain the format id part of the Xid.

      Specified by:
      getFormatId in interface Xid
      Returns:
      Format identifier. O means the OSI CCR format.
    • getGlobalTransactionId

      public byte[] getGlobalTransactionId()
      Obtain the global transaction identifier part of XID as an array of bytes.

      Specified by:
      getGlobalTransactionId in interface Xid
      Returns:
      A byte array containing the global transaction identifier.
    • getBranchQualifier

      public byte[] getBranchQualifier()
      Obtain the transaction branch qualifier part of the Xid in a byte array.

      Specified by:
      getBranchQualifier in interface Xid
      Returns:
      A byte array containing the branch qualifier of the transaction.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • convertToHexString

      private static String convertToHexString(byte[] buf)
      convert byte array to a Hex string
      Parameters:
      buf - buffer to convert
      Returns:
      hex string representation of byte array