Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.drda
Class DRDAXid  view DRDAXid download DRDAXid.java

java.lang.Object
  extended byorg.apache.derby.impl.drda.DRDAXid
All Implemented Interfaces:
javax.transaction.xa.Xid

class DRDAXid
extends java.lang.Object
implements javax.transaction.xa.Xid


Field Summary
private  byte[] branch_id
           
private  int format_id
           
private  byte[] global_id
           
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
(package private) DRDAXid(int formatid, byte[] globalid, byte[] branchid)
           
 
Method Summary
private static java.lang.String convertToHexString(byte[] buf)
          convert byte array to a Hex string
 byte[] getBranchQualifier()
          Obtain the transaction branch qualifier part of the Xid in a byte array.
 int getFormatId()
          Obtain the format id part of the Xid.
 byte[] getGlobalTransactionId()
          Obtain the global transaction identifier part of XID as an array of bytes.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

format_id

private final int format_id

global_id

private final byte[] global_id

branch_id

private final byte[] branch_id
Constructor Detail

DRDAXid

DRDAXid(int formatid,
        byte[] globalid,
        byte[] branchid)
Method Detail

getFormatId

public int getFormatId()
Obtain the format id part of the Xid.

Specified by:
getFormatId in interface javax.transaction.xa.Xid

getGlobalTransactionId

public byte[] getGlobalTransactionId()
Obtain the global transaction identifier part of XID as an array of bytes.

Specified by:
getGlobalTransactionId in interface javax.transaction.xa.Xid

getBranchQualifier

public byte[] getBranchQualifier()
Obtain the transaction branch qualifier part of the Xid in a byte array.

Specified by:
getBranchQualifier in interface javax.transaction.xa.Xid

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


convertToHexString

private static java.lang.String convertToHexString(byte[] buf)
convert byte array to a Hex string