Class HOWLLog
java.lang.Object
org.apache.geronimo.transaction.log.HOWLLog
- All Implemented Interfaces:
TransactionLog
-
Constructor Summary
ConstructorsConstructorDescriptionHOWLLog(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) 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) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoiddoFail()voiddoStart()voiddoStop()intintintintintintintintintbooleanbooleanbooleanprepare(Xid xid, List<? extends TransactionBranchInfo> branches) log prepare for the global xid xid and the list of TransactionBranchInfo branchesrecover(XidFactory xidFactory) Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches.voidvoidsetAdler32Checksum(boolean checksumOption) voidsetBufferClassName(String bufferClassName) voidsetBufferSizeKBytes(int bufferSize) voidsetChecksumEnabled(boolean checksumOption) voidsetFlushPartialBuffers(boolean flushPartialBuffers) voidsetFlushSleepTimeMilliseconds(int flushSleepTime) voidsetLogFileDir(String logDirName) voidsetLogFileExt(String logFileExt) voidsetLogFileName(String logFileName) voidsetMaxBlocksPerFile(int maxBlocksPerFile) voidsetMaxBuffers(int maxBuffers) voidsetMaxLogFiles(int maxLogFiles) voidsetMinBuffers(int minBuffers) voidsetThreadsWaitingForceThreshold(int threadsWaitingForceThreshold)
-
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:
IOExceptionorg.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:
IOExceptionorg.objectweb.howl.log.LogConfigurationException
-
-
Method Details
-
getLogFileDir
-
setLogFileDir
-
getLogFileExt
-
setLogFileExt
-
getLogFileName
-
setLogFileName
-
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
-
setBufferClassName
-
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
- Throws:
Exception
-
doStop
- Throws:
Exception
-
doFail
public void doFail() -
begin
- Specified by:
beginin interfaceTransactionLog- Throws:
LogException
-
prepare
Description copied from interface:TransactionLoglog prepare for the global xid xid and the list of TransactionBranchInfo branches- Specified by:
preparein interfaceTransactionLog- Parameters:
xid- global xid for the transactionsbranches- List of TransactionBranchInfo- Returns:
- log mark to use in commit/rollback calls.
- Throws:
LogException- on error
-
commit
- Specified by:
commitin interfaceTransactionLog- Throws:
LogException
-
rollback
- Specified by:
rollbackin interfaceTransactionLog- Throws:
LogException
-
recover
Description copied from interface:TransactionLogRecovers 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:
recoverin interfaceTransactionLog- Parameters:
xidFactory- Xid factory- Returns:
- Map of recovered xid to List of TransactionBranchInfo representing the branches.
- Throws:
LogException- on error
-
getXMLStats
- Specified by:
getXMLStatsin interfaceTransactionLog
-
getAverageForceTime
public int getAverageForceTime()- Specified by:
getAverageForceTimein interfaceTransactionLog
-
getAverageBytesPerForce
public int getAverageBytesPerForce()- Specified by:
getAverageBytesPerForcein interfaceTransactionLog
-