com.caucho.transaction.xalog
Class XALogManager

java.lang.Object
  extended by com.caucho.transaction.xalog.AbstractXALogManager
      extended by com.caucho.transaction.xalog.XALogManager
All Implemented Interfaces:
ThreadTask, java.lang.Runnable

public class XALogManager
extends AbstractXALogManager
implements ThreadTask

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


Constructor Summary
XALogManager()
          Creates the log.
 
Method Summary
 void close()
          Closes the log manager.
 void flush()
          Returns a stream for a new transaction.
 XALogStream getStream()
          Returns a stream for a new transaction.
 boolean hasCommittedXid(XidImpl xid)
          True if the xid is an already-committed xid
 void init()
          Initialize the log manager.
 void run()
          Updates the waiting flush.
 void setMaxFileSize(Bytes size)
          Sets the max file size.
 void setPath(Path path)
          Adds a log path.
 void start()
          Starts the log manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XALogManager

public XALogManager()
Creates the log.

Method Detail

setMaxFileSize

public void setMaxFileSize(Bytes size)
Sets the max file size.


setPath

public void setPath(Path path)
             throws java.io.IOException
Adds a log path.

Specified by:
setPath in class AbstractXALogManager
Throws:
java.io.IOException

init

public void init()
Initialize the log manager.

Specified by:
init in class AbstractXALogManager

start

public void start()
           throws java.io.IOException
Starts the log manager.

Specified by:
start in class AbstractXALogManager
Throws:
java.io.IOException

hasCommittedXid

public boolean hasCommittedXid(XidImpl xid)
True if the xid is an already-committed xid

Specified by:
hasCommittedXid in class AbstractXALogManager

getStream

public XALogStream getStream()
Returns a stream for a new transaction.

Specified by:
getStream in class AbstractXALogManager

flush

public void flush()
Returns a stream for a new transaction.

Specified by:
flush in class AbstractXALogManager

run

public void run()
Updates the waiting flush.

Specified by:
run in interface ThreadTask
Specified by:
run in interface java.lang.Runnable

close

public void close()
Closes the log manager.

Specified by:
close in class AbstractXALogManager