com.caucho.transaction.xalog
Class XALogStream

java.lang.Object
  extended by com.caucho.transaction.xalog.AbstractXALogStream
      extended by com.caucho.transaction.xalog.XALogStream

public class XALogStream
extends AbstractXALogStream

Implements a single log stream. Each log stream has two associated files in order to switch at the end of the file.


Field Summary
static int LOG_HEADER_BEGIN
           
static int LOG_HEADER_END
           
static int RA_DATA_END
           
static int RA_DATA_PART
           
static int TM_COMMIT
           
static int TM_FINISH
           
 
Method Summary
 boolean isFlushing()
          Returns true if the stream is flushing.
 void readRecord(ReadStream is, int code)
          Reads a record.
 void readXid(ReadStream is, XidImpl xid)
          Reads a record.
 void writeTMCommit(XidImpl xid)
          Writes a commit entry to the log file.
 void writeTMFinish(XidImpl xid)
          Writes a finish entry to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_HEADER_BEGIN

public static final int LOG_HEADER_BEGIN
See Also:
Constant Field Values

LOG_HEADER_END

public static final int LOG_HEADER_END
See Also:
Constant Field Values

TM_COMMIT

public static final int TM_COMMIT
See Also:
Constant Field Values

TM_FINISH

public static final int TM_FINISH
See Also:
Constant Field Values

RA_DATA_PART

public static final int RA_DATA_PART
See Also:
Constant Field Values

RA_DATA_END

public static final int RA_DATA_END
See Also:
Constant Field Values
Method Detail

readRecord

public void readRecord(ReadStream is,
                       int code)
                throws java.io.IOException
Reads a record.

Throws:
java.io.IOException

readXid

public void readXid(ReadStream is,
                    XidImpl xid)
             throws java.io.IOException
Reads a record.

Throws:
java.io.IOException

isFlushing

public boolean isFlushing()
Returns true if the stream is flushing.


writeTMCommit

public void writeTMCommit(XidImpl xid)
Writes a commit entry to the log file.

Specified by:
writeTMCommit in class AbstractXALogStream

writeTMFinish

public void writeTMFinish(XidImpl xid)
Writes a finish entry to the log file.

Specified by:
writeTMFinish in class AbstractXALogStream