Interface ThrottlingPolicy
- All Known Implementing Classes:
DefaultRateThrottlingPolicy
,FixedRateThrottlingPolicy
,MappedThrottlingPolicy
,ScriptableThrottlingPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
This interface defines the contract to lookup a
ThrottlingRate
that will be applied to the given
Request
.-
Method Summary
Modifier and TypeMethodDescriptionReturns theThrottlingRate
that should be used for the provided request.
-
Method Details
-
lookup
Returns theThrottlingRate
that should be used for the provided request.- Parameters:
context
- The current context which might be used to retrieve the throttling rate.request
- The current request which might be used to retrieve the throttling rate.- Returns:
- A
Promise
representing theThrottlingRate
that should be used for the request.
-