edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer
Class AggregateStatisticsObject

java.lang.Object
  |
  +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
        |
        +--edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
              |
              +--edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.StatisticsObject
                    |
                    +--edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.AggregateStatisticsObject
Direct Known Subclasses:
AggregateDifference, TimeSpentEvaluatingRulesTotal

public abstract class AggregateStatisticsObject
extends StatisticsObject

Extends the StatisticsObject to provide support for aggregate values of the statistic. This also computes mean, min, and max values. Statistics that wish to make use of this functionality should derive from this class instead of StatisticsObject directly.

Statistics that calculate totals all at once (like THROUGHPUT or TOTAL_TUPLES_IN_QUEUES) should derive from this class. Statistics that want an aggregate, but only report their values in increments (NUMBER_OF_TUPLES_DEQUEUED_TOTAL) should derive from AggregateDiffernce. getPropertyValue() returns the total for the statistic. For example, the TreeOutputRateCalculator will want to keep track of how the output rate has changed over time.

See Also:
Serialized Form

Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
stats, statsPresent
 
Constructor Summary
AggregateStatisticsObject()
          MultiValueStatisticsObject constructor comment.
AggregateStatisticsObject(java.lang.String name, XATQueryObject queryObject)
          MultiValueStatisticsObject constructor comment.
 
Method Summary
 double getMaxValue()
          Insert the method's description here.
 double getMinValue()
          Insert the method's description here.
 java.lang.String getMostRecent()
          Insert the method's description here.
 double getPropertyValueMean()
          Returns the mean of the statistic.
 void setMostRecent(java.lang.String newMostRecent)
          Insert the method's description here.
 void setPropertyValue(java.lang.String newPropertyValue)
          Sets the property value.
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.StatisticsObject
calculateNewValue, calculateNewValue, compareTo, equals, getAssociatedQueryObject, getCategory, getPropertyName, getPropertyValue, setAssociatedQueryObject, setCategory, setPropertyName, toString
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObjectImp
addStatistic, getStatistics, isValidStatistic, setDefaultProperties, setDefaultStatistics
 
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATPropertiesImp
addProperty, getProperties, getProperty, isValidPropertyName, setNewPropertyValue, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AggregateStatisticsObject

public AggregateStatisticsObject()
MultiValueStatisticsObject constructor comment.

AggregateStatisticsObject

public AggregateStatisticsObject(java.lang.String name,
                                 XATQueryObject queryObject)
MultiValueStatisticsObject constructor comment.
Parameters:
name - java.lang.String
queryObject - edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject
Method Detail

getMaxValue

public double getMaxValue()
Insert the method's description here. Creation date: (4/2/2003 5:38:40 PM)
Returns:
double

getMinValue

public double getMinValue()
Insert the method's description here. Creation date: (4/2/2003 5:38:40 PM)
Returns:
double

getMostRecent

public java.lang.String getMostRecent()
Insert the method's description here. Creation date: (4/18/2003 1:03:25 AM)
Returns:
java.lang.String

getPropertyValueMean

public double getPropertyValueMean()
Returns the mean of the statistic. This is only relevant for statistics that are aggregates where the property value represents a running sum. Otherwise, this value returned will be meaningless.
Returns:
java.lang.Object

setMostRecent

public void setMostRecent(java.lang.String newMostRecent)
Insert the method's description here. Creation date: (4/18/2003 1:03:25 AM)
Parameters:
newMostRecent - java.lang.String

setPropertyValue

public void setPropertyValue(java.lang.String newPropertyValue)
Sets the property value. For AggregateStatisticsObjects, this method will calculate the new weighed mean and set the value to what was passed in. This assumes the newly passed in value represents the total property value and not the difference from when it was calculated previously.

For example, the THROUGHPUT calculator will report how many tuples the tree has outputted in total, not just how many were outputted since the last time it ran. OTOH, the NUMBER_OF_TUPLES_OUTPUTTED calculator will report how many tuples have been outputted since it last ran. Therefore, that calculator should derive from AggregateDifference

Overrides:
setPropertyValue in class StatisticsObject
Parameters:
newPropertyValue - java.lang.String