summaryrefslogtreecommitdiffstats
path: root/config-model-api
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-11-30 14:33:23 +0100
committerJon Bratseth <bratseth@gmail.com>2020-11-30 14:33:23 +0100
commite3743e075e1eeb088fbb9b2f4146ef1faeb08d9a (patch)
tree373c0c96520bf1efabecda9e568a986fdf5572bb /config-model-api
parenta3289b0060bd7a0e5eb2b6d638c05c9d76e3a8d4 (diff)
Revert "Merge pull request #15532 from vespa-engine/revert-15527-bratseth/apply-on-restart-take-5"
This reverts commit d91c72c22cae12468103ed4c43729e745916943e, reversing changes made to 9b47661ae5682e87cd963c63bdc2717896f468db.
Diffstat (limited to 'config-model-api')
-rw-r--r--config-model-api/src/main/java/com/yahoo/config/model/api/Model.java40
1 files changed, 20 insertions, 20 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/Model.java b/config-model-api/src/main/java/com/yahoo/config/model/api/Model.java
index d25de9fb334..068a4ded79d 100644
--- a/config-model-api/src/main/java/com/yahoo/config/model/api/Model.java
+++ b/config-model-api/src/main/java/com/yahoo/config/model/api/Model.java
@@ -2,6 +2,7 @@
package com.yahoo.config.model.api;
import com.yahoo.component.Version;
+import com.yahoo.config.ConfigInstance;
import com.yahoo.config.FileReference;
import com.yahoo.config.provision.AllocatedHosts;
import com.yahoo.vespa.config.ConfigKey;
@@ -23,41 +24,43 @@ public interface Model {
/**
* Resolves config for a given key and config definition
*
- * @param configKey The key to resolve
- * @param configDefinition The config definition to use for the schema
+ * @param configKey the key to resolve
+ * @param configDefinition the config definition to use for the schema
*/
+ @Deprecated // TODO: Return after December 2020
ConfigPayload getConfig(ConfigKey<?> configKey, ConfigDefinition configDefinition);
/**
- * Produces a set of the valid config keys for this model.
+ * Resolves config for a given key and config definition
+ *
+ * @param configKey the key to resolve
+ * @param configDefinition the config definition to use for the schema
*/
+ ConfigInstance.Builder getConfigInstance(ConfigKey<?> configKey, ConfigDefinition configDefinition);
+
+ /** Produces a set of the valid config keys for this model. */
Set<ConfigKey<?>> allConfigsProduced();
- /**
- * Returns information about all hosts used in this model.
- */
+ /** Returns information about all hosts used in this model. */
Collection<HostInfo> getHosts();
- /**
- * Returns all the config ids available for this model.
- */
+ /** Returns all the config ids available for this model. */
Set<String> allConfigIds();
/**
* Asks the {@link Model} instance to distribute files using provided filedistribution instance.
- * @param fileDistribution {@link com.yahoo.config.model.api.FileDistribution} instance that can be called to distribute files.
+ *
+ * @param fileDistribution instance that can be called to distribute files
*/
void distributeFiles(FileDistribution fileDistribution);
- /**
- * The set of files that should be distributed to the hosts in this model.
- */
+ /** The set of files that should be distributed to the hosts in this model. */
Set<FileReference> fileReferences();
/**
* Gets the allocated hosts for this model.
*
- * @return {@link AllocatedHosts} instance, if available.
+ * @return {@link AllocatedHosts} instance, if available
*/
AllocatedHosts allocatedHosts();
@@ -80,13 +83,10 @@ public interface Model {
*/
default boolean skipOldConfigModels(Instant now) { return false; }
- /**
- * Returns the version of this model
- */
+ /** Returns the version of this model. */
default Version version() { return Version.emptyVersion; }
- /**
- * Returns the provisioned hosts of this
- */
+ /** Returns the provisioned hosts of this. */
default Provisioned provisioned() { return new Provisioned(); }
+
}