Class XAXactId
java.lang.Object
org.apache.derby.iapi.store.access.GlobalXact
org.apache.derby.iapi.store.access.xa.XAXactId
- All Implemented Interfaces:
Xid
The XAXactId class is a specific implementation of the JTA Xid interface. It
is only used by the TransactionTable.restore() interface to return an array
of Xid's back to the caller, as part of serving the XAresource.restore()
interface.
It is NOT the object that is stored in the log. One reason for this is that the Formattable and Xid interface's define two different return values for the getFormatId() interface.
-
Field Summary
FieldsFields inherited from class GlobalXact
branch_id, format_id, global_idFields inherited from interface Xid
MAXBQUALSIZE, MAXGTRIDSIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcopy_init_xid(int format_id, byte[] global_id, byte[] branch_id) initialize by making array copies of appropriate fields.booleanbyte[]Obtain the transaction branch qualifier part of the Xid in a byte array.intObtain the format id part of the Xid.byte[]Obtain the global transaction identifier part of XID as an array of bytes.Methods inherited from class GlobalXact
hashCode, toString
-
Field Details
-
COLON
private static final char COLONPrivate Fields of the class- See Also:
-
-
Constructor Details
-
XAXactId
public XAXactId(int format_id, byte[] global_id, byte[] branch_id) Construct from given pieces of an Xid. Makes copies of arrays. -
XAXactId
Construct an Xid using an external Xid.- Throws:
XAException- invalid external xid
-
XAXactId
-
-
Method Details
-
copy_init_xid
private void copy_init_xid(int format_id, byte[] global_id, byte[] branch_id) initialize by making array copies of appropriate fields. -
toHexString
-
getFormatId
public int getFormatId()Obtain the format id part of the Xid.- Specified by:
getFormatIdin 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:
getGlobalTransactionIdin 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:
getBranchQualifierin interfaceXid- Returns:
- A byte array containing the branch qualifier of the transaction.
-
equals
- Overrides:
equalsin classGlobalXact
-