org.apache.commons.transaction.util.xa
Class XidWrapper
java.lang.Object
org.apache.commons.transaction.util.xa.XidWrapper
- All Implemented Interfaces:
- Xid
public class XidWrapper
- extends Object
- implements 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$
wrap
public static final Xid wrap(Xid xid)
wrap
public static final Xid wrap(Xid xid,
boolean includeBranch)
getXid
public Xid getXid()
getFormatId
public int getFormatId()
- Specified by:
getFormatId
in interface Xid
getGlobalTransactionId
public byte[] getGlobalTransactionId()
- Specified by:
getGlobalTransactionId
in interface Xid
getBranchQualifier
public byte[] getBranchQualifier()
- Specified by:
getBranchQualifier
in interface Xid
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2004 The Apache Software Foundation. All Rights Reserved.