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.Version
version()
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
Model
instance 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
Model
instance.
-
createAndValidateModel
ModelCreateResult createAndValidateModel(ModelContext modelContext, ValidationParameters validationParameters) Creates an instance of aModel
. The resulting instance will be used to serve config. Any validation of aModel
and theModelContext
can be done in this method.- Parameters:
modelContext
- an instance ofModelContext
, containing dependencies for creating aModel
validationParameters
- validation parameters- Returns:
- a
ModelCreateResult
instance.
-