Package com.yahoo.config.model
Class ConfigModelRepo
- java.lang.Object
-
- com.yahoo.config.model.ConfigModelRepo
-
- All Implemented Interfaces:
ConfigModelRepoAdder
,java.io.Serializable
,java.lang.Iterable<ConfigModel>
public class ConfigModelRepo extends java.lang.Object implements ConfigModelRepoAdder, java.io.Serializable, java.lang.Iterable<ConfigModel>
A collection of config model instances owned by a system model- Author:
- gjoranv
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConfigModelRepo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ConfigModel model)
Adds a new config model instance in thisjava.util.Map<java.lang.String,ConfigModel>
asMap()
Returns a read-only view of the config model instances of thisConfigModel
get(java.lang.String id)
Returns a config model for a given idClients
getClients()
Content
getContent()
<T extends ConfigModel>
java.util.List<T>getModels(java.lang.Class<T> modelClass)
Routing
getRouting()
java.util.Iterator<ConfigModel>
iterator()
Returns the models in this as an iteratorvoid
prepareConfigModels(DeployState deployState)
Initialize part 2.: Prepare all config models for starting.void
readConfigModels(DeployState deployState, VespaModel vespaModel, VespaModelBuilder builder, ApplicationConfigProducerRoot root, ConfigModelRegistry configModelRegistry)
Initialize part 1.: Reads the config models used in the application package.
-
-
-
Method Detail
-
get
public ConfigModel get(java.lang.String id)
Returns a config model for a given id- Parameters:
id
- the id of the model to return- Returns:
- the model, or none if a model with this id is not present in this
-
add
public void add(ConfigModel model)
Adds a new config model instance in this- Specified by:
add
in interfaceConfigModelRepoAdder
-
iterator
public java.util.Iterator<ConfigModel> iterator()
Returns the models in this as an iterator- Specified by:
iterator
in interfacejava.lang.Iterable<ConfigModel>
-
asMap
public java.util.Map<java.lang.String,ConfigModel> asMap()
Returns a read-only view of the config model instances of this
-
readConfigModels
public void readConfigModels(DeployState deployState, VespaModel vespaModel, VespaModelBuilder builder, ApplicationConfigProducerRoot root, ConfigModelRegistry configModelRegistry) throws java.io.IOException, org.xml.sax.SAXException
Initialize part 1.: Reads the config models used in the application package.- Throws:
java.io.IOException
org.xml.sax.SAXException
-
prepareConfigModels
public void prepareConfigModels(DeployState deployState)
Initialize part 2.: Prepare all config models for starting. Must be called after plugins are loaded and frozen.
-
getModels
public <T extends ConfigModel> java.util.List<T> getModels(java.lang.Class<T> modelClass)
-
getClients
public Clients getClients()
-
getRouting
public Routing getRouting()
-
getContent
public Content getContent()
-
-