Class ConfigModel

    • Constructor Detail

      • ConfigModel

        public ConfigModel​(ConfigModelContext modelContext)
        Constructs a new config model given a context.
        Parameters:
        modelContext - The model context.
    • Method Detail

      • getId

        public final String getId()
        Returns the id of this model
      • initialize

        public void initialize​(ConfigModelRepo configModelRepo)
        Initializes this model. All inter-model independent initialization is done by implementing this method. The model will be made available to dependent models by the framework when this returns.

        TODO: Remove this method, as this is now done by the model builders. This default implementation does nothing.

        Parameters:
        configModelRepo - The ConfigModelRepo of the VespaModel
      • prepare

        public void prepare​(ConfigModelRepo configModelRepo,
                            DeployState deployState)
        Prepares this model to start serving config requests, possibly using properties of other models. The framework will call this method after models have been built. The model should finalize its configurations that depend on other models in this step. This default implementation does nothing.
        Parameters:
        configModelRepo - The ConfigModelRepo of the system model
      • isServing

        public boolean isServing()

        Returns whether this model must be maintained in memory for serving config requests. Models which are used to amend other models at build time should override this to return false.

        This default implementation returns true.