org.jboss.tm
Class GlobalId

java.lang.Object
  extended byorg.jboss.tm.GlobalId
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class GlobalId
extends java.lang.Object
implements java.io.Externalizable

This object encapsulates the global transaction ID of a transaction. It is similar to an Xid, but holds only the GlobalId part. This implementation is immutable and always serializable at runtime.

See Also:
XidImpl (src) , Serialized Form

Constructor Summary
GlobalId()
           
GlobalId(int formatId, byte[] globalId)
          Create a new instance.
GlobalId(int formatId, int bqual_length, byte[] tid)
           
GlobalId(Xid (src)  xid)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Compare for equality.
 int hashCode()
           
 void readExternal(java.io.ObjectInput in)
           
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalId

public GlobalId()

GlobalId

public GlobalId(int formatId,
                byte[] globalId)
Create a new instance. This constructor is public only to get around a class loader problem; it should be package-private.


GlobalId

public GlobalId(Xid (src)  xid)

GlobalId

public GlobalId(int formatId,
                int bqual_length,
                byte[] tid)
Method Detail

equals

public boolean equals(java.lang.Object obj)
Compare for equality. Instances are considered equal if they both refer to the same global transaction id.


hashCode

public int hashCode()

toString

public java.lang.String toString()

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException