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.

@FunctionalInterface public interface QueryPriorityCalculator
Calculate the priority of QueryMessage based on its content. Higher value means higher priority.
Since:
4.0
Author:
Marc Gathier
  • Method Details

    • determinePriority

      int determinePriority(QueryMessage<?,?> query)
      Determines the priority of the given query. The higher the returned value, the higher the priority is.
      Parameters:
      query - a QueryMessage to prioritize
      Returns:
      an int defining the priority of the given query
    • defaultQueryPriorityCalculator

      static QueryPriorityCalculator defaultQueryPriorityCalculator()
      Returns a default implementation of the QueryPriorityCalculator, always returning priority 0.
      Returns:
      a lambda taking in a QueryMessage to prioritize to the default of priority 0