Class XidImple

  • All Implemented Interfaces:
    Serializable, Xid

    public class XidImple
    extends Object
    implements Xid, Serializable
    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:
    Serialized Form
    • Field Detail

      • _theXid

        protected com.arjuna.ats.internal.jta.xa.XID _theXid
    • Constructor Detail

      • XidImple

        public XidImple()
      • XidImple

        public XidImple​(Xid xid)
      • XidImple

        public XidImple​(Xid xid,
                        boolean branch,
                        Integer eisName)
      • XidImple

        public XidImple​(Uid id)
      • XidImple

        public XidImple​(Uid id,
                        boolean branch,
                        Integer eisName)
      • XidImple

        public XidImple​(com.arjuna.ats.internal.jta.xa.XID x)
    • Method Detail

      • isSameTransaction

        public final boolean isSameTransaction​(Xid xid)
      • getFormatId

        public int getFormatId()
        Specified by:
        getFormatId in interface 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:
        getGlobalTransactionId in interface Xid
      • getBranchQualifier

        public byte[] getBranchQualifier()
        Specified by:
        getBranchQualifier in interface Xid
      • getTransactionUid

        public final Uid getTransactionUid()
      • getXID

        public final com.arjuna.ats.internal.jta.xa.XID getXID()
      • copy

        public final void copy​(Xid xid)
      • equals

        public boolean equals​(Xid xid)
      • equals

        public boolean equals​(Object obj)
        Is the specified object equal to this one?
        Overrides:
        equals in class 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:
        hashCode in class 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.