站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 transaction API Documentation 英文版文档

XidImpl (JBoss Transaction API) - JBoss 3.2.7 transaction API Documentation 英文版文档


org.jboss.tm
Class XidImpl

java.lang.Object
  extended byorg.jboss.tm.XidImpl
All Implemented Interfaces:
Serializable, Xid

public class XidImpl
extends Object
implements Xid, Serializable

This object encapsulates the ID of a transaction. This implementation is immutable and always serializable at runtime.

Version:
$Revision: 1.2.2.3 $
Author:
Rickard 脰berg, Ole Husgaard
See Also:
TransactionImpl, Serialized Form

Field Summary
static int JBOSS_FORMAT_ID
           
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
XidImpl(byte[] globalId, byte[] branchId, int hash)
          Create a new instance.
XidImpl(Xid xid, byte[] branchId)
          Create a new branch of an existing global transaction ID.
 
Method Summary
 boolean equals(Object obj)
          Compare for equality.
 byte[] getBranchQualifier()
          Return the branch qualifier of this transaction.
 int getFormatId()
          Return the format identifier of this transaction.
 byte[] getGlobalTransactionId()
          Return the global transaction id of this transaction.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JBOSS_FORMAT_ID

public static final int JBOSS_FORMAT_ID
See Also:
Constant Field Values
Constructor Detail

XidImpl

public XidImpl(byte[] globalId,
               byte[] branchId,
               int hash)
Create a new instance.


XidImpl

public XidImpl(Xid xid,
               byte[] branchId)
Create a new branch of an existing global transaction ID.

Parameters:
xid - The transaction ID to create a new branch of.
branchId - The ID of the new branch.
Method Detail

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Return the global transaction id of this transaction.

Specified by:
getGlobalTransactionId in interface Xid

getBranchQualifier

public byte[] getBranchQualifier()
Return the branch qualifier of this transaction.

Specified by:
getBranchQualifier in interface Xid

getFormatId

public int getFormatId()
Return the format identifier of this transaction. The format identifier augments the global id and specifies how the global id and branch qualifier should be interpreted.

Specified by:
getFormatId in interface Xid

equals

public boolean equals(Object obj)
Compare for equality. Instances are considered equal if they are both instances of XidImpl, and if they have the same global transaction id and transaction branch qualifier.


hashCode

public int hashCode()

toString

public String toString()


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.