|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.idms.io.TraceObject
ca.idms.io.NativeObject
ca.idms.io.NativeBase
ca.idms.xa.IdmsXid
public class IdmsXid
CA IDMS Xid implementation.
An IdmsXid contains logic to write itself to a NativeDataOutputStream
and read itself from a NativeDataInputStream. An IdmsXid is constructed
from the Xid passed by the XA transaction and used to send the native format
XID to IDMS. Native format XIDs returned by IDMS for recover requests are used to
construct IdmsXid objects which are passed to the XA transaction manager.
Native format (32 bit long, 8 bit char), from xa.h:
struct xid_t {
long formatID; // format identifier
long gtrid_length; // value from 1 through 64
long bqual_length; // value from 1 through 64
char data[128];
}
| Field Summary | |
|---|---|
static int |
LENGTH
Max length of the XID |
| Fields inherited from class ca.idms.io.NativeBase |
|---|
options, READ_BOTH, SET_LENGTH |
| Fields inherited from class ca.idms.io.NativeObject |
|---|
buffer, length, offset |
| Fields inherited from class ca.idms.io.TraceObject |
|---|
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE |
| Fields inherited from interface javax.transaction.xa.Xid |
|---|
MAXBQUALSIZE, MAXGTRIDSIZE |
| Constructor Summary | |
|---|---|
IdmsXid()
Creates an object to read a Native XID. |
|
IdmsXid(int len)
Creates an object to read and write a Native XID buffer. |
|
IdmsXid(javax.transaction.xa.Xid xid)
Creates an object to write a Native XID. |
|
| Method Summary | |
|---|---|
protected java.lang.Object |
get(java.lang.reflect.Field f)
Overrides the default get method to allow the default snap method access to the value of a non-public variable. |
byte[] |
getBranchQualifier()
|
int |
getFormatId()
|
byte[] |
getGlobalTransactionId()
|
int |
length(NativeFormat fmt)
Computes the size of the native form of the object. |
void |
readNative(NativeDataInputStream in)
Reads data from an input stream, interpreted as an XID. |
java.lang.String |
toString()
|
void |
writeNative(NativeDataOutputStream out)
Writes the contents of this object to an output stream in the native XID format. |
| Methods inherited from class ca.idms.io.NativeBase |
|---|
getOptions, length, readBuffer, setOptions, writeBuffer |
| Methods inherited from class ca.idms.io.NativeObject |
|---|
getBuffer, getClient, getOffset, length, snap |
| Methods inherited from class ca.idms.io.TraceObject |
|---|
finalize, getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LENGTH
| Constructor Detail |
|---|
public IdmsXid()
public IdmsXid(javax.transaction.xa.Xid xid)
xid - XID from transaction managerpublic IdmsXid(int len)
len - buffer length| Method Detail |
|---|
protected java.lang.Object get(java.lang.reflect.Field f)
throws java.lang.IllegalAccessException
get in class NativeObjectf - a Field returned by Class.getDeclaredFields
java.lang.IllegalAccessException - should not
really happen, but Field.get requires itTraceObject.snap,
TraceObject.snap()public int getFormatId()
getFormatId in interface javax.transaction.xa.Xidpublic byte[] getGlobalTransactionId()
getGlobalTransactionId in interface javax.transaction.xa.Xidpublic byte[] getBranchQualifier()
getBranchQualifier in interface javax.transaction.xa.Xidpublic java.lang.String toString()
toString in class java.lang.Objectpublic int length(NativeFormat fmt)
length in interface Nativelength in class NativeObjectfmt - the NativeFormat object or null.
NativeBase.length(ca.idms.io.NativeFormat, int, int, int)
public void readNative(NativeDataInputStream in)
throws java.io.IOException
readNative in interface NativereadNative in class NativeObjectin - the native buffered input stream.
java.io.IOException - if an IO error occurs
public void writeNative(NativeDataOutputStream out)
throws java.io.IOException
writeNative in interface NativewriteNative in class NativeObjectout - the native buffered output stream.
java.io.IOException - if an IO error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||