Package com.yahoo.config.model
Class ConfigModel
java.lang.Object
com.yahoo.config.model.ConfigModel
- Direct Known Subclasses:
AdminModel
,ContainerModel
,Content
,ModelBuilderAddingAccessControlFilter.ModelPlaceholder
,Routing
A config model is an abstract representation of a subsystem, which is used
by the builder of that subsystem to derive a config producer tree for the subsystem, and by other
builders to access information about the subsystem for config production at a suitable abstraction level.
- Author:
- gjoranv, bratseth, Ulf Lilleengen
-
Constructor Summary
ConstructorDescriptionConfigModel
(ConfigModelContext modelContext) Constructs a new config model given a context. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
getId()
Returns the id of this modelvoid
initialize
(ConfigModelRepo configModelRepo) Initializes this model.boolean
Returns whether this model must be maintained in memory for serving config requests.void
prepare
(ConfigModelRepo configModelRepo, DeployState deployState) Prepares this model to start serving config requests, possibly using properties of other models.
-
Constructor Details
-
ConfigModel
Constructs a new config model given a context.- Parameters:
modelContext
- The model context.
-
-
Method Details
-
getId
Returns the id of this model -
initialize
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
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.
-