Class FixedRateThrottlingPolicy
java.lang.Object
org.forgerock.openig.filter.throttling.FixedRateThrottlingPolicy
- All Implemented Interfaces:
ThrottlingPolicy
An implementation of the
ThrottlingPolicy that always returns the same throttling rate.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new throttling policy that always returns the same throttling rate. -
Method Summary
Modifier and TypeMethodDescriptionReturns theThrottlingRatethat should be used for the provided request.
-
Constructor Details
-
FixedRateThrottlingPolicy
Constructs a new throttling policy that always returns the same throttling rate.- Parameters:
rate- the rate to return
-
-
Method Details
-
lookup
Description copied from interface:ThrottlingPolicyReturns theThrottlingRatethat should be used for the provided request.- Specified by:
lookupin interfaceThrottlingPolicy- 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
Promiserepresenting theThrottlingRatethat should be used for the request.
-