Class ConnectionManagerImpl.PluginRateLimiter
- java.lang.Object
-
- com.biglybt.pifimpl.local.network.ConnectionManagerImpl.PluginRateLimiter
-
- All Implemented Interfaces:
RateLimiter
- Enclosing class:
- ConnectionManagerImpl
public static class ConnectionManagerImpl.PluginRateLimiter extends java.lang.Object implements RateLimiter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PluginRateLimiter(java.lang.String _name, int _bps)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
int
getRateLimitBytesPerSecond()
Get rate limit.long
getRateLimitTotalByteCount()
void
setRateLimitBytesPerSecond(int bytes_per_second)
void
updateBytesUsed(int used)
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceRateLimiter
-
getRateLimitBytesPerSecond
public int getRateLimitBytesPerSecond()
Description copied from interface:RateLimiter
Get rate limit. 0 -> unlimited, -1 -> disabled- Specified by:
getRateLimitBytesPerSecond
in interfaceRateLimiter
- Returns:
-
setRateLimitBytesPerSecond
public void setRateLimitBytesPerSecond(int bytes_per_second)
- Specified by:
setRateLimitBytesPerSecond
in interfaceRateLimiter
-
getRateLimitTotalByteCount
public long getRateLimitTotalByteCount()
- Specified by:
getRateLimitTotalByteCount
in interfaceRateLimiter
-
updateBytesUsed
public void updateBytesUsed(int used)
-
-