

Classes | |
| class | StatsData |
Public Member Functions | |
| FileStatistics (String folder) | |
| synchronized void | recvLogs (int[] nums, int secs) |
| void | close () |
| void | totalData (TotalStatsData d) |
| void | run () |
Private Member Functions | |
| String | generateRecvLogsHdr () |
| String | generateTotLogsHdr () |
Private Attributes | |
| final int | WRITE_TOT_INTERVAL = 10 |
| boolean | terminateThread = false |
| final FileHelper | recvLogsFile |
| final FileHelper | totLogsStatsFile |
| final StatsData | totData = new StatsData() |
Write the statistics on a set of files.
The number of logs per interval are immediately written on file. The total numbers instead are written by the thread.
| alma::acs::logtools::monitor::file::FileStatistics::FileStatistics | ( | String | folder | ) | [inline] |
constructor
| folder | The folder to write files into |
References generateRecvLogsHdr(), generateTotLogsHdr(), recvLogsFile, and totLogsStatsFile.
| void alma::acs::logtools::monitor::file::FileStatistics::close | ( | ) | [inline] |
Close the computation and frees the resources
References alma::acs::logtools::monitor::file::FileHelper::close(), recvLogsFile, terminateThread, and totLogsStatsFile.
Referenced by alma::acs::logtools::monitor::LogMonitor::close().
| String alma::acs::logtools::monitor::file::FileStatistics::generateRecvLogsHdr | ( | ) | [inline, private] |
| String alma::acs::logtools::monitor::file::FileStatistics::generateTotLogsHdr | ( | ) | [inline, private] |
| synchronized void alma::acs::logtools::monitor::file::FileStatistics::recvLogs | ( | int[] | nums, | |
| int | secs | |||
| ) | [inline] |
Notified every time interval about the number of logs of each type received during the interval.
The numbers are immediately written on file.
Implements alma::acs::logtools::monitor::LogNumbersListener.
References alma::acs::logtools::monitor::file::FileHelper::put(), and recvLogsFile.
| void alma::acs::logtools::monitor::file::FileStatistics::run | ( | ) | [inline] |
The thread to write total values on file
References alma::acs::logtools::monitor::file::FileStatistics::StatsData::formatString(), alma::acs::logtools::monitor::file::FileHelper::put(), terminateThread, totData, totLogsStatsFile, and WRITE_TOT_INTERVAL.
| void alma::acs::logtools::monitor::file::FileStatistics::totalData | ( | TotalStatsData | d | ) | [inline] |
Notify the listener about the total number of logs read since the application started.
| d | The total number of logs read since the application started |
Implements alma::acs::logtools::monitor::LogNumbersListener.
References totData, and alma::acs::logtools::monitor::TotalStatsData::updateAll().
The file to write the logs receives for each time interval
Referenced by close(), FileStatistics(), and recvLogs().
boolean alma::acs::logtools::monitor::file::FileStatistics::terminateThread = false [private] |
final StatsData alma::acs::logtools::monitor::file::FileStatistics::totData = new StatsData() [private] |
The values of the totals numbers
Referenced by run(), and totalData().
The file to write the statistics about the logs received since the application started.
Referenced by close(), FileStatistics(), and run().
final int alma::acs::logtools::monitor::file::FileStatistics::WRITE_TOT_INTERVAL = 10 [private] |
The interval of time (sec) between writing of total numbers
Referenced by run().
1.6.2