org.rhq.core.domain.measurement
Class MeasurementReport

java.lang.Object
  extended by org.rhq.core.domain.measurement.MeasurementReport
All Implemented Interfaces:
Externalizable, Serializable

public class MeasurementReport
extends Object
implements Externalizable

A report of measurement information. When a plugin collects measurement data that is emitted from a monitored resource, it will store that measurement data in an instance of this type.

This report has an optimized serialization strategy.

See Also:
Serialized Form

Constructor Summary
MeasurementReport()
           
 
Method Summary
 void addData(CallTimeData data)
          Adds the given call-time data to this report.
 void addData(MeasurementDataNumeric value)
          Adds the given piece of measurement data to this report.
 void addData(MeasurementDataTrait value)
          Adds the given piece of measurement data to this report.
 Set<CallTimeData> getCallTimeData()
          Returns the entire list of all call-time data stored in this report.
 long getCollectionTime()
           
 long getDataCount()
           
 Set<MeasurementDataNumeric> getNumericData()
          Returns the entire list of all measurement data (i.e. numeric metrics or traits) stored in this report.
 Set<MeasurementDataTrait> getTraitData()
           
 void incrementCollectionTime(long collectionTime)
           
 void readExternal(ObjectInput in)
           
 void setCollectionTime(long collectionTime)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeasurementReport

public MeasurementReport()
Method Detail

addData

public void addData(MeasurementDataNumeric value)
Adds the given piece of measurement data to this report. Items are added to this report's list of data in order. That is, the order in which you add multiple pieces of measurement data is the same order in which you get them in the list via getNumericData().

Parameters:
value - the measurement data to be added

addData

public void addData(MeasurementDataTrait value)
Adds the given piece of measurement data to this report. Items are added to this report's list of data in order. That is, the order in which you add multiple pieces of measurement data is the same order in which you get them in the list via getNumericData().

Parameters:
value - the measurement data to be added

addData

public void addData(CallTimeData data)
Adds the given call-time data to this report. Items are added to this report's list of data in order. That is, the order in which you add multiple pieces of call-time data is the same order in which you get them in the list via getCallTimeData().

Parameters:
data - the call-time data to be added

getNumericData

public Set<MeasurementDataNumeric> getNumericData()
Returns the entire list of all measurement data (i.e. numeric metrics or traits) stored in this report. The data items are ordered in the list by the order in which they were

Returns:
the list of all the measurement data in this report

getTraitData

public Set<MeasurementDataTrait> getTraitData()

getCallTimeData

@NotNull
public Set<CallTimeData> getCallTimeData()
Returns the entire list of all call-time data stored in this report. The data items are ordered in the list by the order in which they were added.

Returns:
the list of all the call-time data in this report

getDataCount

public long getDataCount()

getCollectionTime

public long getCollectionTime()

setCollectionTime

public void setCollectionTime(long collectionTime)

incrementCollectionTime

public void incrementCollectionTime(long collectionTime)

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 2008 RHQ Project Advisory Board (Red Hat, Inc. and Hyperic, Inc.). All Rights Reserved.