Interface QueryPriorityCalculator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Calculate the priority of
QueryMessage based on its content. Higher value means higher priority.- Since:
- 4.0
- Author:
- Marc Gathier
-
Method Summary
Modifier and TypeMethodDescriptionstatic QueryPriorityCalculatorReturns a default implementation of theQueryPriorityCalculator, always returning priority0.intdeterminePriority(QueryMessage<?, ?> query) Determines the priority of the givenquery.
-
Method Details
-
determinePriority
Determines the priority of the givenquery. The higher the returned value, the higher the priority is.- Parameters:
query- aQueryMessageto prioritize- Returns:
- an
intdefining the priority of the givenquery
-
defaultQueryPriorityCalculator
Returns a default implementation of theQueryPriorityCalculator, always returning priority0.- Returns:
- a lambda taking in a
QueryMessageto prioritize to the default of priority0
-