Class QueryProfileRegistry


  • public class QueryProfileRegistry
    extends com.yahoo.component.provider.ComponentRegistry<QueryProfile>
    A set of query profiles. This also holds the query profile types as a dependent registry
    Author:
    bratseth
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CompiledQueryProfileRegistry compile()  
      QueryProfile findQueryProfile​(java.lang.String idString)
      Returns a query profile for the given request string, or null if a suitable one is not found.
      void freeze()
      Freezes this, and all owned query profiles and query profile types
      QueryProfileType getType​(java.lang.String type)
      Returns a query profile type by name, or null if not found
      QueryProfileTypeRegistry getTypeRegistry()
      Returns the type registry attached to this
      void register​(QueryProfile profile)
      Register this type by its id
      • Methods inherited from class com.yahoo.component.provider.ComponentRegistry

        allComponents, allComponentsById, findBestMatch, getComponent, getComponent, getComponent, getComponentCount, isFrozen, register, singleton, unregister
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryProfileRegistry

        public QueryProfileRegistry()
    • Method Detail

      • register

        public void register​(QueryProfile profile)
        Register this type by its id
      • getType

        public QueryProfileType getType​(java.lang.String type)
        Returns a query profile type by name, or null if not found
      • findQueryProfile

        public QueryProfile findQueryProfile​(java.lang.String idString)

        Returns a query profile for the given request string, or null if a suitable one is not found.

        The request string must be a valid ComponentId or null.

        If the string is null, the profile named "default" is returned, or null if that does not exists.

        The version part (if any) is matched used the usual component version patching rules. If the name part matches a query profile name perfectly, that profile is returned. If not, and the name is a slash-separated path, the profile with the longest matching left sub-path which has a type which allows path mahting is used. If there is no such profile, null is returned.

      • freeze

        public void freeze()
        Freezes this, and all owned query profiles and query profile types
        Overrides:
        freeze in class com.yahoo.component.provider.ComponentRegistry<QueryProfile>