Interface Classification
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
In the context of capacity, classification can be used to allow prioritization of requests under
certain conditions. When a system is load-shedding, it can still choose to accommodate important demand.
The classification is not a feature supported by all CapacityLimiters but rather the
CapacityLimiter of preference needs to support it. For CapacityLimiters that classification
is not supported, if a classification is provided it will be discarded.
It's not the purpose of this interface to define characteristics or expectations of the currently available or
future supported classifications. This is an implementation detail of the respective CapacityLimiter.
Classification is treated as a hint for a CapacityLimiter and are expected to be strictly respected,
as they are the best effort approach to communicate user's desire to the CapacityLimiter.
-
Method Summary
Modifier and TypeMethodDescriptionintpriority()The priority should be a positive number between 0 and 100 (inclusive), which hints to aCapacityLimiterthe importance of aClassification.
-
Method Details
-
priority
int priority()The priority should be a positive number between 0 and 100 (inclusive), which hints to aCapacityLimiterthe importance of aClassification.Higher value represents the most important
Classification, while lower value represents less importantClassification.- Returns:
- A positive value between 0 and 100 (inclusive) that hints importance of a request to a
CapacityLimiter.
-