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 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 resolve
      configDefinition - 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

      Set<String> 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

      default boolean allowModelVersionMismatch(Instant now)
      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

      default boolean skipOldConfigModels(Instant now)
      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

      default Provisioned provisioned()
      Returns the provisioned hosts of this.
    • documentTypesByCluster

      default Map<String,Set<String>> documentTypesByCluster()
      Returns the set of document types in each content cluster.
    • indexedDocumentTypesByCluster

      default Map<String,Set<String>> indexedDocumentTypesByCluster()
      Returns the set of document types in each cluster, that have an index for one of more fields.
    • applicationClusterInfo

      default Set<ApplicationClusterInfo> applicationClusterInfo()
      Returns the set of container clusters