Package com.opencloud.rhino.limiting
Interface RateLimiterEndpoint
-
- All Superinterfaces:
LimiterEndpoint
public interface RateLimiterEndpoint extends LimiterEndpoint
A limiter endpoint that can be (administratively) connected to a Rate Limiter or a Queue Saturation Limiter.
- See Also:
LimiterEndpoint
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
forceUseUnit()
Consumes one unit of work.void
forceUseUnits(int units)
Consumes the given number of units of work.boolean
useUnit()
Requests one unit of work.boolean
useUnits(int units)
Requests the given number of units of work.
-
-
-
Method Detail
-
useUnit
boolean useUnit()
Requests one unit of work. Returns true if the work is allowed, false otherwise. Equivalent to useUnits(1).
-
useUnits
boolean useUnits(int units)
Requests the given number of units of work. Returns true if the work is allowed, false otherwise.
-
forceUseUnit
void forceUseUnit()
Consumes one unit of work. Equivalent to forceUseUnits(1).
-
forceUseUnits
void forceUseUnits(int units)
Consumes the given number of units of work.
-
-