Package com.yahoo.config.model
Class ConfigModel
- java.lang.Object
-
- com.yahoo.config.model.ConfigModel
-
- Direct Known Subclasses:
AdminModel
,Clients
,ContainerModel
,Content
,GenericServicesModel
,ModelBuilderAddingAccessControlFilter.ModelPlaceholder
,Routing
public abstract class ConfigModel extends Object
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
Constructors Constructor Description ConfigModel(ConfigModelContext modelContext)
Constructs a new config model given a context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
Returns the id of this modelvoid
initialize(ConfigModelRepo configModelRepo)
Initializes this model.boolean
isServing()
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 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.
-
-