com.aelitis.azureus.core.speedmanager.impl.v2
Class PingSpaceMonitor
java.lang.Object
com.aelitis.azureus.core.speedmanager.impl.v2.PingSpaceMonitor
public class PingSpaceMonitor
- extends Object
Created on Jun 29, 2007
Created by Alan Snyder
Copyright (C) Azureus Software, Inc, All Rights Reserved.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UPLOAD
public static final int UPLOAD
- See Also:
- Constant Field Values
DOWNLOAD
public static final int DOWNLOAD
- See Also:
- Constant Field Values
NONE
public static final int NONE
- See Also:
- Constant Field Values
PingSpaceMonitor
public PingSpaceMonitor(int _maxGoodPing,
int _minBadPing,
TransferMode mode)
setCurrentTransferRates
public void setCurrentTransferRates(int downRate,
int upRate)
- Parameters:
downRate
- -upRate
- -
addToPingMapData
public boolean addToPingMapData(int lastMetricValue,
TransferMode mode)
- Do a check and decide if the limits should be dropped.
- Parameters:
lastMetricValue
- -mode
- - the TransferMode
- Returns:
- - true if the limits should be dropped.
reset
public void reset(TransferMode mode)
getNewLimit
public int getNewLimit()
limitType
public int limitType()
resetNewLimit
public void resetNewLimit()
- Call after getting new limits.