Class XidImpl2

  • All Implemented Interfaces:, javax.transaction.xa.Xid

    public class XidImpl2
    extends java.lang.Object
    implements javax.transaction.xa.Xid,
    Unique id for a transaction. This implementation is backed by a single byte buffer so can do less copying than one backed by several byte buffers for the different components.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from interface javax.transaction.xa.Xid

    • Constructor Summary

      Constructor Description
      XidImpl2​(byte[] globalId)
      Constructor taking a global id (for the main transaction)
      XidImpl2​(int formatId, byte[] globalId, byte[] branch)  
      XidImpl2​(javax.transaction.xa.Xid global, byte[] branch)
      Constructor for a branch id
    • Constructor Detail

      • XidImpl2

        public XidImpl2​(byte[] globalId)
        Constructor taking a global id (for the main transaction)
        globalId - the global transaction id
      • XidImpl2

        public XidImpl2​(javax.transaction.xa.Xid global,
                        byte[] branch)
        Constructor for a branch id
        global - the xid of the global transaction this branch belongs to
        branch - the branch id
      • XidImpl2

        public XidImpl2​(int formatId,
                        byte[] globalId,
                        byte[] branch)
    • Method Detail

      • getFormatId

        public int getFormatId()
        Specified by:
        getFormatId in interface javax.transaction.xa.Xid
      • getGlobalTransactionId

        public byte[] getGlobalTransactionId()
        Specified by:
        getGlobalTransactionId in interface javax.transaction.xa.Xid
      • getBranchQualifier

        public byte[] getBranchQualifier()
        Specified by:
        getBranchQualifier in interface javax.transaction.xa.Xid
      • equals

        public boolean equals​(java.lang.Object obj)
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
      • setKey

        public void setKey​(java.lang.Object key)
      • getKey

        public java.lang.Object getKey()