*General*

- MultiHostHost:
- removed setTrafficCalculationFactor as this method is irritating
- constructor also initializes name field

git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@49802 ebf7c1c2-ba36-0410-9fe8-c592906822b4

Former-commit-id: e8941f446a469d9d4ef2c2a1a004e94f60abcbbc
This commit is contained in:
psp 2024-09-16 15:30:17 +00:00
parent e8108939a7
commit 9bfc69ca78

View File

@ -39,11 +39,13 @@ public class MultiHostHost implements Storable {
private Boolean resume = null;
private String statusText = null;
private MultihosterHostStatus status = null;
private static final long MAX_UNAVAILABLE_TIME = 5 * 60 * 1000;
public MultiHostHost() {
}
public MultiHostHost(final String domain) {
this.name = domain;
this.addDomain(domain);
}
@ -147,11 +149,6 @@ public class MultiHostHost implements Storable {
this.trafficCalculationFactorPercent = num;
}
/** Traffic usage factor e.g. 3 -> 300%. */
public void setTrafficCalculationFactor(short num) {
this.trafficCalculationFactorPercent = (short) (100 * num);
}
public boolean isUnlimitedLinks() {
if (this.isUnlimitedLinks == null) {
return true;
@ -261,7 +258,7 @@ public class MultiHostHost implements Storable {
}
public void setUnavailableTime(long milliseconds) {
milliseconds = Math.min(milliseconds, 5 * 60 * 1000);
milliseconds = Math.min(milliseconds, MAX_UNAVAILABLE_TIME);
this.unavailableUntilTimestamp = Time.systemIndependentCurrentJVMTimeMillis() + milliseconds;
}