|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectetm.contrib.aggregation.log.AbstractLogAggregator
public abstract class AbstractLogAggregator
Sometimes it is important to have access to raw measurement results. This
base class wrap an existing aggregator and dumps all EtmPoints to a
certain logging implementation using a common log format. Before dumping
the measurement poin the nested aggregator Aggregator.add(etm.core.monitor.EtmPoint) method is
called.
DEFAULT_LOG_NAME
unless this name was altered using setLogName(String).
A EtmPoint will logged using the DefaultOutputFormatter. You may override
the default implementation by using setFormatter(etm.contrib.aggregation.log.LogOutputFormatter).
Due to the direct performance impact this aggregator
should be used in conjunction with a time based buffered aggregator,
such as BufferedTimedAggregator. Therefore a logging aggregator
chain should look like this: BufferedTimedAggregator -> Implementation of
AbstractLogAggregator -> (Flat/Nested)Aggregator. Be aware that
log timestamps and measurement timestamps may be out of synch due to buffering.
| Field Summary | |
|---|---|
protected EtmMonitorContext |
ctx
|
protected static java.lang.String |
DEFAULT_LOG_NAME
|
protected Aggregator |
delegate
|
protected EtmFilter |
filter
|
protected LogOutputFormatter |
formatter
|
protected java.lang.String |
logName
|
| Constructor Summary | |
|---|---|
protected |
AbstractLogAggregator(Aggregator aAggregator)
|
| Method Summary | |
|---|---|
void |
add(EtmPoint point)
Adds a new EtmPoint to the aggregator. |
void |
flush()
Flushes the current aggregation details. |
void |
init(EtmMonitorContext aCtx)
Lifecycle Method, will be called before Aggregator.start(), after initalization of
the current EtmMonitor runtime. |
protected abstract void |
logMeasurement(EtmPoint aPoint)
Logs a raw measurement result. |
void |
render(MeasurementRenderer renderer)
Renders the current state of the aggregator using the provided renderer instance. |
void |
reset()
Resets the internal aggregator state. |
void |
reset(java.lang.String symbolicName)
Resets the internal aggregator state for a etm point. |
void |
setFilterPattern(java.lang.String matchingPattern)
Adds a filter for symbolic EtmPoint names that should be logged. |
void |
setFormatter(LogOutputFormatter aFormatter)
Overrides the default log output formatter. |
void |
setFormatterClass(java.lang.Class aFormatterClazz)
|
void |
setLogName(java.lang.String aLogName)
Overrides the default logger name. |
void |
start()
Lifecycle method, will be called after all Aggregator instances are initialized by calling Aggregator.init(etm.core.monitor.EtmMonitorContext) and before the
EtmMonitor instance will becomes available. |
void |
stop()
Lifecycle method, will be called after the EtmMonitor instance was shutdown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface etm.core.aggregation.Aggregator |
|---|
getMetaData |
| Field Detail |
|---|
protected static final java.lang.String DEFAULT_LOG_NAME
protected Aggregator delegate
protected java.lang.String logName
protected LogOutputFormatter formatter
protected EtmFilter filter
protected EtmMonitorContext ctx
| Constructor Detail |
|---|
protected AbstractLogAggregator(Aggregator aAggregator)
| Method Detail |
|---|
public void setLogName(java.lang.String aLogName)
aLogName - The new name of the logger.public void setFormatter(LogOutputFormatter aFormatter)
aFormatter - A new formatter.public void setFormatterClass(java.lang.Class aFormatterClazz)
public void setFilterPattern(java.lang.String matchingPattern)
Pattern
for pattern matching. Multiple pattern may be supplied
separated by a ";". Requires JDK 1.4 or higher.
matchingPattern - One or more pattern, separated by ;RegexEtmFilterpublic void add(EtmPoint point)
Aggregator
add in interface Aggregatorpoint - A new collected EtmPoint.public void flush()
Aggregator
flush in interface Aggregatorpublic void reset()
Aggregator
reset in interface Aggregatorpublic void reset(java.lang.String symbolicName)
Aggregator
reset in interface AggregatorsymbolicName - The name of the etm point to be resetted.public void render(MeasurementRenderer renderer)
Aggregator
render in interface Aggregatorrenderer - The renderer.public void init(EtmMonitorContext aCtx)
AggregatorAggregator.start(), after initalization of
the current EtmMonitor runtime. Be aware that Plugins are instantiated, but not
started at this point.
init in interface AggregatoraCtx - The current EtmMonitor Context.public void start()
AggregatorAggregator.init(etm.core.monitor.EtmMonitorContext) and before the
EtmMonitor instance will becomes available.
start in interface Aggregatorpublic void stop()
Aggregator
stop in interface Aggregatorprotected abstract void logMeasurement(EtmPoint aPoint)
aPoint - The point to be logged.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||