org.objectweb.jotm.impl.core.log
Class LogWriterImpl

java.lang.Object
  |
  +--org.objectweb.jotm.impl.core.log.LogWriterImpl
All Implemented Interfaces:
LogWriter

public class LogWriterImpl
extends java.lang.Object
implements LogWriter

This is the Log Writer implementation. It uses for each transaction a single file.


Constructor Summary
LogWriterImpl()
           
 
Method Summary
 void close()
          Close log writer.
 void logAbort(BasicTransaction tx)
           
 void logAborted(BasicTransaction tx)
           
 void logAddDependency(TransactionDependency dep)
           
 void logBegin(BasicTransaction tx)
           
 void logCommit(BasicTransaction tx)
           
 void logCommitted(BasicTransaction tx)
           
 void logPrepare(BasicTransaction tx)
           
 void logPrepared(BasicTransaction tx, int vote)
           
 void logRemoveDependency(TransactionDependency dep)
           
 void logTMStart()
           
 void logTMStop()
           
 void open()
          Open log writer.
 void write(BasicTransaction tx, java.lang.String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriterImpl

public LogWriterImpl()
Method Detail

open

public void open()
          throws LogFailureException
Description copied from interface: LogWriter
Open log writer. This method initializes the log, e.g., establishes a connection to database, creates a log files, etc.

Specified by:
open in interface LogWriter
Throws:
LogFailureException - an initialization failure has occured

close

public void close()
           throws LogFailureException
Description copied from interface: LogWriter
Close log writer. This method closes the log, closes all connections, temporary files, etc.

Specified by:
close in interface LogWriter
Throws:
LogFailureException - a failure has occured

logTMStart

public void logTMStart()
                throws LogFailureException
Specified by:
logTMStart in interface LogWriter
LogFailureException

logTMStop

public void logTMStop()
               throws LogFailureException
Specified by:
logTMStop in interface LogWriter
LogFailureException

logBegin

public void logBegin(BasicTransaction tx)
              throws LogFailureException
Specified by:
logBegin in interface LogWriter
LogFailureException

logCommit

public void logCommit(BasicTransaction tx)
               throws LogFailureException
Specified by:
logCommit in interface LogWriter
LogFailureException

logCommitted

public void logCommitted(BasicTransaction tx)
                  throws LogFailureException
Specified by:
logCommitted in interface LogWriter
LogFailureException

logAbort

public void logAbort(BasicTransaction tx)
              throws LogFailureException
Specified by:
logAbort in interface LogWriter
LogFailureException

logAborted

public void logAborted(BasicTransaction tx)
                throws LogFailureException
Specified by:
logAborted in interface LogWriter
LogFailureException

logPrepare

public void logPrepare(BasicTransaction tx)
                throws LogFailureException
Specified by:
logPrepare in interface LogWriter
LogFailureException

logPrepared

public void logPrepared(BasicTransaction tx,
                        int vote)
                 throws LogFailureException
Specified by:
logPrepared in interface LogWriter
LogFailureException

logAddDependency

public void logAddDependency(TransactionDependency dep)
                      throws LogFailureException
Specified by:
logAddDependency in interface LogWriter
LogFailureException

logRemoveDependency

public void logRemoveDependency(TransactionDependency dep)
                         throws LogFailureException
Specified by:
logRemoveDependency in interface LogWriter
LogFailureException

write

public void write(BasicTransaction tx,
                  java.lang.String str)
           throws LogFailureException
LogFailureException