org.apache.commons.monitoring.reporting
Class SelectorPeriodicLogger
java.lang.Object
java.util.TimerTask
org.apache.commons.monitoring.reporting.AbstractPeriodicLogger
org.apache.commons.monitoring.reporting.SelectorPeriodicLogger
- All Implemented Interfaces:
- java.lang.Runnable
public abstract class SelectorPeriodicLogger
- extends AbstractPeriodicLogger
A periodic logger implementation that uses a set of selector to extract
monitoring datas to log.
Typical use case is to produce a fixed format (CSV, Excel-like, tabular...)
in a log file, with a new line for each period.
- Author:
- Nicolas De Loof
|
Method Summary |
protected abstract void |
log(java.lang.Object[] values)
Log the data extracted by selectors |
protected void |
log(SecondaryRepository period)
Log the data from the (secondary) repository generated during the period |
| Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectorPeriodicLogger
public SelectorPeriodicLogger(int period,
java.util.Date firstTime,
Repository.Observable repository,
java.util.List<java.lang.String> selectors)
- Parameters:
period - the period (in ms) to log the monitoring statefirstTime - the first time to log (may be null)repository - the observed repositoryoutput - the output file
SelectorPeriodicLogger
public SelectorPeriodicLogger(int period,
java.util.Date firstTime,
Repository.Observable repository,
java.lang.String[] selectors)
- Parameters:
period - the period (in ms) to log the monitoring staterepository - the target monitoring repositoryoutput - the output file
log
protected final void log(SecondaryRepository period)
throws java.io.IOException
- Log the data from the (secondary) repository generated during the period
- Specified by:
log in class AbstractPeriodicLogger
- Parameters:
period - secondary repository that observed the monitored state
during the last active period
- Throws:
java.io.IOException
log
protected abstract void log(java.lang.Object[] values)
throws java.io.IOException
- Log the data extracted by selectors
- Parameters:
values - the data to log
- Throws:
java.io.IOException - any I/O error during log
Copyright © 2008 The Apache Software Foundation. All Rights Reserved.