Package org.apache.derby.impl.drda
Class DRDAXid
java.lang.Object
org.apache.derby.impl.drda.DRDAXid
- All Implemented Interfaces:
Xid
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]
private final int
private final byte[]
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
convertToHexString
(byte[] buf) convert byte array to a Hex stringbyte[]
Obtain the transaction branch qualifier part of the Xid in a byte array.int
Obtain the format id part of the Xid.byte[]
Obtain the global transaction identifier part of XID as an array of bytes.toString()
-
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 interfaceXid
- 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 interfaceXid
- 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 interfaceXid
- Returns:
- A byte array containing the branch qualifier of the transaction.
-
toString
-
convertToHexString
convert byte array to a Hex string- Parameters:
buf
- buffer to convert- Returns:
- hex string representation of byte array
-