Package org.infinispan.transaction.xa
Class GlobalTransaction
- java.lang.Object
-
- org.infinispan.transaction.xa.GlobalTransaction
-
- All Implemented Interfaces:
java.lang.Cloneable
- Direct Known Subclasses:
DldGlobalTransaction,RecoveryAwareGlobalTransaction
public class GlobalTransaction extends java.lang.Object implements java.lang.CloneableUniquely 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
. GlobalTransaction should be instantiated thoroughTransactionFactoryclass, as their type depends on the runtime configuration.- Since:
- 4.0
- Author:
- Bela Ban Apr 12, 2003, Manik Surtani (manik@jboss.org), Mircea.Markus@jboss.com
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classGlobalTransaction.AbstractGlobalTxExternalizer<T extends GlobalTransaction>static classGlobalTransaction.Externalizer
-
Constructor Summary
Constructors Modifier Constructor Description protectedGlobalTransaction()empty ctor used by externalization.protectedGlobalTransaction(Address addr, boolean remote)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()booleanequals(java.lang.Object other)AddressgetAddress()longgetId()java.lang.StringglobalId()Returns a simplified representation of the transaction.inthashCode()booleanisRemote()voidsetAddress(Address address)voidsetId(long id)voidsetRemote(boolean remote)java.lang.StringtoString()
-
-
-
Field Detail
-
id
protected long id
-
addr
protected Address addr
-
-
Constructor Detail
-
GlobalTransaction
protected GlobalTransaction()
empty ctor used by externalization.
-
GlobalTransaction
protected GlobalTransaction(Address addr, boolean remote)
-
-
Method Detail
-
getAddress
public Address getAddress()
-
getId
public long getId()
-
isRemote
public boolean isRemote()
-
setRemote
public void setRemote(boolean remote)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
globalId
public final java.lang.String globalId()
Returns a simplified representation of the transaction.
-
setId
public void setId(long id)
-
setAddress
public void setAddress(Address address)
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-