example.aggregation
Class AverageObserver

java.lang.Object
  extended by example.aggregation.AverageObserver
All Implemented Interfaces:
Control

public class AverageObserver
extends java.lang.Object
implements Control

Print statistics for an average aggregation computation. Statistics printed are defined by IncrementalStats.toString()


Parameter Summary
accuracy
          Config parameter that determines the accuracy for standard deviation before stopping the simulation.
protocol
          The protocol to operate on.
 
Constructor Summary
AverageObserver(java.lang.String name)
          Creates a new observer reading configuration parameters.
 
Method Summary
 boolean execute()
          Print statistics for an average aggregation computation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

accuracy

Config parameter that determines the accuracy for standard deviation before stopping the simulation. If not defined, a negative value is used which makes sure the observer does not stop the simulation


protocol

The protocol to operate on.

Constructor Detail

AverageObserver

public AverageObserver(java.lang.String name)
Creates a new observer reading configuration parameters.

Method Detail

execute

public boolean execute()
Print statistics for an average aggregation computation. Statistics printed are defined by IncrementalStats.toString(). The current timestamp is also printed as a first field.

Specified by:
execute in interface Control
Returns:
if the standard deviation is less than the given "accuracy".