org.apache.geronimo.transaction.log
Class HOWLLog

java.lang.Object
  extended byorg.apache.geronimo.transaction.log.HOWLLog
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle, TransactionLog

public class HOWLLog
extends Object
implements TransactionLog, org.apache.geronimo.gbean.GBeanLifecycle

Version:
$Revision: 1.6 $ $Date: 2004/07/22 03:39:01 $

Field Summary
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
 
Constructor Summary
HOWLLog(String bufferClassName, int bufferSize, boolean checksumEnabled, int flushSleepTimeMilliseconds, String logFileDir, String logFileExt, String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, org.apache.geronimo.system.serverinfo.ServerInfo serverInfo)
           
 
Method Summary
 void begin(Xid xid)
           
 void commit(Xid xid, long logMark)
           
 void doFail()
           
 void doStart()
           
 void doStop()
           
 int getAverageBytesPerForce()
           
 int getAverageForceTime()
           
 String getBufferClassName()
           
 int getBufferSizeKBytes()
           
 int getFlushSleepTimeMilliseconds()
           
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getLogFileDir()
           
 String getLogFileExt()
           
 String getLogFileName()
           
 int getMaxBlocksPerFile()
           
 int getMaxBuffers()
           
 int getMaxLogFiles()
           
 int getMinBuffers()
           
 org.apache.geronimo.system.serverinfo.ServerInfo getServerInfo()
           
 int getThreadsWaitingForceThreshold()
           
 String getXMLStats()
           
 boolean isChecksumEnabled()
           
 long prepare(Xid xid, List branches)
          log prepare for the global xid xid and the list of TransactionBranchInfo branches
 Collection recover(XidFactory xidFactory)
          Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches.
 void rollback(Xid xid, long logMark)
           
 void setBufferClassName(String bufferClassName)
           
 void setBufferSizeKBytes(int bufferSize)
           
 void setChecksumEnabled(boolean checksumOption)
           
 void setFlushSleepTimeMilliseconds(int flushSleepTime)
           
 void setLogFileDir(String logDir)
           
 void setLogFileExt(String logFileExt)
           
 void setLogFileName(String logFileName)
           
 void setMaxBlocksPerFile(int maxBlocksPerFile)
           
 void setMaxBuffers(int maxBuffers)
           
 void setMaxLogFiles(int maxLogFiles)
           
 void setMinBuffers(int minBuffers)
           
 void setThreadsWaitingForceThreshold(int threadsWaitingForceThreshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

HOWLLog

public HOWLLog(String bufferClassName,
               int bufferSize,
               boolean checksumEnabled,
               int flushSleepTimeMilliseconds,
               String logFileDir,
               String logFileExt,
               String logFileName,
               int maxBlocksPerFile,
               int maxBuffers,
               int maxLogFiles,
               int minBuffers,
               int threadsWaitingForceThreshold,
               org.apache.geronimo.system.serverinfo.ServerInfo serverInfo)
        throws IOException
Method Detail

getLogFileDir

public String getLogFileDir()

setLogFileDir

public void setLogFileDir(String logDir)

getLogFileExt

public String getLogFileExt()

setLogFileExt

public void setLogFileExt(String logFileExt)

getLogFileName

public String getLogFileName()

setLogFileName

public void setLogFileName(String logFileName)

isChecksumEnabled

public boolean isChecksumEnabled()

setChecksumEnabled

public void setChecksumEnabled(boolean checksumOption)

getBufferSizeKBytes

public int getBufferSizeKBytes()

setBufferSizeKBytes

public void setBufferSizeKBytes(int bufferSize)

getBufferClassName

public String getBufferClassName()

setBufferClassName

public void setBufferClassName(String bufferClassName)

getMaxBuffers

public int getMaxBuffers()

setMaxBuffers

public void setMaxBuffers(int maxBuffers)

getMinBuffers

public int getMinBuffers()

setMinBuffers

public void setMinBuffers(int minBuffers)

getFlushSleepTimeMilliseconds

public int getFlushSleepTimeMilliseconds()

setFlushSleepTimeMilliseconds

public void setFlushSleepTimeMilliseconds(int flushSleepTime)

getThreadsWaitingForceThreshold

public int getThreadsWaitingForceThreshold()

setThreadsWaitingForceThreshold

public void setThreadsWaitingForceThreshold(int threadsWaitingForceThreshold)

getMaxBlocksPerFile

public int getMaxBlocksPerFile()

setMaxBlocksPerFile

public void setMaxBlocksPerFile(int maxBlocksPerFile)

getMaxLogFiles

public int getMaxLogFiles()

setMaxLogFiles

public void setMaxLogFiles(int maxLogFiles)

getServerInfo

public org.apache.geronimo.system.serverinfo.ServerInfo getServerInfo()

doStart

public void doStart()
             throws org.apache.geronimo.gbean.WaitingException,
                    Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doStop

public void doStop()
            throws org.apache.geronimo.gbean.WaitingException,
                   Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Throws:
org.apache.geronimo.gbean.WaitingException
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle

begin

public void begin(Xid xid)
           throws LogException
Specified by:
begin in interface TransactionLog
Throws:
LogException

prepare

public long prepare(Xid xid,
                    List branches)
             throws LogException
Description copied from interface: TransactionLog
log prepare for the global xid xid and the list of TransactionBranchInfo branches

Specified by:
prepare in interface TransactionLog
Parameters:
xid - global xid for the transactions
branches - List of TransactionBranchInfo
Throws:
LogException

commit

public void commit(Xid xid,
                   long logMark)
            throws LogException
Specified by:
commit in interface TransactionLog
Throws:
LogException

rollback

public void rollback(Xid xid,
                     long logMark)
              throws LogException
Specified by:
rollback in interface TransactionLog
Throws:
LogException

recover

public Collection recover(XidFactory xidFactory)
                   throws LogException
Description copied from interface: TransactionLog
Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches. Uses the XidFactory to reconstruct the xids.

Specified by:
recover in interface TransactionLog
Parameters:
xidFactory -
Returns:
Map of recovered xid to List of TransactionBranchInfo representing the branches.
Throws:
LogException

getXMLStats

public String getXMLStats()
Specified by:
getXMLStats in interface TransactionLog

getAverageForceTime

public int getAverageForceTime()
Specified by:
getAverageForceTime in interface TransactionLog

getAverageBytesPerForce

public int getAverageBytesPerForce()
Specified by:
getAverageBytesPerForce in interface TransactionLog

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2003-2005 Apache Software Foundation. All Rights Reserved.