org.ow2.clif.datacollector.lib
Class AbstractProbeDataCollector

java.lang.Object
  extended by org.ow2.clif.datacollector.lib.AbstractDataCollector
      extended by org.ow2.clif.datacollector.lib.AbstractProbeDataCollector
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, DataCollectorAdmin, DataCollectorWrite
Direct Known Subclasses:
DataCollector, DataCollector, DataCollector, DataCollector, DataCollector, DataCollector, DataCollector

public abstract class AbstractProbeDataCollector
extends AbstractDataCollector

Data collector generic implementation computing statistical values for probes generating ProbeEvent-derived events.

Author:
Bruno Dillenseger

Field Summary
protected  long samples
           
protected  long[] stats
           
 
Fields inherited from class org.ow2.clif.datacollector.lib.AbstractDataCollector
sws
 
Fields inherited from interface org.ow2.clif.datacollector.api.DataCollectorWrite
DATA_COLLECTOR_WRITE
 
Fields inherited from interface org.ow2.clif.datacollector.api.DataCollectorAdmin
DATA_COLLECTOR_ADMIN
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
AbstractProbeDataCollector()
           
 
Method Summary
 void add(ProbeEvent measure)
          new measure available => call super class' add() method and compute statistics
 long[] getStat()
          Get statistics computed since previous call (or initialization for 1st call)
 void init(java.io.Serializable testId, java.lang.String probeId)
          new test initialization => call super class' init() method and resets all statistics, including the cumulative ones
 
Methods inherited from class org.ow2.clif.datacollector.lib.AbstractDataCollector
add, add, add, bindFc, getFcState, listFc, lookupFc, setFilter, startFc, stopFc, terminate, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ow2.clif.datacollector.api.DataCollectorAdmin
getLabels
 

Field Detail

stats

protected long[] stats

samples

protected long samples
Constructor Detail

AbstractProbeDataCollector

public AbstractProbeDataCollector()
Method Detail

init

public void init(java.io.Serializable testId,
                 java.lang.String probeId)
new test initialization => call super class' init() method and resets all statistics, including the cumulative ones

Specified by:
init in interface DataCollectorWrite
Overrides:
init in class AbstractDataCollector
Parameters:
testId - test identifier
probeId - blade identifier

add

public void add(ProbeEvent measure)
new measure available => call super class' add() method and compute statistics

Specified by:
add in interface DataCollectorWrite
Overrides:
add in class AbstractDataCollector
Parameters:
measure - the new measure

getStat

public long[] getStat()
Get statistics computed since previous call (or initialization for 1st call)

Returns:
the latest blade statistics in the form of an array of integer values.
See Also:
DataCollectorAdmin.getLabels()