com.aelitis.azureus.core.speedmanager.impl.v2
Class PingSourceStats

java.lang.Object
  extended by com.aelitis.azureus.core.speedmanager.impl.v2.PingSourceStats

public class PingSourceStats
extends Object

Keeps the ping time stats for a single source. Should calculate averages for the data.


Constructor Summary
PingSourceStats(SpeedManagerPingSource _source)
           
 
Method Summary
 void addPingTime(int ping)
           
 Average getHistory()
          Get the average that should be used for checking ping times.
 Average getLongTermAve()
          Get the long-term average.
 int getTrend()
          Speculative method to see if it can determine a trend.
 void madeChange()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PingSourceStats

public PingSourceStats(SpeedManagerPingSource _source)
Method Detail

madeChange

public void madeChange()

addPingTime

public void addPingTime(int ping)

getTrend

public int getTrend()
Speculative method to see if it can determine a trend. The larger the number the stronger the trend.

Returns:
current - interger. A positive number is an increasing trend. A negative number is a decreasing trend.

getLongTermAve

public Average getLongTermAve()
Get the long-term average.

Returns:
Average - longTerm

getHistory

public Average getHistory()
Get the average that should be used for checking ping times.

Returns:
- ping time of history.