MAXBQUALSIZE, MAXGTRIDSIZE
Constructor and Description |
---|
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
|
XidImpl(Xid xid)
Create a new XidImpl from an existing Xid.
|
Modifier and Type | Method and Description |
---|---|
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() |
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
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.
xid
- an XID STring FormAMQInvalidArgumentException
- If the string does not represent a valid Xidpublic 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
public static Xid convert(Xid xid)
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.
xid
- an Xid to convert.Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.