|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.dtx.XidImpl
public class XidImpl
Implements javax.transaction.dtx.Xid
Field Summary |
---|
Fields inherited from interface javax.transaction.xa.Xid |
---|
MAXBQUALSIZE, MAXGTRIDSIZE |
Constructor Summary | |
---|---|
XidImpl()
Create new Xid. |
|
XidImpl(byte[] branchQualifier,
int format,
byte[] globalTransactionID)
Create a new Xid. |
|
XidImpl(String xid)
Create a new Xid form its String form 4 1 1 g b +---+---+---+---+---+---+---+- -+---+---+- -+---+ | format_id | g | b | txn-id | br-id | +---+---+---+---+---+---+---+- -+---+---+- -+---+ 0 4 5 6 6+g 6+g+b format_id: an implementation specific format identifier gtrid_length: how many bytes of this form the transaction id bqual_length: how many bytes of this form the branch id data: a sequence of octets of at most 128 bytes containing the txn id and the branch id Note - The sum of the two lengths must equal the length of the data field. |
|
XidImpl(Xid xid)
Create a new XidImpl from an existing Xid. |
Method Summary | |
---|---|
static Xid |
convert(Xid xid)
Convert an Xid into the AMQP String format. |
boolean |
equals(Object o)
Indicates whether some other Xid is "equal to" this one. |
byte[] |
getBranchQualifier()
Obtain the transaction branch identifier part of XID as an array of bytes. |
int |
getFormatId()
Obtain the format identifier part of the XID. |
byte[] |
getGlobalTransactionId()
Format identifier. |
int |
hashCode()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XidImpl()
public XidImpl(Xid xid)
Usefull for casting external Xids
xid
- Foreign Xid.public XidImpl(byte[] branchQualifier, int format, byte[] globalTransactionID)
branchQualifier
- The transaction branch identifier part of XID as an array of bytes.format
- The format identifier part of the XID.globalTransactionID
- The global transaction identifier part of XID as an array of bytes.public XidImpl(String xid) throws AMQInvalidArgumentException
xid
- an XID STring Form
AMQInvalidArgumentException
- If the string does not represent a valid XidMethod Detail |
---|
public byte[] getGlobalTransactionId()
getGlobalTransactionId
in interface Xid
public byte[] getBranchQualifier()
getBranchQualifier
in interface Xid
public int getFormatId()
getFormatId
in interface Xid
public boolean equals(Object o)
Two Xids are equal if and only if their three elementary parts are equal
equals
in class Object
o
- the object to compare this XidImpl
against.
XidImpl
are equal, false otherwise.public int hashCode()
hashCode
in class Object
public static Xid convert(Xid xid)
xid
- an Xid to convert.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |