Class ConfigValueChangeValidator

  • All Implemented Interfaces:
    ChangeValidator

    public class ConfigValueChangeValidator
    extends java.lang.Object
    implements ChangeValidator
    Compares the config instances in the current and next Vespa model to determine if some services will require restart. The configs used by a given service is deduced from the RestartConfigs annotation.
    Author:
    bjorncs
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigValueChangeValidator​(com.yahoo.config.application.api.DeployLogger logger)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.stream.Stream<com.yahoo.config.model.api.ConfigChangeAction> findConfigChangesFromModels​(AbstractConfigProducerRoot currentModel, AbstractConfigProducerRoot nextModel)  
      java.util.List<com.yahoo.config.model.api.ConfigChangeAction> validate​(VespaModel currentModel, VespaModel nextModel, com.yahoo.config.application.api.ValidationOverrides overrides, java.time.Instant now)
      Inspects the configuration in the new and old Vespa model to determine which services that require restart
      • Methods inherited from class java.lang.Object

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

      • ConfigValueChangeValidator

        public ConfigValueChangeValidator​(com.yahoo.config.application.api.DeployLogger logger)
    • Method Detail

      • validate

        public java.util.List<com.yahoo.config.model.api.ConfigChangeAction> validate​(VespaModel currentModel,
                                                                                      VespaModel nextModel,
                                                                                      com.yahoo.config.application.api.ValidationOverrides overrides,
                                                                                      java.time.Instant now)
        Inspects the configuration in the new and old Vespa model to determine which services that require restart
        Specified by:
        validate in interface ChangeValidator
        Parameters:
        currentModel - the current active model
        nextModel - the next model we would like to activate
        overrides - validation overrides
        now - the instant to use as now
        Returns:
        a list of actions specifying what needs to be done in order to activate the new model. Return an empty list if nothing needs to be done