Package com.biglybt.core.config.impl
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 boolean
static final String
(package private) static boolean
static final String
static final String[]
private final String
private final Number
static final String
(package private) static boolean
static final String
static final String
static final String
-
Constructor Summary
ConstructorsConstructorDescriptionTransferSpeedValidator
(String configKey, Number value) Creates a TransferSpeedValidator with the given configuration key and value -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String
static String
static int
getValue()
Validates the given configuration key/value pair and returns the validated valuestatic boolean
static boolean
isAutoUploadAvailable
(Core core) static void
setGlobalDownloadRateLimitBytesPerSecond
(int bytes_per_second) private static Object
Gets 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
-
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
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 int getGlobalDownloadRateLimitBytesPerSecond() -
setGlobalDownloadRateLimitBytesPerSecond
public static void setGlobalDownloadRateLimitBytesPerSecond(int bytes_per_second) -
isAutoUploadAvailable
-
isAutoSpeedActive
-
getActiveAutoUploadParameter
-