org.jboss.tm
Class XidImpl
java.lang.Object
|
+--org.jboss.tm.XidImpl
- All Implemented Interfaces:
- java.io.Serializable, javax.transaction.xa.Xid
- public class XidImpl
- extends java.lang.Object
- implements javax.transaction.xa.Xid, java.io.Serializable
This object encapsulates the ID of a transaction.
This implementation is immutable and always serializable at runtime.
- Version:
- $Revision: 1.10.6.1 $
- Author:
- Rickard Öberg, Ole Husgaard
- See Also:
TransactionImpl
, Serialized Form
Fields inherited from interface javax.transaction.xa.Xid |
MAXBQUALSIZE, MAXGTRIDSIZE |
Constructor Summary |
XidImpl()
Create a new instance. |
XidImpl(XidImpl xid,
int branchId)
Create a new branch of an existing global transaction ID. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
JBOSS_FORMAT_ID
public static final int JBOSS_FORMAT_ID
XidImpl
public XidImpl()
- Create a new instance.
XidImpl
public XidImpl(XidImpl xid,
int branchId)
- Create a new branch of an existing global transaction ID.
- Parameters:
xid
- The transaction ID to create a new branch of.branchId
- The ID of the new branch.
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Return the global transaction id of this transaction.
- Specified by:
getGlobalTransactionId
in interface javax.transaction.xa.Xid
getBranchQualifier
public byte[] getBranchQualifier()
- Return the branch qualifier of this transaction.
- Specified by:
getBranchQualifier
in interface javax.transaction.xa.Xid
getFormatId
public int getFormatId()
- Return the format identifier of this transaction.
The format identifier augments the global id and specifies
how the global id and branch qualifier should be interpreted.
- Specified by:
getFormatId
in interface javax.transaction.xa.Xid
equals
public boolean equals(java.lang.Object obj)
- Compare for equality.
Instances are considered equal if they are both instances of XidImpl,
and if they have the same global transaction id and transaction
branch qualifier.
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2000 The JBoss Organization. All Rights Reserved.