public class BandwidthLimitation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static BandwidthLimitation |
UNLIMITED
Constant equivalent to no bandwidth limitation.
|
Constructor and Description |
---|
BandwidthLimitation(long maximumBytesSecond)
Creates a new bandwidth limitation from a maximum bytes per second count.
|
BandwidthLimitation(SizeUnit unit,
short count)
Creates a new bandwidth limitation from the specified count of size unit.
|
Modifier and Type | Method and Description |
---|---|
BandwidthLimitation |
add(BandwidthLimitation other)
Adds two limitations and returns the result.
|
BandwidthLimitation |
substract(BandwidthLimitation other)
Subtracts two limitations and returns the result.
|
public static final BandwidthLimitation UNLIMITED
public BandwidthLimitation(SizeUnit unit, short count)
public BandwidthLimitation(long maximumBytesSecond)
public BandwidthLimitation add(BandwidthLimitation other)
public BandwidthLimitation substract(BandwidthLimitation other)