Interface BandwidthThrottler
-
- All Known Implementing Classes:
BandwidthThrottlerImpl
public interface BandwidthThrottlerInterface for throttler based on bandwidth.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetAllowedBytes(int len)Get the allowed number of bytes to read from or write to socket.voidsetUpstreamKbps(long kbps)Set upload max bandwidth in kilobits per seconds.
-
-
-
Method Detail
-
setUpstreamKbps
void setUpstreamKbps(long kbps)
Set upload max bandwidth in kilobits per seconds.- Parameters:
kbps- max bandwidth in kbps
-
getAllowedBytes
int getAllowedBytes(int len)
Get the allowed number of bytes to read from or write to socket.- Parameters:
len- maximum number of bytes.- Returns:
- allowed bytes
-
-