alma::acs::logtools::monitor::file::FileStatistics Class Reference

Inheritance diagram for alma::acs::logtools::monitor::file::FileStatistics:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logtools::monitor::file::FileStatistics:
Collaboration graph
[legend]

List of all members.

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()

Detailed Description

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.

Author:
acaproni
Since:
ACS 8.1.0

Constructor & Destructor Documentation

alma::acs::logtools::monitor::file::FileStatistics::FileStatistics ( String  folder  )  [inline]

constructor

Parameters:
folder The folder to write files into

References generateRecvLogsHdr(), generateTotLogsHdr(), recvLogsFile, and totLogsStatsFile.


Member Function Documentation

void alma::acs::logtools::monitor::file::FileStatistics::close (  )  [inline]
String alma::acs::logtools::monitor::file::FileStatistics::generateRecvLogsHdr (  )  [inline, private]

Generate the header string for the received logs

Returns:

Referenced by FileStatistics().

String alma::acs::logtools::monitor::file::FileStatistics::generateTotLogsHdr (  )  [inline, private]

Generate the header string for the received logs

Returns:

Referenced by FileStatistics().

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.

See also:
alma.acs.logtools.monitor.LogNumbersListener::recvLogs(int[], int)

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]
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.

Parameters:
d The total number of logs read since the application started
See also:
LogNumbersListener

Implements alma::acs::logtools::monitor::LogNumbersListener.

References totData, and alma::acs::logtools::monitor::TotalStatsData::updateAll().


Member Data Documentation

The file to write the logs receives for each time interval

Referenced by close(), FileStatistics(), and recvLogs().

signal the thread to terminate

Referenced by close(), and run().

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().

The interval of time (sec) between writing of total numbers

Referenced by run().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2