Class ContentPolicy

  • All Implemented Interfaces:
    DocumentProtocolRoutingPolicy, com.yahoo.messagebus.routing.RoutingPolicy

    public class ContentPolicy
    extends SlobrokPolicy
    Routing policy to determine which distributor in a content cluster to send data to. Using different key=value parameters separated by semicolon (";"), the user can control which cluster to send to. cluster=[clusterName] (Mandatory, determines the cluster name) config=[config] (Optional, a comma separated list of config servers to use. Used to talk to clusters not defined in this vespa application) clusterconfigid=[id] (Optional, use given config id for distribution instead of default)
    Author:
    Haakon Humberset
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String owningBucketStates  
    • Constructor Summary

      Constructors 
      Constructor Description
      ContentPolicy​(ContentPolicy.Parameters p)
      Constructor specifying a bit more in detail, so we can override what needs to be overridden in tests
      ContentPolicy​(java.lang.String param, com.yahoo.vespa.config.content.DistributionConfig config)
      Constructor used in production.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()  
      void merge​(com.yahoo.messagebus.routing.RoutingContext context)  
      void select​(com.yahoo.messagebus.routing.RoutingContext context)  
      • Methods inherited from class java.lang.Object

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

      • owningBucketStates

        public static final java.lang.String owningBucketStates
        See Also:
        Constant Field Values
    • Constructor Detail

      • ContentPolicy

        public ContentPolicy​(java.lang.String param,
                             com.yahoo.vespa.config.content.DistributionConfig config)
        Constructor used in production.
      • ContentPolicy

        public ContentPolicy​(ContentPolicy.Parameters p)
        Constructor specifying a bit more in detail, so we can override what needs to be overridden in tests
    • Method Detail

      • select

        public void select​(com.yahoo.messagebus.routing.RoutingContext context)
      • merge

        public void merge​(com.yahoo.messagebus.routing.RoutingContext context)
      • destroy

        public void destroy()