Interface FixedCapacityLimiterBuilder.StateObserver

Enclosing class:
FixedCapacityLimiterBuilder
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface FixedCapacityLimiterBuilder.StateObserver
A state observer for the fixed CapacityLimiter to monitor internal limit and consumption.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    observe(int capacity, int consumed)
    Callback that gives access to internal state of the CapacityLimiter with fixed capacity.
  • Method Details

    • observe

      void observe(int capacity, int consumed)
      Callback that gives access to internal state of the CapacityLimiter with fixed capacity.
      Parameters:
      capacity - The max allowed concurrent requests that CapacityLimiter should allow.
      consumed - The current consumption (portion of the capacity) of the limiter.