Class Routing


  • public class Routing
    extends ConfigModel
    This is the routing plugin of the Vespa model. This class is responsible for parsing all routing information given explicitly by the user in the optional <routing> element. If there is no such element, only default routes and hops will be available.
    Author:
    Simon Thoresen Hult
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void deriveCommonSettings​(ConfigModelRepo plugins)
      Derives all routing settings that can be found by inspecting the given plugin container.
      void getConfig​(com.yahoo.documentapi.messagebus.protocol.DocumentrouteselectorpolicyConfig.Builder builder)  
      void getConfig​(com.yahoo.messagebus.MessagebusConfig.Builder builder)  
      java.util.List<java.lang.String> getErrors()
      Returns a list of errors found when preparing the routing configuration.
      java.util.List<Protocol> getProtocols()  
      void setExplicitApplicationSpec​(com.yahoo.messagebus.routing.ApplicationSpec app)
      Sets the application specification to include when verifying the complete routing config.
      void setExplicitRoutingSpec​(com.yahoo.messagebus.routing.RoutingSpec routing)
      Sets the routing specification to include in the derived routing config.
      • Methods inherited from class java.lang.Object

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

      • setExplicitApplicationSpec

        public void setExplicitApplicationSpec​(com.yahoo.messagebus.routing.ApplicationSpec app)
        Sets the application specification to include when verifying the complete routing config. This needs to be invoked before deriveCommonSettings(com.yahoo.config.model.ConfigModelRepo) to be included.
        Parameters:
        app - The application specification to include.
      • setExplicitRoutingSpec

        public void setExplicitRoutingSpec​(com.yahoo.messagebus.routing.RoutingSpec routing)
        Sets the routing specification to include in the derived routing config. This needs to be invoked before deriveCommonSettings(com.yahoo.config.model.ConfigModelRepo) to be included.
        Parameters:
        routing - The routing specification to include.
      • getProtocols

        public final java.util.List<Protocol> getProtocols()
      • deriveCommonSettings

        public void deriveCommonSettings​(ConfigModelRepo plugins)
        Derives all routing settings that can be found by inspecting the given plugin container.
        Parameters:
        plugins - All initialized plugins of the vespa model.
      • getConfig

        public void getConfig​(com.yahoo.documentapi.messagebus.protocol.DocumentrouteselectorpolicyConfig.Builder builder)
      • getConfig

        public void getConfig​(com.yahoo.messagebus.MessagebusConfig.Builder builder)
      • getErrors

        public java.util.List<java.lang.String> getErrors()
        Returns a list of errors found when preparing the routing configuration.
        Returns:
        The error list.