org.jboss.tm
Class GlobalId

java.lang.Object
  extended by org.jboss.tm.GlobalId
All Implemented Interfaces:
Externalizable, Serializable

public class GlobalId
extends Object
implements 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.

Version:
$Revision: 57208 $
Author:
Ole Husgaard, Francisco Reverbel
See Also:
XidImpl, Serialized Form

Constructor Summary
GlobalId()
           
GlobalId(int formatId, byte[] globalId)
          Create a new instance.
GlobalId(int formatId, int bqual_length, byte[] tid)
           
GlobalId(Xid xid)
           
 
Method Summary
 boolean equals(Object obj)
          Compare for equality.
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 String toString()
           
 void writeExternal(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 xid)

GlobalId

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

equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

writeExternal

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

readExternal

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.