tyrex.tm.xid
Class BaseXid

java.lang.Object
  extended bytyrex.tm.xid.BaseXid
All Implemented Interfaces:
javax.transaction.xa.Xid
Direct Known Subclasses:
BranchXid, ExternalXid, GlobalXid, LocalXid

public abstract class BaseXid
extends java.lang.Object
implements javax.transaction.xa.Xid

Base implementation for all xids used by Tyrex (local, global, branch and external). All xids have a string representation in the form xid:-[][-].

Version:
$Revision: 1.2 $
Author:
Assaf Arkin

Field Summary
protected  java.lang.String _string
          The textual representation of the transaction identifier.
protected static byte[] EMPTY_ARRAY
          The default branch is always an empty byte array.
static int FORMAT_ID
          Format identifier for all internal Xids or newly created Xids.
protected static char[] HEX_DIGITS
          Efficient mapping from 4 bit value to lower case hexadecimal digit.
static java.lang.String XID_PREFIX
          Prefix for textual identifier.
 
Fields inherited from interface javax.transaction.xa.Xid
MAXBQUALSIZE, MAXGTRIDSIZE
 
Constructor Summary
BaseXid()
           
 
Method Summary
protected static char[] createPrefix(int formatId)
           
 int hashCode()
           
abstract  javax.transaction.xa.Xid newBranch()
          Creates a new transaction branch.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.transaction.xa.Xid
getBranchQualifier, getFormatId, getGlobalTransactionId
 

Field Detail

XID_PREFIX

public static final java.lang.String XID_PREFIX
Prefix for textual identifier.

See Also:
Constant Field Values

FORMAT_ID

public static final int FORMAT_ID
Format identifier for all internal Xids or newly created Xids.

See Also:
Constant Field Values

EMPTY_ARRAY

protected static final byte[] EMPTY_ARRAY
The default branch is always an empty byte array.


HEX_DIGITS

protected static final char[] HEX_DIGITS
Efficient mapping from 4 bit value to lower case hexadecimal digit.


_string

protected java.lang.String _string
The textual representation of the transaction identifier.

Constructor Detail

BaseXid

public BaseXid()
Method Detail

toString

public java.lang.String toString()

hashCode

public int hashCode()

newBranch

public abstract javax.transaction.xa.Xid newBranch()
Creates a new transaction branch. A transaction branch has the same format and global transaction identifier as this transaction identifier, but a new unique branch qualifier (never empty).

Returns:
A new transaction branch

createPrefix

protected static final char[] createPrefix(int formatId)


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.