Apache OpenDAL™ - v0.49.1
    Preparing search index...

    Class ConcurrentLimitLayer

    Concurrent limit layer

    Add concurrent request limit.

    Notes

    Users can control how many concurrent connections could be established between OpenDAL and underlying storage services.

    All operators wrapped by this layer will share a common semaphore.

    Examples

    const op = new Operator("fs", { root: "/tmp" })

    // Create a concurrent limit layer with 1024 permits
    const limit = new ConcurrentLimitLayer(1024);
    op.layer(limit.build());

    With HTTP concurrent limit:

    const limit = new ConcurrentLimitLayer(1024);
    limit.httpPermits = 512;
    op.layer(limit.build());
    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Create a new ConcurrentLimitLayer with specified permits.

      This permits will be applied to all operations.

      Arguments

      • permits - The maximum number of concurrent operations allowed.

      Parameters

      • permits: number

      Returns ConcurrentLimitLayer

    Accessors

    • set httpPermits(v: number): void

      Set a concurrent limit for HTTP requests.

      This will limit the number of concurrent HTTP requests made by the operator.

      Arguments

      • v - The maximum number of concurrent HTTP requests allowed.

      Parameters

      • v: number

      Returns void

    Methods