net.sourceforge.jtds.jdbcx
Class JtdsXid
java.lang.Object
net.sourceforge.jtds.jdbcx.JtdsXid
- Xid
public class JtdsXid
extends java.lang.Object
implements Xid
jTDS implementation of the Xid
interface.
$Id: JtdsXid.java,v 1.3 2005/04/28 14:29:30 alin_sinpalean Exp $static int | XID_SIZE - The size of an XID in bytes.
|
private byte[] | bqual - The branch qualifier ID.
|
int | fmtId - The format ID.
|
private byte[] | gtran - The global transaction ID.
|
int | hash - Precalculated hash value.
|
JtdsXid(Xid xid) - Construct an XID as a clone of another XID.
|
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.
|
XID_SIZE
public static final int XID_SIZE
The size of an XID in bytes.
bqual
private final byte[] bqual
The branch qualifier ID.
fmtId
public final int fmtId
The format ID.
gtran
private final byte[] gtran
The global transaction ID.
hash
public int hash
Precalculated hash value.
JtdsXid
public JtdsXid(Xid xid)
Construct an XID as a clone of another XID.
JtdsXid
public JtdsXid(byte[] global,
byte[] branch)
Construct an XID using two byte arrays.
global
- the global transaction idbranch
- the transaction branch
JtdsXid
public JtdsXid(byte[] buf,
int pos)
Construct an XID using an offset into a byte buffer.
buf
- the byte bufferpos
- the offset
calculateHash
private void calculateHash()
equals
public boolean equals(Object obj)
Test for equality.
obj
- the object to test for equality with this
boolean
true if the parameter equals this
getBranchQualifier
public byte[] getBranchQualifier()
getFormatId
public int getFormatId()
getGlobalTransactionId
public byte[] getGlobalTransactionId()
hashCode
public int hashCode()
Get the hash code for this object.
- the hash value of this object as a
int
toString
public String toString()
Generated on June 12 2008