com.limegroup.gnutella
Class BandwidthTrackerImpl
java.lang.Object
com.limegroup.gnutella.BandwidthTrackerImpl
- Direct Known Subclasses:
- HTTPUploadSession
public class BandwidthTrackerImpl
- extends Object
A helper class for implementing the BandwidthTracker interface
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BandwidthTrackerImpl
public BandwidthTrackerImpl()
measureBandwidth
public void measureBandwidth(long amountRead)
- Measures the data throughput since the last call to measureBandwidth,
assuming this has read amountRead bytes. This value can be read by
calling getMeasuredBandwidth.
- Parameters:
amountRead - the cumulative amount read from this, in BYTES.
Should be larger than the argument passed in the last call to
measureBandwidth(..).
getMeasuredBandwidth
public float getMeasuredBandwidth()
throws InsufficientDataException
- Throws:
InsufficientDataException- See Also:
BandwidthTracker.getMeasuredBandwidth()
getAverageBandwidth
public float getAverageBandwidth()
- Returns the average overall bandwidth consumed.
Copyright © 2009. All Rights Reserved.