Class NetworkAdminSpeedTestScheduledTestImpl.SpeedTestDownloadState
java.lang.Object
com.biglybt.core.networkmanager.admin.impl.NetworkAdminSpeedTestScheduledTestImpl.SpeedTestDownloadState
- All Implemented Interfaces:
ParameterListener, DownloadManagerListener
- Enclosing class:
NetworkAdminSpeedTestScheduledTestImpl
class NetworkAdminSpeedTestScheduledTestImpl.SpeedTestDownloadState
extends Object
implements ParameterListener, DownloadManagerListener
Preservers the state of all the downloads before the speed test started.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddownloadAdded(Download download) voiddownloadRemoved(Download download) private Download[]Get all the Download keys in this Map.private intgetDownloadDetails(Download d, String param) Get the upload or download limit for this Download object before the test started.voidparameterChanged(String name) Called, when a parameter has changed.private voidCall this method after a speed test completes to restore the global limits.private voidCall this method after the speed test is completed to restore the individual download limits before the test started.voidprivate voidGet the global limits from the TransferSpeedValidator class.voidprivate voidsetDownloadDetails(Download d, int uploadLimit, int downloadLimit) Save the upload/download limits of this Download object before the test started.
-
Field Details
-
torrentLimits
-
TORRENT_UPLOAD_LIMIT
- See Also:
-
TORRENT_DOWNLOAD_LIMIT
- See Also:
-
maxUploadKbs
long maxUploadKbs -
maxUploadSeedingKbs
long maxUploadSeedingKbs -
maxDownloadKbs
long maxDownloadKbs -
autoSpeedEnabled
boolean autoSpeedEnabled -
autoSpeedSeedingEnabled
boolean autoSpeedSeedingEnabled -
LANSpeedEnabled
boolean LANSpeedEnabled
-
-
Constructor Details
-
SpeedTestDownloadState
public SpeedTestDownloadState()
-
-
Method Details
-
parameterChanged
Description copied from interface:ParameterListenerCalled, when a parameter has changed. The listener could only react if the parameter name is relevant. Or the listener can just read all parameters again.- Specified by:
parameterChangedin interfaceParameterListener- Parameters:
name- the name of the parameter that has changed
-
downloadAdded
- Specified by:
downloadAddedin interfaceDownloadManagerListener
-
downloadRemoved
- Specified by:
downloadRemovedin interfaceDownloadManagerListener
-
saveLimits
public void saveLimits() -
restoreLimits
public void restoreLimits() -
saveGlobalLimits
private void saveGlobalLimits()Get the global limits from the TransferSpeedValidator class. Call before starting a speed test. -
restoreGlobalLimits
private void restoreGlobalLimits()Call this method after a speed test completes to restore the global limits. -
restoreIndividualLimits
private void restoreIndividualLimits()Call this method after the speed test is completed to restore the individual download limits before the test started. -
setDownloadDetails
Save the upload/download limits of this Download object before the test started.- Parameters:
d- - DownloaduploadLimit- - intdownloadLimit- - int
-
getDownloadDetails
-
getAllDownloads
-