Class HOWLLog

java.lang.Object
org.apache.geronimo.transaction.log.HOWLLog
All Implemented Interfaces:
TransactionLog

public class HOWLLog extends Object implements TransactionLog
  • Constructor Details

    • HOWLLog

      public HOWLLog(String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, String logFileDir, String logFileExt, String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, XidFactory xidFactory, File serverBaseDir) throws IOException, org.objectweb.howl.log.LogConfigurationException
      Throws:
      IOException
      org.objectweb.howl.log.LogConfigurationException
    • HOWLLog

      public HOWLLog(String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, String logFileDir, String logFileExt, String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, boolean flushPartialBuffers, XidFactory xidFactory, File serverBaseDir) throws IOException, org.objectweb.howl.log.LogConfigurationException
      Throws:
      IOException
      org.objectweb.howl.log.LogConfigurationException
  • Method Details

    • getLogFileDir

      public String getLogFileDir()
    • setLogFileDir

      public void setLogFileDir(String logDirName)
    • 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)
    • isAdler32ChecksumEnabled

      public boolean isAdler32ChecksumEnabled()
    • setAdler32Checksum

      public void setAdler32Checksum(boolean checksumOption)
    • getBufferSizeKBytes

      public int getBufferSizeKBytes()
    • setBufferSizeKBytes

      public void setBufferSizeKBytes(int bufferSize) throws org.objectweb.howl.log.LogConfigurationException
      Throws:
      org.objectweb.howl.log.LogConfigurationException
    • getBufferClassName

      public String getBufferClassName()
    • setBufferClassName

      public void setBufferClassName(String bufferClassName)
    • getMaxBuffers

      public int getMaxBuffers()
    • setMaxBuffers

      public void setMaxBuffers(int maxBuffers) throws org.objectweb.howl.log.LogConfigurationException
      Throws:
      org.objectweb.howl.log.LogConfigurationException
    • getMinBuffers

      public int getMinBuffers()
    • setMinBuffers

      public void setMinBuffers(int minBuffers) throws org.objectweb.howl.log.LogConfigurationException
      Throws:
      org.objectweb.howl.log.LogConfigurationException
    • 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)
    • isFlushPartialBuffers

      public boolean isFlushPartialBuffers()
    • setFlushPartialBuffers

      public void setFlushPartialBuffers(boolean flushPartialBuffers)
    • doStart

      public void doStart() throws Exception
      Throws:
      Exception
    • doStop

      public void doStop() throws Exception
      Throws:
      Exception
    • doFail

      public void doFail()
    • begin

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

      public Object prepare(Xid xid, List<? extends TransactionBranchInfo> 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
      Returns:
      log mark to use in commit/rollback calls.
      Throws:
      LogException - on error
    • commit

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

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

      public Collection<Recovery.XidBranchesPair> 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 - Xid factory
      Returns:
      Map of recovered xid to List of TransactionBranchInfo representing the branches.
      Throws:
      LogException - on error
    • 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