Package net.i2p.stat
Class RateAverages
- java.lang.Object
- 
- net.i2p.stat.RateAverages
 
- 
 public class RateAverages extends Object Storage space for computations of various averages.- Since:
- 0.9.4
- Author:
- zab
 
- 
- 
Constructor SummaryConstructors Constructor Description RateAverages()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAverage()doublegetCurrent()doublegetLast()static RateAveragesgetTemp()longgetTotalEventCount()doublegetTotalValues()(package private) voidreset()(package private) voidsetAverage(double average)(package private) voidsetCurrent(double current)(package private) voidsetLast(double last)(package private) voidsetTotalEventCount(long totalEventCount)(package private) voidsetTotalValues(double totalValues)
 
- 
- 
- 
Method Detail- 
getTemppublic static RateAverages getTemp() - Returns:
- thread-local temp instance.
- Since:
- 0.9.4
 
 - 
resetvoid reset() 
 - 
getAveragepublic double getAverage() - Returns:
- one of several things: if there are any events (current or last) => weighted average otherwise if the useLifetime parameter to Rate.computeAverages was: true => the lifetime average value false => zero
- Since:
- 0.9.4
 
 - 
setAveragevoid setAverage(double average) 
 - 
getCurrentpublic double getCurrent() - Returns:
- the current average == current value / current event count
- Since:
- 0.9.4
 
 - 
setCurrentvoid setCurrent(double current) 
 - 
getLastpublic double getLast() - Returns:
- the last average == last value / last event count
- Since:
- 0.9.4
 
 - 
setLastvoid setLast(double last) 
 - 
getTotalEventCountpublic long getTotalEventCount() - Returns:
- the total event count == current + last event counts
- Since:
- 0.9.4
 
 - 
setTotalEventCountvoid setTotalEventCount(long totalEventCount) 
 - 
getTotalValuespublic double getTotalValues() - Returns:
- the total values == current + last values
- Since:
- 0.9.4
 
 - 
setTotalValuesvoid setTotalValues(double totalValues) 
 
- 
 
-