Token-bucket rate limit for a single (napplet, opClass) pair.
The engine computes refillRatePerMs = capacity / windowMs lazily on each evaluate() call — it is never stored in state.
refillRatePerMs = capacity / windowMs
Maximum tokens (operations) allowed per window.
Window duration in milliseconds.
Exceed-action: what to do when the bucket is empty.
Readonly
Token-bucket rate limit for a single (napplet, opClass) pair.
The engine computes
refillRatePerMs = capacity / windowMslazily on each evaluate() call — it is never stored in state.Param: capacity
Maximum tokens (operations) allowed per window.
Param: windowMs
Window duration in milliseconds.
Param: action
Exceed-action: what to do when the bucket is empty.