|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.flatfile.logs.DataBlockUtilLogger
public class DataBlockUtilLogger
Add logs to logger, which is invoked. Logs are like event listeners which conform to same interface as logger.
| Method Summary | |
|---|---|
void |
addLog(DataBlockUtilLog log)
Add a log that conforms to DataBlockUtilLog interface. |
void |
clearLogs()
Clear all logs from the logger. |
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. |
static DataBlockUtilLogger |
getLogger()
Static access to singleton log. |
java.util.List<DataBlockUtilLog> |
getLogs()
Returns an unmodifiable list of logs attached to logger. |
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. |
java.lang.String |
toString()
Uses the default log. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static DataBlockUtilLogger getLogger()
Static access to singleton log.
public void clearLogs()
Clear all logs from the logger. Will need to manually add logs if want, including the aggregate in-memory log.
public void addLog(DataBlockUtilLog log)
Add a log that conforms to DataBlockUtilLog interface.
log - public java.util.List<DataBlockUtilLog> getLogs()
Returns an unmodifiable list of logs attached to logger.
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 logSetStarted(BigHash hash)
Log start of a set request.
logSetStarted in interface DataBlockUtilLoghash - 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 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 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 void close()
throws java.lang.Exception
Close off resources associated with this log.
close in interface DataBlockUtilLogjava.lang.Exceptionpublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||