org.opennms.util.ilr
Class Collector

java.lang.Object
  extended by org.opennms.util.ilr.Collector

public class Collector
extends Object


Field Summary
static String SERVICE_DATA_FORMAT
           
static String SERVICE_TITLE_FORMAT
           
 
Constructor Summary
Collector()
           
 
Method Summary
 void addLog(String logMessage)
           
static String formatDuration(long millis)
           
 long getAverageCollectionTimePerService(String serviceID)
           
 int getCollectionsPerService(String serviceID)
           
 long getDuration()
           
 Date getEndTime()
           
 LogMessage getFirstValidLogMessage()
           
 String getFormattedDuration()
           
 LogMessage getLastValidLogMessage()
           
 Collection<ServiceCollector> getServiceCollectors()
           
 int getServiceCount()
           
 Set<String> getServices()
           
 Date getStartTime()
           
 int getThreadCount()
           
 long getTotalCollectionTimePerService(String serviceID)
           
 void printGlobalStats(PrintWriter out)
           
 void printReport(PrintWriter out)
           
 void printServiceHeader(PrintWriter out)
           
 void printServiceStats(String serviceID, PrintWriter out)
           
 void readLogMessagesFromFile(String fileName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE_TITLE_FORMAT

public static final String SERVICE_TITLE_FORMAT
See Also:
Constant Field Values

SERVICE_DATA_FORMAT

public static final String SERVICE_DATA_FORMAT
See Also:
Constant Field Values
Constructor Detail

Collector

public Collector()
Method Detail

addLog

public void addLog(String logMessage)

getStartTime

public Date getStartTime()

getFirstValidLogMessage

public LogMessage getFirstValidLogMessage()

getLastValidLogMessage

public LogMessage getLastValidLogMessage()

getEndTime

public Date getEndTime()

getDuration

public long getDuration()

getFormattedDuration

public String getFormattedDuration()

getServiceCount

public int getServiceCount()

getServices

public Set<String> getServices()

getServiceCollectors

public Collection<ServiceCollector> getServiceCollectors()

getThreadCount

public int getThreadCount()

getCollectionsPerService

public int getCollectionsPerService(String serviceID)

getAverageCollectionTimePerService

public long getAverageCollectionTimePerService(String serviceID)

getTotalCollectionTimePerService

public long getTotalCollectionTimePerService(String serviceID)

readLogMessagesFromFile

public void readLogMessagesFromFile(String fileName)
                             throws IOException
Throws:
IOException

printGlobalStats

public void printGlobalStats(PrintWriter out)

formatDuration

public static String formatDuration(long millis)

printServiceHeader

public void printServiceHeader(PrintWriter out)

printReport

public void printReport(PrintWriter out)

printServiceStats

public void printServiceStats(String serviceID,
                              PrintWriter out)


Copyright © 2011. All Rights Reserved.