Class InDoubtTxInfoImpl
- java.lang.Object
-
- org.infinispan.transaction.xa.recovery.InDoubtTxInfoImpl
-
- All Implemented Interfaces:
RecoveryManager.InDoubtTxInfo
public class InDoubtTxInfoImpl extends java.lang.Object implements RecoveryManager.InDoubtTxInfo
- Since:
- 5.0
- Author:
- Mircea Markus
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInDoubtTxInfoImpl.Externalizer
-
Constructor Summary
Constructors Constructor Description InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, long internalId)InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, long internalId, IntSet status)InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, java.lang.Long internalId, java.lang.Integer status)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOwner(Address owner)voidaddStatus(java.util.Set<java.lang.Integer> statusSet)booleanequals(java.lang.Object o)java.lang.LonggetInternalId()Each xid has a unique long object associated to it.java.util.Set<Address>getOwners()Returns the set of nodes where this transaction information is maintained.java.util.Set<java.lang.Integer>getStatus()The value represent transaction's state as described by thestatusfield.javax.transaction.xa.XidgetXid()Transaction's id.inthashCode()booleanisLocal()Returns true if the transaction information is also present on this node.voidsetLocal(boolean local)java.lang.StringtoString()
-
-
-
Constructor Detail
-
InDoubtTxInfoImpl
public InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, java.lang.Long internalId, java.lang.Integer status)
-
InDoubtTxInfoImpl
public InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, long internalId, IntSet status)
-
InDoubtTxInfoImpl
public InDoubtTxInfoImpl(javax.transaction.xa.Xid xid, long internalId)
-
-
Method Detail
-
getXid
public javax.transaction.xa.Xid getXid()
Description copied from interface:RecoveryManager.InDoubtTxInfoTransaction's id.- Specified by:
getXidin interfaceRecoveryManager.InDoubtTxInfo
-
getInternalId
public java.lang.Long getInternalId()
Description copied from interface:RecoveryManager.InDoubtTxInfoEach xid has a unique long object associated to it. It makes possible the invocation of recovery operations.- Specified by:
getInternalIdin interfaceRecoveryManager.InDoubtTxInfo
-
getStatus
public java.util.Set<java.lang.Integer> getStatus()
Description copied from interface:RecoveryManager.InDoubtTxInfoThe value represent transaction's state as described by thestatusfield. Multiple values are returned as it is possible for an in-doubt transaction to be at the same time e.g. prepared on one node and committed on the other.- Specified by:
getStatusin interfaceRecoveryManager.InDoubtTxInfo
-
getOwners
public java.util.Set<Address> getOwners()
Description copied from interface:RecoveryManager.InDoubtTxInfoReturns the set of nodes where this transaction information is maintained.- Specified by:
getOwnersin interfaceRecoveryManager.InDoubtTxInfo
-
addStatus
public void addStatus(java.util.Set<java.lang.Integer> statusSet)
-
addOwner
public void addOwner(Address owner)
-
isLocal
public boolean isLocal()
Description copied from interface:RecoveryManager.InDoubtTxInfoReturns true if the transaction information is also present on this node.- Specified by:
isLocalin interfaceRecoveryManager.InDoubtTxInfo
-
setLocal
public void setLocal(boolean local)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-