Class ThrottleLayer
java.lang.Object
org.apache.opendal.Layer
org.apache.opendal.layer.ThrottleLayer
Limits bandwidth for bounded read ranges and write buffers.
A range or buffer larger than the configured burst fails with
OpenDALException.Code.RateLimited.- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ThrottleLayer
public ThrottleLayer(long bandwidth, long burst) Creates a bandwidth limiter.- Parameters:
bandwidth- the number of bytes allowed per secondburst- the number of bytes allowed in a single burst- Throws:
IllegalArgumentException- if either argument is outside 1 through 4,294,967,295 (inclusive)
-
-
Method Details
-
layer
-