Class PingSourceManager

  extended by com.aelitis.azureus.core.speedmanager.impl.v2.PingSourceManager

public class PingSourceManager
extends java.lang.Object

This class manage cycling though the PingSources. It keep track of PingSource stats and applies rules on if/when to cycle though a ping-source. #1) If the slowest ping-source is 10x the the best for a 1 min average. kick it. #2) If a ping-source is slower then two combined sources (2x) for a 5 min average. then kick it. #3) Every 30 minutes kick the slowest ping source and request a new one. Just to keep things fresh. Also maintain logic do determine if a new source is better then the previous one. (To determine if these rules lead to good data.)

Constructor Summary
Method Summary
 void addPingTime(SpeedManagerPingSource source)
 void checkPingSources(SpeedManagerPingSource[] sources)
          Determine if we should drop any ping sources.
 void pingSourceFailed(SpeedManagerPingSource source)
 void pingSourceFound(SpeedManagerPingSource source, boolean is_replacement)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public PingSourceManager()
Method Detail


public void checkPingSources(SpeedManagerPingSource[] sources)
Determine if we should drop any ping sources. Sort them, if one significantly higher then the other two. then drop it.

sources - - SpeedManagerPingSource[] inputs


public void pingSourceFound(SpeedManagerPingSource source,
                            boolean is_replacement)


public void pingSourceFailed(SpeedManagerPingSource source)


public void addPingTime(SpeedManagerPingSource source)