Package com.yahoo.config.model.api
Interface ModelFactory
public interface ModelFactory
Factory for config models.
-
Method Summary
Modifier and TypeMethodDescriptioncreateAndValidateModel(ModelContext modelContext, ValidationParameters validationParameters) Creates an instance of aModel.createModel(ModelContext modelContext) Creates an instance of aModel.com.yahoo.component.Versionversion()Returns the Vespa version of the models this builds.
-
Method Details
-
version
com.yahoo.component.Version version()Returns the Vespa version of the models this builds.- Returns:
- the version of a
Modelinstance that this factory can create.
-
createModel
Creates an instance of aModel. 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 ofModelContext, containing dependencies for creating aModel.- Returns:
- a
Modelinstance.
-
createAndValidateModel
ModelCreateResult createAndValidateModel(ModelContext modelContext, ValidationParameters validationParameters) Creates an instance of aModel. The resulting instance will be used to serve config. Any validation of aModeland theModelContextcan be done in this method.- Parameters:
modelContext- an instance ofModelContext, containing dependencies for creating aModelvalidationParameters- validation parameters- Returns:
- a
ModelCreateResultinstance.
-