public class FixedRateThrottlingPolicy extends Object implements ThrottlingPolicy
ThrottlingPolicy
that always returns the same throtlling rate.Constructor and Description |
---|
FixedRateThrottlingPolicy(ThrottlingRate rate)
Constructs a new throttling policy that always returns the same throttling rate.
|
Modifier and Type | Method and Description |
---|---|
Promise<ThrottlingRate,Exception> |
lookup(Context context,
Request request)
Returns the
ThrottlingRate that should be used for the provided request. |
public FixedRateThrottlingPolicy(ThrottlingRate rate)
rate
- the rate to returnpublic Promise<ThrottlingRate,Exception> lookup(Context context, Request request)
ThrottlingPolicy
ThrottlingRate
that should be used for the provided request.lookup
in interface ThrottlingPolicy
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.Promise
representing the ThrottlingRate
that should be used for the request.Copyright 2011-2015 ForgeRock AS.