public class JtdsXid
extends java.lang.Object
implements javax.transaction.xa.Xid
Xid interface.| Modifier and Type | Field and Description |
|---|---|
private byte[] |
bqual
The branch qualifier ID.
|
int |
fmtId
The format ID.
|
private byte[] |
gtran
The global transaction ID.
|
int |
hash
Precalculated hash value.
|
static int |
XID_SIZE
The size of an XID in bytes.
|
| Constructor and Description |
|---|
JtdsXid(byte[] global,
byte[] branch)
Construct an XID using two byte arrays.
|
JtdsXid(byte[] buf,
int pos)
Construct an XID using an offset into a byte buffer.
|
JtdsXid(javax.transaction.xa.Xid xid)
Construct an XID as a clone of another XID.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
calculateHash() |
boolean |
equals(java.lang.Object obj)
Test for equality.
|
byte[] |
getBranchQualifier() |
int |
getFormatId() |
byte[] |
getGlobalTransactionId() |
int |
hashCode()
Get the hash code for this object.
|
java.lang.String |
toString() |
public static final int XID_SIZE
private final byte[] gtran
private final byte[] bqual
public final int fmtId
public int hash
public JtdsXid(byte[] buf,
int pos)
buf - the byte bufferpos - the offsetpublic JtdsXid(byte[] global,
byte[] branch)
global - the global transaction idbranch - the transaction branchpublic JtdsXid(javax.transaction.xa.Xid xid)
private void calculateHash()
public int hashCode()
hashCode in class java.lang.Objectintpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test for equality with thisboolean true if the parameter equals thispublic int getFormatId()
getFormatId in interface javax.transaction.xa.Xidpublic byte[] getBranchQualifier()
getBranchQualifier in interface javax.transaction.xa.Xidpublic byte[] getGlobalTransactionId()
getGlobalTransactionId in interface javax.transaction.xa.Xidpublic java.lang.String toString()
toString in class java.lang.ObjectGenerated on June 8 2013