Package com.yahoo.config.model.test
Class MockRoot
- All Implemented Interfaces:
com.yahoo.config.ConfigInstance.Producer,ConfigProducer,ConfigProducerRoot,Serializable
Use for testing. Use as parent for the config producer(s) you want to test, to test
only a subtree of the producers.
- Author:
- gjoranv
- See Also:
-
Field Summary
Fields inherited from class com.yahoo.config.model.producer.AbstractConfigProducerRoot
id2producerFields inherited from class com.yahoo.config.model.producer.AnyConfigProducer
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(AnyConfigProducer abstractConfigProducer) Adds a child to this config producer.voidaddDescendant(String configId, AnyConfigProducer descendant) Adds the given producer (at any depth level) as descendant to this root nodes.com.yahoo.config.application.api.DeployLoggerfinal AdmingetAdmin()static <T extends com.yahoo.config.ConfigInstance>
Class<? extends com.yahoo.config.ConfigInstance.Builder>getBuilder(Class<T> configClass) com.yahoo.config.ConfigInstance.Builder<T extends com.yahoo.config.ConfigInstance>
TResolves config of the given type and config id.getProducer(String configId) Returns the one and only HostSystem of the root node.Methods inherited from class com.yahoo.config.model.producer.AbstractConfigProducerRoot
freezeModelTopology, getConfigProducer, getRoot, getServiceMethods inherited from class com.yahoo.config.model.producer.TreeConfigProducer
addDescendantService, getChildren, getChildrenByTypeRecursive, getConfigClassLoader, getDescendantServices, removeChild, validateMethods inherited from class com.yahoo.config.model.producer.AnyConfigProducer
addConfigId, addUserConfig, cascadeConfig, currentConfigId, findInheritedClassLoader, getConfigId, getMonitoringService, getParent, getSubId, getUserConfigs, mergeUserConfigs, remove, setParent, setUserConfigs, stateIsHostedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.yahoo.vespa.model.ConfigProducer
addUserConfig, cascadeConfig, dump, getChildren, getConfigId, getDescendantServices, getUserConfigs, validate
-
Constructor Details
-
MockRoot
public MockRoot() -
MockRoot
-
MockRoot
public MockRoot(String rootConfigId, com.yahoo.config.application.api.ApplicationPackage applicationPackage) -
MockRoot
-
-
Method Details
-
configModelRepo
- Specified by:
configModelRepoin classAbstractConfigProducerRoot
-
getConfigIds
- Returns:
- an unmodifiable copy of the set of configIds in this root.
-
getConfig
public com.yahoo.config.ConfigInstance.Builder getConfig(com.yahoo.config.ConfigInstance.Builder builder, String configId) -
getConfig
public <T extends com.yahoo.config.ConfigInstance> T getConfig(Class<T> configClass, String configId) Description copied from interface:ConfigProducerRootResolves config of the given type and config id.- Parameters:
configClass- The type of configconfigId- The config id- Returns:
- A config instance of the given type
-
getProducer
-
getBuilder
-
getDeployState
-
hostSystem
Description copied from class:AnyConfigProducerReturns the one and only HostSystem of the root node. Must be overridden by root node.- Specified by:
hostSystemin interfaceConfigProducer- Overrides:
hostSystemin classAnyConfigProducer
-
addDescendant
Description copied from interface:ConfigProducerRootAdds the given producer (at any depth level) as descendant to this root nodes.- Parameters:
configId- string id of descendantdescendant- the producer to add to this root node
-
addChild
Description copied from class:TreeConfigProducerAdds a child to this config producer.- Overrides:
addChildin classTreeConfigProducer<AnyConfigProducer>- Parameters:
abstractConfigProducer- the child config producer to add
-
getAdmin
-
deployLogger
public com.yahoo.config.application.api.DeployLogger deployLogger()
-