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 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.