|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbitronix.tm.BitronixXid
public class BitronixXid
Implementation of Xid
.
A XID is divided in two parts: globalTransactionId (GTRID) and branchQualifier (BQUAL). The first one uniquely identifies the global transaction while the latter uniquely identifies the transaction branch, or the local part of the global transaction inside a resource.
Technically in the Bitronix implementation, GTRID and BQUAL have the same format as described by Mike Spille.
Each BitronixTransaction
get assigned a GTRID at creation time and full XIDs are created and
assigned to every XAResourceHolderState
when enlisted in the transaction's
XAResourceManager
. Both GTRID and XIDs are generated
by the UidGenerator
.
UidGenerator
,
BitronixTransaction
,
XAResourceManager
,
XA Exposed, Part III: The Implementor's NotebookField Summary | |
---|---|
static int |
FORMAT_ID
int-encoded "Btnx" string. |
Fields inherited from interface javax.transaction.xa.Xid |
---|
MAXBQUALSIZE, MAXGTRIDSIZE |
Constructor Summary | |
---|---|
BitronixXid(Uid globalTransactionId,
Uid branchQualifier)
Create a new XID using the specified GTRID and BQUAL. |
|
BitronixXid(Xid xid)
|
Method Summary | |
---|---|
boolean |
equals(Object obj)
Compare two XIDs for equality. |
byte[] |
getBranchQualifier()
Get the BQUAL of the XID. |
Uid |
getBranchQualifierUid()
|
int |
getFormatId()
Get Bitronix XID format ID. |
byte[] |
getGlobalTransactionId()
Get the GTRID of the XID. |
Uid |
getGlobalTransactionIdUid()
|
int |
hashCode()
Get an integer hash for the XID. |
String |
toString()
Get a human-readable string representation of the XID. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int FORMAT_ID
Constructor Detail |
---|
public BitronixXid(Uid globalTransactionId, Uid branchQualifier)
globalTransactionId
- the GTRID.branchQualifier
- the BQUAL.public BitronixXid(Xid xid)
Method Detail |
---|
public int getFormatId()
FORMAT_ID
.
getFormatId
in interface Xid
public byte[] getBranchQualifier()
getBranchQualifier
in interface Xid
public Uid getBranchQualifierUid()
public byte[] getGlobalTransactionId()
getGlobalTransactionId
in interface Xid
public Uid getGlobalTransactionIdUid()
public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
obj
- the XID to compare to.
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |