|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.activemq.message.ActiveMQXid
A ActiveMQXid
object holds the distributed
transaction id that is passed around in an ActiveMQ system.
Eventhough a Transaction Manager (TM) has his own Xid implementation that he uses when he talks to the our ActiveMQXAResource, we need to send the Xid data down to the server in our format.
ActiveMQ uses Strings as the transaction id. This class coverts an Xid to and from a string.
Xid
,
Serialized FormField Summary |
Fields inherited from interface javax.transaction.xa.Xid |
MAXBQUALSIZE, MAXGTRIDSIZE |
Constructor Summary | |
ActiveMQXid()
This constructor is only used for serialization |
|
ActiveMQXid(int formatId,
byte[] branchQualifier,
byte[] globalTransactionId)
|
|
ActiveMQXid(java.lang.String txid)
Creates a new ActiveMQXid object. |
|
ActiveMQXid(Xid xid)
Creates a new ActiveMQXid object with the Xid data contained in xid |
Method Summary | |
protected int |
compareTo(byte[] left,
byte[] right)
|
int |
compareTo(java.lang.Object object)
|
boolean |
equals(ActiveMQXid that)
|
protected boolean |
equals(byte[] left,
byte[] right)
|
boolean |
equals(java.lang.Object that)
|
static ActiveMQXid |
fromBytes(byte[] data)
Deserializes the data into an Xid |
byte[] |
getBranchQualifier()
|
int |
getFormatId()
|
byte[] |
getGlobalTransactionId()
|
protected int |
hash(byte[] bytes,
int hash)
|
int |
hashCode()
|
static ActiveMQXid |
read(java.io.DataInput dataIn)
Reads the Xid from a stream |
protected static byte[] |
readBytes(java.io.DataInput dataIn)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
readState(java.io.DataInput dataIn)
|
byte[] |
toBytes()
|
java.lang.String |
toLocalTransactionId()
|
java.lang.String |
toString()
|
void |
write(java.io.DataOutput dataOut)
Writes the Xid to a stream |
protected void |
writeBytes(java.io.DataOutput dataOut,
byte[] data)
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ActiveMQXid()
public ActiveMQXid(Xid xid)
xid
public ActiveMQXid(int formatId, byte[] branchQualifier, byte[] globalTransactionId)
public ActiveMQXid(java.lang.String txid) throws JMSException
Method Detail |
public static ActiveMQXid fromBytes(byte[] data) throws java.io.IOException
data
-
java.io.IOException
public int hashCode()
public boolean equals(java.lang.Object that)
public boolean equals(ActiveMQXid that)
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
public java.lang.String toLocalTransactionId()
public byte[] getBranchQualifier()
getBranchQualifier
in interface Xid
Xid.getBranchQualifier()
public int getFormatId()
getFormatId
in interface Xid
Xid.getFormatId()
public byte[] getGlobalTransactionId()
getGlobalTransactionId
in interface Xid
Xid.getGlobalTransactionId()
public java.lang.String toString()
Object.toString()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void readState(java.io.DataInput dataIn) throws java.io.IOException
java.io.IOException
public static ActiveMQXid read(java.io.DataInput dataIn) throws java.io.IOException
dataIn
-
java.io.IOException
public byte[] toBytes() throws java.io.IOException
java.io.IOException
public void write(java.io.DataOutput dataOut) throws java.io.IOException
dataOut
-
java.io.IOException
protected void writeBytes(java.io.DataOutput dataOut, byte[] data) throws java.io.IOException
java.io.IOException
protected static byte[] readBytes(java.io.DataInput dataIn) throws java.io.IOException
java.io.IOException
protected boolean equals(byte[] left, byte[] right)
protected int compareTo(byte[] left, byte[] right)
protected int hash(byte[] bytes, int hash)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |