Class HOWLLog
- java.lang.Object
-
- org.apache.geronimo.transaction.log.HOWLLog
-
- All Implemented Interfaces:
TransactionLog
public class HOWLLog extends java.lang.Object implements TransactionLog
-
-
Constructor Summary
Constructors Constructor Description HOWLLog(java.lang.String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, java.lang.String logFileDir, java.lang.String logFileExt, java.lang.String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, boolean flushPartialBuffers, XidFactory xidFactory, java.io.File serverBaseDir)
HOWLLog(java.lang.String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, java.lang.String logFileDir, java.lang.String logFileExt, java.lang.String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, XidFactory xidFactory, java.io.File serverBaseDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
begin(javax.transaction.xa.Xid xid)
void
commit(javax.transaction.xa.Xid xid, java.lang.Object logMark)
void
doFail()
void
doStart()
void
doStop()
int
getAverageBytesPerForce()
int
getAverageForceTime()
java.lang.String
getBufferClassName()
int
getBufferSizeKBytes()
int
getFlushSleepTimeMilliseconds()
java.lang.String
getLogFileDir()
java.lang.String
getLogFileExt()
java.lang.String
getLogFileName()
int
getMaxBlocksPerFile()
int
getMaxBuffers()
int
getMaxLogFiles()
int
getMinBuffers()
int
getThreadsWaitingForceThreshold()
java.lang.String
getXMLStats()
boolean
isAdler32ChecksumEnabled()
boolean
isChecksumEnabled()
boolean
isFlushPartialBuffers()
java.lang.Object
prepare(javax.transaction.xa.Xid xid, java.util.List<? extends TransactionBranchInfo> branches)
log prepare for the global xid xid and the list of TransactionBranchInfo branchesjava.util.Collection<Recovery.XidBranchesPair>
recover(XidFactory xidFactory)
Recovers the log, returning a map of (top level) xid to List of TransactionBranchInfo for the branches.void
rollback(javax.transaction.xa.Xid xid, java.lang.Object logMark)
void
setAdler32Checksum(boolean checksumOption)
void
setBufferClassName(java.lang.String bufferClassName)
void
setBufferSizeKBytes(int bufferSize)
void
setChecksumEnabled(boolean checksumOption)
void
setFlushPartialBuffers(boolean flushPartialBuffers)
void
setFlushSleepTimeMilliseconds(int flushSleepTime)
void
setLogFileDir(java.lang.String logDirName)
void
setLogFileExt(java.lang.String logFileExt)
void
setLogFileName(java.lang.String logFileName)
void
setMaxBlocksPerFile(int maxBlocksPerFile)
void
setMaxBuffers(int maxBuffers)
void
setMaxLogFiles(int maxLogFiles)
void
setMinBuffers(int minBuffers)
void
setThreadsWaitingForceThreshold(int threadsWaitingForceThreshold)
-
-
-
Constructor Detail
-
HOWLLog
public HOWLLog(java.lang.String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, java.lang.String logFileDir, java.lang.String logFileExt, java.lang.String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, XidFactory xidFactory, java.io.File serverBaseDir) throws java.io.IOException, org.objectweb.howl.log.LogConfigurationException
- Throws:
java.io.IOException
org.objectweb.howl.log.LogConfigurationException
-
HOWLLog
public HOWLLog(java.lang.String bufferClassName, int bufferSize, boolean checksumEnabled, boolean adler32Checksum, int flushSleepTimeMilliseconds, java.lang.String logFileDir, java.lang.String logFileExt, java.lang.String logFileName, int maxBlocksPerFile, int maxBuffers, int maxLogFiles, int minBuffers, int threadsWaitingForceThreshold, boolean flushPartialBuffers, XidFactory xidFactory, java.io.File serverBaseDir) throws java.io.IOException, org.objectweb.howl.log.LogConfigurationException
- Throws:
java.io.IOException
org.objectweb.howl.log.LogConfigurationException
-
-
Method Detail
-
getLogFileDir
public java.lang.String getLogFileDir()
-
setLogFileDir
public void setLogFileDir(java.lang.String logDirName)
-
getLogFileExt
public java.lang.String getLogFileExt()
-
setLogFileExt
public void setLogFileExt(java.lang.String logFileExt)
-
getLogFileName
public java.lang.String getLogFileName()
-
setLogFileName
public void setLogFileName(java.lang.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 java.lang.String getBufferClassName()
-
setBufferClassName
public void setBufferClassName(java.lang.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 java.lang.Exception
- Throws:
java.lang.Exception
-
doStop
public void doStop() throws java.lang.Exception
- Throws:
java.lang.Exception
-
doFail
public void doFail()
-
begin
public void begin(javax.transaction.xa.Xid xid) throws LogException
- Specified by:
begin
in interfaceTransactionLog
- Throws:
LogException
-
prepare
public java.lang.Object prepare(javax.transaction.xa.Xid xid, java.util.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 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
public void commit(javax.transaction.xa.Xid xid, java.lang.Object logMark) throws LogException
- Specified by:
commit
in interfaceTransactionLog
- Throws:
LogException
-
rollback
public void rollback(javax.transaction.xa.Xid xid, java.lang.Object logMark) throws LogException
- Specified by:
rollback
in interfaceTransactionLog
- Throws:
LogException
-
recover
public java.util.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 interfaceTransactionLog
- Parameters:
xidFactory
- Xid factory- Returns:
- Map of recovered xid to List of TransactionBranchInfo representing the branches.
- Throws:
LogException
- on error
-
getXMLStats
public java.lang.String getXMLStats()
- Specified by:
getXMLStats
in interfaceTransactionLog
-
getAverageForceTime
public int getAverageForceTime()
- Specified by:
getAverageForceTime
in interfaceTransactionLog
-
getAverageBytesPerForce
public int getAverageBytesPerForce()
- Specified by:
getAverageBytesPerForce
in interfaceTransactionLog
-
-