Class PingSpaceMonitor
java.lang.Object
com.biglybt.core.speedmanager.impl.v2.PingSpaceMonitor
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) int
(package private) int
static final int
(package private) int
(package private) int
(package private) int
(package private) boolean
private static final long
(package private) int
(package private) final int
(package private) final int
(package private) int
(package private) int
(package private) int
(package private) int
static final int
(package private) PingSpaceMapper
(package private) long
(package private) TransferMode
(package private) int
(package private) int
static final int
(package private) int
(package private) int
(package private) int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addToPingMapData
(int lastMetricValue, TransferMode mode) Do a check and decide if the limits should be dropped.private boolean
int
(package private) boolean
True if we have a new limit.int
void
reset
(TransferMode mode) void
Call after getting new limits.void
setCurrentTransferRates
(int downRate, int upRate)
-
Field Details
-
pingMap
PingSpaceMapper pingMap -
startTime
long startTime -
INTERVAL
private static final long INTERVAL- See Also:
-
maxGoodPing
final int maxGoodPing -
minBadPing
final int minBadPing -
nBadPings
int nBadPings -
nGoodPings
int nGoodPings -
nNeutralPings
int nNeutralPings -
upNone
int upNone -
upLow
int upLow -
upMed
int upMed -
upHigh
int upHigh -
upAtLimit
int upAtLimit -
downNone
int downNone -
downLow
int downLow -
downMed
int downMed -
downHigh
int downHigh -
downAtLimit
int downAtLimit -
transferMode
TransferMode transferMode -
UPLOAD
public static final int UPLOAD- See Also:
-
DOWNLOAD
public static final int DOWNLOAD- See Also:
-
NONE
public static final int NONE- See Also:
-
hasNewLimit
boolean hasNewLimit -
newLimit
int newLimit -
limitType
int limitType
-
-
Constructor Details
-
PingSpaceMonitor
-
-
Method Details
-
setCurrentTransferRates
public void setCurrentTransferRates(int downRate, int upRate) - Parameters:
downRate
- -upRate
- -
-
addToPingMapData
Do a check and decide if the limits should be dropped.- Parameters:
lastMetricValue
- -mode
- - the TransferMode- Returns:
- - true if the limits should be dropped.
-
checkForLowerLimits
private boolean checkForLowerLimits() -
reset
-
hasNewLimit
boolean hasNewLimit()True if we have a new limit.- Returns:
- - true if there is a new limit.
-
getNewLimit
public int getNewLimit() -
limitType
public int limitType() -
resetNewLimit
public void resetNewLimit()Call after getting new limits.
-