Class ConcurrentLimitLayer
java.lang.Object
org.apache.opendal.Layer
org.apache.opendal.layer.ConcurrentLimitLayer
Limits concurrent storage operations. Operations without a dedicated limit share the default
permits. Reads, writes, and lists with dedicated limits use their own permits, so total storage
operation concurrency can exceed the default limit.
The optional HTTP request limit applies independently of the storage operation limits. Each application of this layer creates its own set of permits.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfigures optional limits for reads, writes, lists, and HTTP requests. -
Constructor Summary
ConstructorsConstructorDescriptionConcurrentLimitLayer(long permits) Creates a layer with one limit shared by all storage operations. -
Method Summary
-
Constructor Details
-
ConcurrentLimitLayer
public ConcurrentLimitLayer(long permits) Creates a layer with one limit shared by all storage operations.- Parameters:
permits- the number of shared storage operation permits- Throws:
IllegalArgumentException- if the permit count is not positive
-
-
Method Details
-
builder
Creates a builder for configuring dedicated storage operation and HTTP request limits.- Parameters:
permits- the number of permits shared by operations without a dedicated limit- Returns:
- a new builder
- Throws:
IllegalArgumentException- if the permit count is not positive
-
layer
-