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.
A state observer for the fixed
CapacityLimiter to monitor internal limit and consumption.-
Method Summary
Modifier and TypeMethodDescriptionvoidobserve(int capacity, int consumed) Callback that gives access to internal state of theCapacityLimiterwith fixed capacity.
-
Method Details
-
observe
void observe(int capacity, int consumed) Callback that gives access to internal state of theCapacityLimiterwith fixed capacity.- Parameters:
capacity- The max allowed concurrent requests thatCapacityLimitershould allow.consumed- The current consumption (portion of the capacity) of the limiter.
-