org.apache.slide.util
Class XidWrapper

java.lang.Object
  extended byorg.apache.slide.util.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.

Author:
Oliver Zeigermann

Field Summary
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Method Summary
 boolean equals(java.lang.Object o)
           
 byte[] getBranchQualifier()
           
 int getFormatId()
           
 byte[] getGlobalTransactionId()
           
 javax.transaction.xa.Xid getXid()
           
 int hashCode()
           
 java.lang.String toString()
           
static javax.transaction.xa.Xid wrap(javax.transaction.xa.Xid xid)
           
static javax.transaction.xa.Xid wrap(javax.transaction.xa.Xid xid, boolean includeBranch)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

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)

toString

public java.lang.String toString()

hashCode

public int hashCode()