|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tyrex.tm.xid.XidUtils
Utility class for creating transaction identifiers, importing Xid objects, and converting a transaction identifier to/from a string representation.
Field Summary | |
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. |
Constructor Summary | |
XidUtils()
|
Method Summary | |
static javax.transaction.xa.Xid |
importXid(int formatId,
byte[] global,
byte[] branch)
Imports a transaction identifier. |
static javax.transaction.xa.Xid |
importXid(javax.transaction.xa.Xid xid)
Imports a transaction identifier. |
static boolean |
isBranch(javax.transaction.xa.Xid xid)
Returns true if the transaction identifier represents a branch transaction. |
static boolean |
isGlobal(javax.transaction.xa.Xid xid)
Returns true if the transaction identifier represents a global transaction. |
static boolean |
isLocal(javax.transaction.xa.Xid xid)
Returns true if the transaction identifier represents a local transaction. |
static javax.transaction.xa.Xid |
newBranch(javax.transaction.xa.Xid xid)
Creates a new transaction branch. |
static javax.transaction.xa.Xid |
newGlobal()
Create a new global transaction identifier. |
static javax.transaction.xa.Xid |
newLocal()
Create a new local transaction identifier. |
static javax.transaction.xa.Xid |
parse(java.lang.String identifier)
Constructs a transaction identifier from a string representation. |
static java.lang.String |
toString(javax.transaction.xa.Xid xid)
Converts an Xid into a string representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String XID_PREFIX
public static final int FORMAT_ID
protected static final byte[] EMPTY_ARRAY
protected static final char[] HEX_DIGITS
Constructor Detail |
public XidUtils()
Method Detail |
public static javax.transaction.xa.Xid newLocal()
public static javax.transaction.xa.Xid newGlobal()
public static javax.transaction.xa.Xid importXid(javax.transaction.xa.Xid xid)
xid
- An existing transaction identifier
public static javax.transaction.xa.Xid importXid(int formatId, byte[] global, byte[] branch)
formatId
- The format identifierglobal
- The global transaction identifierbranch
- The branch qualifier
public static javax.transaction.xa.Xid newBranch(javax.transaction.xa.Xid xid)
xid
- An existing transaction identifier
public static boolean isLocal(javax.transaction.xa.Xid xid)
xid
- A transaction identifier
public static boolean isGlobal(javax.transaction.xa.Xid xid)
xid
- A transaction identifier
public static boolean isBranch(javax.transaction.xa.Xid xid)
xid
- A transaction identifier
public static java.lang.String toString(javax.transaction.xa.Xid xid)
xid
- A transaction identifier
public static javax.transaction.xa.Xid parse(java.lang.String identifier) throws InvalidXidException
identifier
- The transaction identifier
InvalidXidException
- The indentifier is invalid
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |