Package com.arjuna.ats.jta.xa
Class XidImple
- java.lang.Object
-
- com.arjuna.ats.jta.xa.XidImple
-
- All Implemented Interfaces:
java.io.Serializable,javax.transaction.xa.Xid
public class XidImple extends java.lang.Object implements javax.transaction.xa.Xid, java.io.SerializableImplementation 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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected com.arjuna.ats.internal.jta.xa.XID_theXid
-
Constructor Summary
Constructors Constructor Description XidImple()XidImple(AtomicAction c)XidImple(Uid id)XidImple(Uid id, boolean branch, java.lang.Integer eisName)XidImple(com.arjuna.ats.internal.jta.xa.XID x)XidImple(javax.transaction.xa.Xid xid)XidImple(javax.transaction.xa.Xid xid, boolean branch, java.lang.Integer eisName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy(javax.transaction.xa.Xid xid)booleanequals(java.lang.Object obj)Is the specified object equal to this one?booleanequals(javax.transaction.xa.Xid xid)protected static intgenerateHash(int hash, byte[] bytes, int start, int length)Generate a hash code for the specified bytes.byte[]getBranchQualifier()intgetFormatId()byte[]getGlobalTransactionId()These operations critically rely on the fact that we unpack the array in the order we packed it!protected intgetHash(com.arjuna.ats.internal.jta.xa.XID xid)Generate the hash code for the xid.UidgetTransactionUid()com.arjuna.ats.internal.jta.xa.XIDgetXID()inthashCode()Return the hash code for this Xid.booleanisSameTransaction(javax.transaction.xa.Xid xid)static voidpack(OutputObjectState os, javax.transaction.xa.Xid xid)booleanpackInto(OutputObjectState os)java.lang.StringtoString()static javax.transaction.xa.Xidunpack(InputObjectState os)booleanunpackFrom(InputObjectState os)
-
-
-
Constructor Detail
-
XidImple
public XidImple()
-
XidImple
public XidImple(javax.transaction.xa.Xid xid)
-
XidImple
public XidImple(AtomicAction c)
-
XidImple
public XidImple(javax.transaction.xa.Xid xid, boolean branch, java.lang.Integer eisName)
-
XidImple
public XidImple(Uid id)
-
XidImple
public XidImple(Uid id, boolean branch, java.lang.Integer eisName)
-
XidImple
public XidImple(com.arjuna.ats.internal.jta.xa.XID x)
-
-
Method Detail
-
isSameTransaction
public final boolean isSameTransaction(javax.transaction.xa.Xid xid)
-
getFormatId
public int getFormatId()
- Specified by:
getFormatIdin interfacejavax.transaction.xa.Xid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()
These operations critically rely on the fact that we unpack the array in the order we packed it!- Specified by:
getGlobalTransactionIdin interfacejavax.transaction.xa.Xid
-
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifierin interfacejavax.transaction.xa.Xid
-
getTransactionUid
public final Uid getTransactionUid()
-
getXID
public final com.arjuna.ats.internal.jta.xa.XID getXID()
-
copy
public final void copy(javax.transaction.xa.Xid xid)
-
equals
public boolean equals(javax.transaction.xa.Xid xid)
-
packInto
public final boolean packInto(OutputObjectState os)
-
unpackFrom
public final boolean unpackFrom(InputObjectState os)
-
pack
public static final void pack(OutputObjectState os, javax.transaction.xa.Xid xid) throws java.io.IOException
- Throws:
java.io.IOException
-
unpack
public static final javax.transaction.xa.Xid unpack(InputObjectState os) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Is the specified object equal to this one?- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to test.- Returns:
- true if they are equal, false otherwise.
-
hashCode
public int hashCode()
Return the hash code for this Xid.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code.
-
getHash
protected int getHash(com.arjuna.ats.internal.jta.xa.XID xid)
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.
-
-