|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.flatfile.logs.DiskBackedTransactionLog
public class DiskBackedTransactionLog
Logs every transaction. Useful for stress testing, but will negatively impact performance due to transaction writes.
| Constructor Summary | |
|---|---|
DiskBackedTransactionLog(java.io.File logFile)
|
|
| Method Summary | |
|---|---|
void |
close()
Close off resources associated with this log. |
long |
getBlockGetFailures()
Uses the default log. |
long |
getBlockGetSuccesses()
Uses the default log. |
long |
getBlockSetFailures()
Uses the default log. |
long |
getBlockSetSuccesses()
Uses the default log. |
java.io.File |
getLogFile()
Return the file used by the log. |
long |
getRuntime()
Uses the default log. |
long |
getTimeSpentMerging()
Uses the default log. |
void |
logGetBlockFailed(BigHash hash)
Log failed get request. |
void |
logGetBlockSucceed(BigHash hash)
Log successful get request. |
void |
logGetStarted(BigHash hash)
Log start of a get request. |
void |
logHasFalse(BigHash hash)
Log does not have a chunk. |
void |
logHasStarted(BigHash hash)
Log the start of a has chunk activity. |
void |
logHasTrue(BigHash hash)
Log has a chunk. |
void |
logMergeFinish(java.io.File datablock)
Log stop of merge. |
void |
logMergeStart(java.io.File datablock)
Log start of merge. |
void |
logSetBlockFailed(BigHash hash)
Log failed set request. |
void |
logSetBlockSucceed(BigHash hash)
Log successful set request. |
void |
logSetStarted(BigHash hash)
Log start of a set request. |
void |
restart()
Reset resources. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DiskBackedTransactionLog(java.io.File logFile)
throws java.lang.Exception
logFile -
java.lang.Exception| Method Detail |
|---|
public void restart()
throws java.lang.Exception
Reset resources.
java.lang.Exceptionpublic java.io.File getLogFile()
Return the file used by the log.
public void logMergeStart(java.io.File datablock)
Log start of merge.
logMergeStart in interface DataBlockUtilLogdatablock - public void logMergeFinish(java.io.File datablock)
Log stop of merge.
logMergeFinish in interface DataBlockUtilLogdatablock - public void logHasStarted(BigHash hash)
Log the start of a has chunk activity.
logHasStarted in interface DataBlockUtilLoghash - public void logHasTrue(BigHash hash)
Log has a chunk.
logHasTrue in interface DataBlockUtilLoghash - public void logHasFalse(BigHash hash)
Log does not have a chunk.
logHasFalse in interface DataBlockUtilLoghash - public void logGetStarted(BigHash hash)
Log start of a get request.
logGetStarted in interface DataBlockUtilLoghash - public void logGetBlockSucceed(BigHash hash)
Log successful get request.
logGetBlockSucceed in interface DataBlockUtilLoghash - public void logGetBlockFailed(BigHash hash)
Log failed get request.
logGetBlockFailed in interface DataBlockUtilLoghash - public void logSetStarted(BigHash hash)
Log start of a set request.
logSetStarted in interface DataBlockUtilLoghash - public void logSetBlockSucceed(BigHash hash)
Log successful set request.
logSetBlockSucceed in interface DataBlockUtilLoghash - public void logSetBlockFailed(BigHash hash)
Log failed set request.
logSetBlockFailed in interface DataBlockUtilLoghash - public long getTimeSpentMerging()
Uses the default log. For more information, call logs directly.
getTimeSpentMerging in interface DataBlockUtilLogpublic long getRuntime()
Uses the default log. For more information, call logs directly.
getRuntime in interface DataBlockUtilLogpublic java.lang.String toString()
toString in interface DataBlockUtilLogtoString in class java.lang.Objectpublic long getBlockGetSuccesses()
Uses the default log. For more information, call logs directly.
getBlockGetSuccesses in interface DataBlockUtilLogpublic long getBlockGetFailures()
Uses the default log. For more information, call logs directly.
getBlockGetFailures in interface DataBlockUtilLogpublic long getBlockSetSuccesses()
Uses the default log. For more information, call logs directly.
getBlockSetSuccesses in interface DataBlockUtilLogpublic long getBlockSetFailures()
Uses the default log. For more information, call logs directly.
getBlockSetFailures in interface DataBlockUtilLog
public void close()
throws java.lang.Exception
Close off resources associated with this log.
close in interface DataBlockUtilLogjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||