Class TransferSpeedValidator
java.lang.Object
com.biglybt.core.config.impl.TransferSpeedValidator
Provides validation for transfer speed settings
- Since:
- 1.4
- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static booleanstatic final String(package private) static booleanstatic final Stringstatic final String[]private final Stringprivate final longstatic final String(package private) static booleanstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionTransferSpeedValidator(String configKey, long value) Creates a TransferSpeedValidator with the given configuration key and value -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic Stringstatic longlonggetValue()Validates the given configuration key/value pair and returns the validated valuestatic booleanstatic booleanisAutoUploadAvailable(Core core) static voidsetGlobalDownloadRateLimitBytesPerSecond(long bytes_per_second) private static longGets the transformed value as an Integer
-
Field Details
-
AUTO_UPLOAD_ENABLED_CONFIGKEY
- See Also:
-
AUTO_UPLOAD_SEEDING_ENABLED_CONFIGKEY
- See Also:
-
UPLOAD_CONFIGKEY
- See Also:
-
UPLOAD_SEEDING_CONFIGKEY
- See Also:
-
DOWNLOAD_CONFIGKEY
- See Also:
-
UPLOAD_SEEDING_ENABLED_CONFIGKEY
- See Also:
-
CONFIG_PARAMS
-
configKey
-
configValue
private final long configValue -
auto_upload_enabled
static boolean auto_upload_enabled -
auto_upload_seeding_enabled
static boolean auto_upload_seeding_enabled -
seeding_upload_enabled
static boolean seeding_upload_enabled
-
-
Constructor Details
-
TransferSpeedValidator
Creates a TransferSpeedValidator with the given configuration key and value- Parameters:
configKey- Configuration key; must be "Max Upload Speed KBs" or "Max Download Speed KBs"value- Configuration value to be validated
-
-
Method Details
-
validate
Gets the transformed value as an Integer -
getValue
public long getValue()Validates the given configuration key/value pair and returns the validated value- Returns:
- Modified configuration value that conforms to validation as an Integer
-
getActiveUploadParameter
-
getDownloadParameter
-
getGlobalDownloadRateLimitBytesPerSecond
public static long getGlobalDownloadRateLimitBytesPerSecond() -
setGlobalDownloadRateLimitBytesPerSecond
public static void setGlobalDownloadRateLimitBytesPerSecond(long bytes_per_second) -
isAutoUploadAvailable
-
isAutoSpeedActive
-
getActiveAutoUploadParameter
-