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 TypeMethodDescriptionvoid
observe
(int capacity, int consumed) Callback that gives access to internal state of theCapacityLimiter
with fixed capacity.
-
Method Details
-
observe
void observe(int capacity, int consumed) Callback that gives access to internal state of theCapacityLimiter
with fixed capacity.- Parameters:
capacity
- The max allowed concurrent requests thatCapacityLimiter
should allow.consumed
- The current consumption (portion of the capacity) of the limiter.
-