Interface ModelFactory


public interface ModelFactory
Factory for config models.
  • Method Details

    • version

      com.yahoo.component.Version version()
      Returns the Vespa version of the models this builds.
      Returns:
      the version of a Model instance that this factory can create.
    • createModel

      Model createModel(ModelContext modelContext)
      Creates an instance of a Model. The resulting instance will be used to serve config. No model validation will be done, calling this method assumes thatcreateAndValidateModel(ModelContext, ValidationParameters) has already been called at some point for this model.
      Parameters:
      modelContext - an instance of ModelContext, containing dependencies for creating a Model.
      Returns:
      a Model instance.
    • createAndValidateModel

      ModelCreateResult createAndValidateModel(ModelContext modelContext, ValidationParameters validationParameters)
      Creates an instance of a Model. The resulting instance will be used to serve config. Any validation of a Model and the ModelContext can be done in this method.
      Parameters:
      modelContext - an instance of ModelContext, containing dependencies for creating a Model
      validationParameters - validation parameters
      Returns:
      a ModelCreateResult instance.