etm.core.aggregation
Class BufferedTimedAggregator

java.lang.Object
  extended by etm.core.aggregation.BufferedTimedAggregator
All Implemented Interfaces:
Aggregator

public class BufferedTimedAggregator
extends java.lang.Object
implements Aggregator

The BufferedTimedAggregator buffers measurement results for a certain period of time. The default interval is 5000 miliseconds.

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

Field Summary
protected  etm.core.aggregation.BufferedTimedAggregator.UnboundedBuffer buffer
           
protected  Aggregator delegate
           
 
Constructor Summary
BufferedTimedAggregator(Aggregator aAggregator)
          Creates a BufferedTimedAggregator with default sleep interval (5000ms).
 
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 aCtx)
          Initializes current monitor .
 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 setAggregationInterval(long aAggregationInterval)
          Sets a custom sleep interval.
 void setInitialBufferSize(int aInitialBufferSize)
          Sets the initial buffer size that will be used at startup.
 void start()
          Starts the internal aggregation timer.
 void stop()
          Stops the internal aggregation timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected final Aggregator delegate

buffer

protected etm.core.aggregation.BufferedTimedAggregator.UnboundedBuffer buffer
Constructor Detail

BufferedTimedAggregator

public BufferedTimedAggregator(Aggregator aAggregator)
Creates a BufferedTimedAggregator with default sleep interval (5000ms).

Parameters:
aAggregator - The nested aggregator.
Method Detail

add

public void add(EtmPoint point)
Description copied from interface: Aggregator
Adds a new EtmPoint to the aggregator.

Specified by:
add in interface Aggregator
Parameters:
point - A new collected EtmPoint.

flush

public void flush()
Description copied from interface: Aggregator
Flushes the current aggregation details. Buffering Aggragetors should clean up their process buffer.

Specified by:
flush in interface Aggregator

reset

public void reset()
Description copied from interface: Aggregator
Resets the internal aggregator state. Persistent states usually aren't affected.

Specified by:
reset in interface Aggregator

reset

public void reset(java.lang.String symbolicName)
Description copied from interface: Aggregator
Resets the internal aggregator state for a etm point. Persistent states usually aren't affected.

Specified by:
reset in interface Aggregator
Parameters:
symbolicName - The name of the etm point to be resetted.

render

public void render(MeasurementRenderer renderer)
Description copied from interface: Aggregator
Renders the current state of the aggregator using the provided renderer instance.

Specified by:
render in interface Aggregator
Parameters:
renderer - The renderer.

init

public void init(EtmMonitorContext aCtx)
Initializes current monitor .

Specified by:
init in interface Aggregator
Parameters:
aCtx - The runtime context.

start

public void start()
Starts the internal aggregation timer.

Specified by:
start in interface Aggregator

stop

public void stop()
Stops the internal aggregation timer.

Specified by:
stop in interface Aggregator

getMetaData

public AggregatorMetaData getMetaData()
Description copied from interface: Aggregator
Returns detailed information about the aggregator chain.

Specified by:
getMetaData in interface Aggregator
Returns:
The AggregatorMetaData.

setAggregationInterval

public void setAggregationInterval(long aAggregationInterval)
Sets a custom sleep interval.

Parameters:
aAggregationInterval - The custom sleep interval in miliseconds.
Throws:
java.lang.IllegalArgumentException - Thrown for sleep interval < 10ms

setInitialBufferSize

public void setInitialBufferSize(int aInitialBufferSize)
Sets the initial buffer size that will be used at startup. You may set the buffer size to a different initial value, however the buffer size will be increased on demand.

Parameters:
aInitialBufferSize - A new inital buffer size.
Throws:
java.lang.IllegalArgumentException - Thrown for buffer sizes < 1000
Since:
1.2.1


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