Interface CapacityLimiter.LimiterState
- Enclosing interface:
- CapacityLimiter
public static interface CapacityLimiter.LimiterState
Representation of the state of the
CapacityLimiter when the CapacityLimiter.Ticket is issued.-
Method Summary
Modifier and TypeMethodDescriptionintpending()Returns the current pending (in use capacity) demand when theCapacityLimiter.Ticketwas issued.intReturns the remaining allowance of theCapacityLimiterwhen theCapacityLimiter.Ticketwas issued.
-
Method Details
-
remaining
int remaining()Returns the remaining allowance of theCapacityLimiterwhen theCapacityLimiter.Ticketwas issued.- Returns:
- the remaining allowance of the
CapacityLimiterwhen theCapacityLimiter.Ticketwas issued.
-
pending
int pending()Returns the current pending (in use capacity) demand when theCapacityLimiter.Ticketwas issued.If the pending is unknown a negative value i.e., -1 is allowed to express this.
- Returns:
- the current pending (in use capacity) demand when the
CapacityLimiter.Ticketwas issued.
-