public class FileStatistics extends java.lang.Thread implements LogNumbersListener
The number of logs per interval are immediately written on file. The total numbers instead are written by the thread.
| Constructor and Description |
|---|
FileStatistics(java.lang.String folder)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the computation and frees the resources
|
void |
recvLogs(int[] nums,
int secs)
Notified every time interval about the number of
logs of each type received during the interval.
|
void |
run()
The thread to write total values on file
|
void |
totalData(TotalStatsData d)
Notify the listener about the total number of logs
read since the application started.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic FileStatistics(java.lang.String folder)
folder - The folder to write files intopublic void recvLogs(int[] nums,
int secs)
The numbers are immediately written on file.
recvLogs in interface LogNumbersListenernums - The number of logsLogNumbersListener.recvLogs(int[], int)public void close()
public void totalData(TotalStatsData d)
totalData in interface LogNumbersListenerd - The total number of logs read since the application startedLogNumbersListenerpublic void run()
run in interface java.lang.Runnablerun in class java.lang.Thread