public class BandwidthThrottlerImpl extends java.lang.Object implements BandwidthThrottler
The maximum upstream kbps can be set via setUpstreamKbps(long). Note that, 'byte' will be explicitly called
out. Any 'b' or 'B' (in variable names with camel case) will refer to bit.
TODO: implement for input.
| Constructor and Description |
|---|
BandwidthThrottlerImpl(long maxBps) |
| Modifier and Type | Method and Description |
|---|---|
int |
getAllowedBytes(int len)
Get the allowed number of bytes to read from or write to socket.
|
void |
setAbsoluteMaxBps(long maxBps) |
void |
setUpstreamKbps(long kbps)
Set upload max bandwidth in kilobits per seconds.
|
public void setAbsoluteMaxBps(long maxBps)
public void setUpstreamKbps(long kbps)
BandwidthThrottlersetUpstreamKbps in interface BandwidthThrottlerkbps - max bandwidth in kbpspublic int getAllowedBytes(int len)
BandwidthThrottlergetAllowedBytes in interface BandwidthThrottlerlen - maximum number of bytes.Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.