Package com.arjuna.ats.jta.xa
Class XidImple
java.lang.Object
com.arjuna.ats.jta.xa.XidImple
- All Implemented Interfaces:
Serializable
,Xid
- Direct Known Subclasses:
SubordinateXidImple
Implementation of javax.transaction.xa.Xid.
- Since:
- JTS 1.2.4.
- Version:
- $Id: XidImple.java 2342 2006-03-30 13:06:17Z $
- Author:
- Mark Little (mark@arjuna.com)
- See Also:
-
Field Summary
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
boolean
Is the specified object equal to this one?boolean
protected static int
generateHash
(int hash, byte[] bytes, int start, int length) Generate a hash code for the specified bytes.byte[]
int
byte[]
These operations critically rely on the fact that we unpack the array in the order we packed it!protected int
Generate the hash code for the xid.final Uid
final XID
getXID()
int
hashCode()
Return the hash code for this Xid.final boolean
isSameTransaction
(Xid xid) static final void
pack
(OutputObjectState os, Xid xid) final boolean
toString()
static final Xid
final boolean
-
Field Details
-
_theXid
-
-
Constructor Details
-
XidImple
public XidImple() -
XidImple
-
XidImple
-
XidImple
-
XidImple
-
XidImple
-
XidImple
-
-
Method Details
-
isSameTransaction
-
getFormatId
public int getFormatId()- Specified by:
getFormatId
in interfaceXid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()These operations critically rely on the fact that we unpack the array in the order we packed it!- Specified by:
getGlobalTransactionId
in interfaceXid
-
getBranchQualifier
public byte[] getBranchQualifier()- Specified by:
getBranchQualifier
in interfaceXid
-
getTransactionUid
-
getXID
-
copy
-
equals
-
packInto
-
unpackFrom
-
pack
- Throws:
IOException
-
unpack
- Throws:
IOException
-
toString
-
equals
Is the specified object equal to this one? -
hashCode
public int hashCode()Return the hash code for this Xid. -
getHash
Generate the hash code for the xid.- Parameters:
xid
- The xid.- Returns:
- The hash code.
-
generateHash
protected static int generateHash(int hash, byte[] bytes, int start, int length) Generate a hash code for the specified bytes.- Parameters:
hash
- The initial hash.bytes
- The bytes to include in the hash.- Returns:
- The new hash code.
-