org.apache.commons.transaction.util.xa
Class XidWrapper
java.lang.Object
org.apache.commons.transaction.util.xa.XidWrapper
- All Implemented Interfaces:
- javax.transaction.xa.Xid
public class XidWrapper
- extends java.lang.Object
- implements javax.transaction.xa.Xid
Wraps an Xid
to guarantee methods for equality and hashcode are
implemented correctly. This is escpecially necessary when the Xid
is used as a key in a HashMap
.
- Version:
- $Revision$
Fields inherited from interface javax.transaction.xa.Xid |
MAXBQUALSIZE, MAXGTRIDSIZE |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
wrap
public static final javax.transaction.xa.Xid wrap(javax.transaction.xa.Xid xid)
wrap
public static final javax.transaction.xa.Xid wrap(javax.transaction.xa.Xid xid,
boolean includeBranch)
getXid
public javax.transaction.xa.Xid getXid()
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 o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
Copyright ? 2004 The Apache Software Foundation. All Rights Reserved.