org.infinispan.transaction.xa
Class GlobalTransaction

java.lang.Object
  extended by org.infinispan.transaction.xa.GlobalTransaction
All Implemented Interfaces:
Externalizable, Serializable, Cloneable

public class GlobalTransaction
extends Object
implements Externalizable, Cloneable

Uniquely identifies a transaction that spans all JVMs in a cluster. This is used when replicating all modifications in a transaction; the PREPARE and COMMIT (or ROLLBACK) messages have to have a unique identifier to associate the changes with

Since:
4.0
Author:
Bela Ban Apr 12, 2003, Manik Surtani (manik@jboss.org)
See Also:
Serialized Form

Constructor Summary
GlobalTransaction()
          empty ctor used by externalization.
GlobalTransaction(Address addr, boolean remote)
           
GlobalTransaction(boolean remote)
           
GlobalTransaction(long id, Address addr)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object other)
           
 Object getAddress()
           
 long getId()
           
 int hashCode()
           
 boolean isRemote()
           
 void readExternal(ObjectInput in)
           
 void setAddress(Address address)
           
 void setId(long id)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalTransaction

public GlobalTransaction()
empty ctor used by externalization.


GlobalTransaction

public GlobalTransaction(Address addr,
                         boolean remote)

GlobalTransaction

public GlobalTransaction(long id,
                         Address addr)

GlobalTransaction

public GlobalTransaction(boolean remote)
Method Detail

getAddress

public Object getAddress()

getId

public long getId()

isRemote

public boolean isRemote()

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object

setId

public void setId(long id)

setAddress

public void setAddress(Address address)

clone

public Object clone()
Overrides:
clone in class Object


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.