|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ca.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 lengthMethod Detail |
---|
protected java.lang.Object get(java.lang.reflect.Field f) throws java.lang.IllegalAccessException
get
in class NativeObject
f
- 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.Xid
public byte[] getGlobalTransactionId()
getGlobalTransactionId
in interface javax.transaction.xa.Xid
public byte[] getBranchQualifier()
getBranchQualifier
in interface javax.transaction.xa.Xid
public java.lang.String toString()
toString
in class java.lang.Object
public int length(NativeFormat fmt)
length
in interface Native
length
in class NativeObject
fmt
- 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 Native
readNative
in class NativeObject
in
- the native buffered input stream.
java.io.IOException
- if an IO error occurspublic void writeNative(NativeDataOutputStream out) throws java.io.IOException
writeNative
in interface Native
writeNative
in class NativeObject
out
- 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 |