Class XidImpl2
- java.lang.Object
-
- org.apache.geronimo.transaction.log.XidImpl2
-
- All Implemented Interfaces:
java.io.Serializable,javax.transaction.xa.Xid
public class XidImpl2 extends java.lang.Object implements javax.transaction.xa.Xid, java.io.SerializableUnique 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)byte[]getBranchQualifier()intgetFormatId()byte[]getGlobalTransactionId()java.lang.ObjectgetKey()inthashCode()voidsetKey(java.lang.Object key)java.lang.StringtoString()
-
-
-
Constructor Detail
-
XidImpl2
public XidImpl2(byte[] globalId)
Constructor taking a global id (for the main transaction)- Parameters:
globalId- the global transaction id
-
XidImpl2
public XidImpl2(javax.transaction.xa.Xid global, byte[] branch)Constructor for a branch id- Parameters:
global- the xid of the global transaction this branch belongs tobranch- the branch id
-
XidImpl2
public XidImpl2(int formatId, byte[] globalId, byte[] branch)
-
-
Method Detail
-
getFormatId
public int getFormatId()
- Specified by:
getFormatIdin interfacejavax.transaction.xa.Xid
-
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionIdin interfacejavax.transaction.xa.Xid
-
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifierin interfacejavax.transaction.xa.Xid
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setKey
public void setKey(java.lang.Object key)
-
getKey
public java.lang.Object getKey()
-
-