org.gudy.azureus2.pluginsimpl.local.utils
Class UtilitiesImpl.PluginLimitedRateGroup
java.lang.Object
org.gudy.azureus2.pluginsimpl.local.utils.UtilitiesImpl.PluginLimitedRateGroup
- All Implemented Interfaces:
- LimitedRateGroup
- Enclosing class:
- UtilitiesImpl
public static class UtilitiesImpl.PluginLimitedRateGroup
- extends Object
- implements LimitedRateGroup
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isDisableDisable
public boolean isDisableDisable()
addListener
public void addListener(UtilitiesImpl.PluginLimitedRateGroupListener listener)
removeListener
public void removeListener(UtilitiesImpl.PluginLimitedRateGroupListener listener)
getName
public String getName()
- Specified by:
getName
in interface LimitedRateGroup
getRateLimitBytesPerSecond
public int getRateLimitBytesPerSecond()
- Description copied from interface:
LimitedRateGroup
- Get the current rate limit.
- Specified by:
getRateLimitBytesPerSecond
in interface LimitedRateGroup
- Returns:
- rate in bytes per second, 0 for unlimited, -1 for disabled (BUT it is better to use isDisabled as some
rate limiters implement logical disablement via other means (e.g. a download can implement it by disabling individual peers....)
isDisabled
public boolean isDisabled()
- Description copied from interface:
LimitedRateGroup
- Best way to check if rate limiter is effectively disabled
- Specified by:
isDisabled
in interface LimitedRateGroup
- Returns:
updateBytesUsed
public void updateBytesUsed(int used)
- Specified by:
updateBytesUsed
in interface LimitedRateGroup