org.slim3.transaction.jta
Class XidImpl

java.lang.Object
  extended by org.slim3.transaction.jta.XidImpl
All Implemented Interfaces:
Serializable, Xid

public class XidImpl
extends Object
implements Xid, Serializable

An implementation class for Xid.

Since:
3.0
Author:
higa
See Also:
Serialized Form

Field Summary
protected  int bid
          The internal branch identifier.
protected  byte[] branchId
          The branch identifier.
static int FORMAT_ID
          The format identifier.
protected  int gid
          The internal global identifier.
protected  byte[] globalId
          The global identifier.
protected static byte[] INITIAL_BRANCH_ID
          The initial branch identifier.
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
XidImpl(int gid)
          Constructor.
XidImpl(int gid, int bid)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
protected static byte[] fillBytes(byte[] bytes)
          Fills the array of bytes for 64 bytes.
 byte[] getBranchQualifier()
           
 int getFormatId()
           
 byte[] getGlobalTransactionId()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_ID

public static final int FORMAT_ID
The format identifier.

See Also:
Constant Field Values

INITIAL_BRANCH_ID

protected static final byte[] INITIAL_BRANCH_ID
The initial branch identifier.


gid

protected int gid
The internal global identifier.


bid

protected int bid
The internal branch identifier.


globalId

protected byte[] globalId
The global identifier.


branchId

protected byte[] branchId
The branch identifier.

Constructor Detail

XidImpl

public XidImpl(int gid)
Constructor.

Parameters:
gid - the internal global identifier

XidImpl

public XidImpl(int gid,
               int bid)
Constructor.

Parameters:
gid - the internal global identifier
bid - the internal branch identifier
Method Detail

fillBytes

protected static byte[] fillBytes(byte[] bytes)
Fills the array of bytes for 64 bytes.

Parameters:
bytes - the array of bytes
Returns:
the filled result

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Specified by:
getGlobalTransactionId in interface Xid

getBranchQualifier

public byte[] getBranchQualifier()
Specified by:
getBranchQualifier in interface Xid

getFormatId

public int getFormatId()
Specified by:
getFormatId in interface Xid

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2009 The Slim3 project. All Rights Reserved.