withBurst


Description:

public Result<RateLimiter,Error> withBurst (int permits)

Sets burst capacity.

Burst controls how many permits may be consumed instantly after an idle period.

Parameters:

permits

burst capacity.

Returns:

Result.ok(this limiter), or Result.error(RateLimiterError.INVALID_ARGUMENT) when permits is not positive.