tyrex.tm.xid
Class BaseXid
java.lang.Object
|
+--tyrex.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 |
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 |
XID_PREFIX
public static final java.lang.String XID_PREFIX
- Prefix for textual identifier.
FORMAT_ID
public static final int FORMAT_ID
- Format identifier for all internal Xids or newly created Xids.
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.
BaseXid
public BaseXid()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
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)
Intalio Inc. (C) 1999-2001. All rights reserved.