com.limegroup.gnutella.statistics
Class NumericalStatistic

java.lang.Object
  extended bycom.limegroup.gnutella.statistics.AbstractStatistic
      extended bycom.limegroup.gnutella.statistics.NumericalStatistic
All Implemented Interfaces:
Statistic
Direct Known Subclasses:
NumericalDownloadStat

public abstract class NumericalStatistic
extends AbstractStatistic

Specialized statistics class that just records numerical statistics, i.e. statistics that are not time-based.


Field Summary
 
Fields inherited from class com.limegroup.gnutella.statistics.AbstractStatistic
_buffer, _current, _fileName, _max, _total, _totalStatsRecorded, STATS_MANAGER
 
Fields inherited from interface com.limegroup.gnutella.statistics.Statistic
HISTORY_LENGTH
 
Constructor Summary
protected NumericalStatistic()
          Adds the statistic to the list of numerical statistics.
 
Method Summary
 void addData(int data)
          Overridden to actually write the data as a field in our buffer, as opposed to waiting for some time-based event to write.
 
Methods inherited from class com.limegroup.gnutella.statistics.AbstractStatistic
clearData, getAverage, getMax, getStatHistory, getTotal, incrementStat, initializeBuffer, setWriteStatToFile, storeCurrentStat
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumericalStatistic

protected NumericalStatistic()
Adds the statistic to the list of numerical statistics.

Method Detail

addData

public void addData(int data)
Overridden to actually write the data as a field in our buffer, as opposed to waiting for some time-based event to write.

Specified by:
addData in interface Statistic
Overrides:
addData in class AbstractStatistic