public class XidImpl extends Object implements Xid, Cloneable, Serializable
MAXBQUALSIZE, MAXGTRIDSIZE| Constructor and Description |
|---|
XidImpl()
Constructs a new null XID.
|
XidImpl(int formatID,
org.fusesource.hawtbuf.Buffer globalTransactionId,
org.fusesource.hawtbuf.Buffer branchQualifier) |
XidImpl(int formatID,
byte[] globalTxnID,
byte[] branchID) |
XidImpl(String globalTxnId,
String branchId) |
XidImpl(Xid from)
Initialize an XID using another XID as the source of data.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Determine whether or not two objects of this type are equal.
|
byte[] |
getBranchQualifier()
Returns the branch qualifier for this XID.
|
int |
getFormatId()
Obtain the format identifier part of the XID.
|
byte[] |
getGlobalTransactionId()
Returns the global transaction identifier for this XID.
|
int |
getMemorySize() |
int |
hashCode()
Compute the hash code.
|
void |
readbody(DataInput in)
read xid from an Array and set each fields.
|
static org.fusesource.hawtbuf.Buffer |
toBuffer(Xid xid) |
String |
toString()
Return a string representing this XID.
|
void |
writebody(DataOutput out)
Writes this XidImpl's data to the DataOutput destination
|
public XidImpl()
After construction the data within the XID should be initialized.
public XidImpl(int formatID,
byte[] globalTxnID,
byte[] branchID)
public XidImpl(int formatID,
org.fusesource.hawtbuf.Buffer globalTransactionId,
org.fusesource.hawtbuf.Buffer branchQualifier)
public XidImpl(Xid from)
from - the XID to initialize this XID frompublic boolean equals(Object o)
public int hashCode()
public String toString()
This is normally used to display the XID when debugging.
public int getFormatId()
getFormatId in interface Xidpublic byte[] getGlobalTransactionId()
getGlobalTransactionId in interface Xidpublic byte[] getBranchQualifier()
getBranchQualifier in interface Xidpublic int getMemorySize()
public void writebody(DataOutput out) throws IOException
out - The DataOutput destinationIOExceptionpublic void readbody(DataInput in) throws IOException
in - the data input arrayIOExceptionpublic static org.fusesource.hawtbuf.Buffer toBuffer(Xid xid)
xid - Copyright © 2005–2015 The Apache Software Foundation. All rights reserved.