etm.core.aggregation
Interface Aggregator

All Known Implementing Classes:
AbstractLogAggregator, BufferedThresholdAggregator, BufferedTimedAggregator, CommonsLoggingAggregator, FlatAggregator, Jdk14LogAggregator, Log4jAggregator, NestedAggregator, NotifyingAggregator, PersistentRootAggregator, RootAggregator, SimpleTreeModelAggregator

public interface Aggregator

An EtmMonitor uses a instance of Aggregator to collect and aggregate measurement results. In order to provide multiple aggregation and collection features at the same time aggregator instance may wrap other aggregators.

Usually there is no need to synchronize shared ressources within a aggregator instance unless the aggregator uses internal threads which also access the data structures used within the aggregator methods.

See EtmMonitor for further synchronization details.

Custom Aggregator implementations need to provide an empty default constructor or a constructor taking an Aggregator instance as argument. Be aware that the last aggregator in an aggregator chains needs to have an default empty constructor, every other aggregator needs to provide an constructor taking the aggregator argument.

Version:
$Revision: 109 $
Author:
void.fm

Method Summary
 void add(EtmPoint point)
          Adds a new EtmPoint to the aggregator.
 void flush()
          Flushes the current aggregation details.
 AggregatorMetaData getMetaData()
          Returns detailed information about the aggregator chain.
 void init(EtmMonitorContext ctx)
          Lifecycle Method, will be called before start(), after initalization of the current EtmMonitor runtime.
 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 start()
          Lifecycle method, will be called after all Aggregator instances are initialized by calling 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.
 

Method Detail

add

void add(EtmPoint point)
Adds a new EtmPoint to the aggregator.

Parameters:
point - A new collected EtmPoint.

flush

void flush()
Flushes the current aggregation details. Buffering Aggragetors should clean up their process buffer.


reset

void reset()
Resets the internal aggregator state. Persistent states usually aren't affected.


reset

void reset(java.lang.String symbolicName)
Resets the internal aggregator state for a etm point. Persistent states usually aren't affected.

Parameters:
symbolicName - The name of the etm point to be resetted.

render

void render(MeasurementRenderer renderer)
Renders the current state of the aggregator using the provided renderer instance.

Parameters:
renderer - The renderer.

getMetaData

AggregatorMetaData getMetaData()
Returns detailed information about the aggregator chain.

Returns:
The AggregatorMetaData.

init

void init(EtmMonitorContext ctx)
Lifecycle Method, will be called before start(), after initalization of the current EtmMonitor runtime. Be aware that Plugins are instantiated, but not started at this point.

Parameters:
ctx - The current EtmMonitor Context.
Since:
1.2.0

start

void start()
Lifecycle method, will be called after all Aggregator instances are initialized by calling init(etm.core.monitor.EtmMonitorContext) and before the EtmMonitor instance will becomes available.


stop

void stop()
Lifecycle method, will be called after the EtmMonitor instance was shutdown.



Copyright © 2004,2005, 2006, 2007 void.fm. All Rights Reserved.