Package com.yahoo.config.model.api
Interface Model
public interface Model
A
Model
represents the interface towards the model of an entire tenant, and defines methods
for querying this model.- Author:
- Ulf Lilleengen
-
Method Summary
Modifier and TypeMethodDescriptionReturns all the config ids available for this model.Set<com.yahoo.vespa.config.ConfigKey<?>>
Produces a set of the valid config keys for this model.com.yahoo.config.provision.AllocatedHosts
Gets the allocated hosts for this model.default boolean
Returns whether this application allows serving config request for a different version.default Set<ApplicationClusterInfo>
Returns the set of container clustersReturns the set of document types in each content cluster.Set<com.yahoo.config.FileReference>
The set of files that should be distributed to the hosts in this model.com.yahoo.config.ConfigInstance.Builder
getConfigInstance
(com.yahoo.vespa.config.ConfigKey<?> configKey, com.yahoo.vespa.config.buildergen.ConfigDefinition configDefinition) Resolves config for a given key and config definitiongetHosts()
Returns information about all hosts used in this model.Returns the set of document types in each cluster, that have an index for one of more fields.default Provisioned
Returns the provisioned hosts of this.default boolean
Returns whether old config models should be loaded (default) or not.default com.yahoo.component.Version
version()
Returns the version of this model.default com.yahoo.component.Version
Returns the wanted node version of this model.
-
Method Details
-
getConfigInstance
com.yahoo.config.ConfigInstance.Builder getConfigInstance(com.yahoo.vespa.config.ConfigKey<?> configKey, com.yahoo.vespa.config.buildergen.ConfigDefinition configDefinition) Resolves config for a given key and config definition- Parameters:
configKey
- the key to resolveconfigDefinition
- the config definition to use for the schema
-
allConfigsProduced
Set<com.yahoo.vespa.config.ConfigKey<?>> allConfigsProduced()Produces a set of the valid config keys for this model. -
getHosts
Collection<HostInfo> getHosts()Returns information about all hosts used in this model. -
allConfigIds
Returns all the config ids available for this model. -
fileReferences
Set<com.yahoo.config.FileReference> fileReferences()The set of files that should be distributed to the hosts in this model. -
allocatedHosts
com.yahoo.config.provision.AllocatedHosts allocatedHosts()Gets the allocated hosts for this model.- Returns:
AllocatedHosts
instance, if available
-
allowModelVersionMismatch
Returns whether this application allows serving config request for a different version. This is a validation override which is useful when we skip loading old config models due to some problem, or when we need to try a newer version of the platform on some node. -
skipOldConfigModels
Returns whether old config models should be loaded (default) or not. Skipping old config models is a validation override which is useful when the old model version is known to contain some incompatibility with the application package and it is believed that the latest model version will deliver usable config for old versions requesting config.If a model returns true to this it should also return true to
allowModelVersionMismatch(java.time.Instant)
or clients requesting config for those old models will not get config at all. -
version
default com.yahoo.component.Version version()Returns the version of this model. -
wantedNodeVersion
default com.yahoo.component.Version wantedNodeVersion()Returns the wanted node version of this model. -
provisioned
Returns the provisioned hosts of this. -
documentTypesByCluster
Returns the set of document types in each content cluster. -
indexedDocumentTypesByCluster
Returns the set of document types in each cluster, that have an index for one of more fields. -
applicationClusterInfo
Returns the set of container clusters
-