com.caucho.transaction
Class XidImpl

java.lang.Object
  extended by com.caucho.transaction.XidImpl
All Implemented Interfaces:
Xid

public class XidImpl
extends java.lang.Object
implements Xid

Transaction identifier implementation.


Field Summary
static int GLOBAL_LENGTH
           
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
XidImpl(byte[] global, byte[] local)
           
XidImpl(long serverId, long randomId, long sequence)
          Creates a new transaction id.
 
Method Summary
 java.lang.Object clone()
          Clones the xid.
 boolean equals(java.lang.Object o)
          Returns equality.
 byte[] getBranchQualifier()
           
 int getFormatId()
           
 byte[] getGlobalTransactionId()
           
 int hashCode()
          Returns hashCode.
 java.lang.String toString()
          Printable version of the transaction id.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

GLOBAL_LENGTH

public static final int GLOBAL_LENGTH
See Also:
Constant Field Values
Constructor Detail

XidImpl

public XidImpl(long serverId,
               long randomId,
               long sequence)
Creates a new transaction id.

Parameters:
id - the 64 bit number for the id.

XidImpl

public XidImpl(byte[] global,
               byte[] local)
Method Detail

getFormatId

public int getFormatId()
Specified by:
getFormatId in interface Xid

getBranchQualifier

public byte[] getBranchQualifier()
Specified by:
getBranchQualifier in interface Xid

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Specified by:
getGlobalTransactionId in interface Xid

clone

public java.lang.Object clone()
Clones the xid.

Overrides:
clone in class java.lang.Object

hashCode

public int hashCode()
Returns hashCode.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Returns equality.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Printable version of the transaction id.

Overrides:
toString in class java.lang.Object