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 numeric data to this report.
 void addData(MeasurementDataTrait value)
          Adds the given piece of trait data to this report.
 Set<CallTimeData> getCallTimeData()
          Returns the entire list of all call-time data items in this report.
 long getCollectionTime()
           
 long getDataCount()
          Returns the total number of data items (numeric metrics, traits, or call-time datums) in this report.
 Set<MeasurementDataNumeric> getNumericData()
          Returns the set of all numeric data items in this report.
 Set<MeasurementDataTrait> getTraitData()
          Returns the set of all trait data items in this report.
 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 numeric data to this report. Items are added to this report's list of numeric data in order. That is, the order in which you add multiple pieces of numeric 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 trait data to this report. Items are added to this report's list of trait data in order. That is, the order in which you add multiple pieces of trait data is the same order in which you get them in the list via getTraitData().

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 call-time 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 set of all numeric data items in this report. The data items are ordered in the set in the same order in which they were added.

Returns:
the list of all the numeric data items in this report

getTraitData

public Set<MeasurementDataTrait> getTraitData()
Returns the set of all trait data items in this report. The data items are ordered in the set in the same order in which they were added.

Returns:
the list of all the trait data items in this report

getCallTimeData

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

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

getDataCount

public long getDataCount()
Returns the total number of data items (numeric metrics, traits, or call-time datums) in this report.

Returns:
the total number of data items (numeric metrics, traits, or call-time datums) in this report

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-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.