diff options
author | Harald Musum <musum@yahoo-inc.com> | 2017-02-11 12:09:09 +0100 |
---|---|---|
committer | Harald Musum <musum@yahoo-inc.com> | 2017-02-11 12:09:09 +0100 |
commit | 246e2593bb80b2421a3e659235826d987fd0ddb4 (patch) | |
tree | bafd4fb0793cc1b5b9d046938e3cc0c194c4a6b2 /config-model-api/src/main/java/com/yahoo | |
parent | 77026d390cb95bd203c5a594ecb869a856947751 (diff) |
Clean up interface
* Remove 'throws IOException now that no implementors use it and handle
getConfig now returning null instead of exception when no config found
* Remove getConfig method with InnerCNode as 2nd argument
* Prepare for removing 3-argument getConfig()
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/ConfigDefinitionRepo.java | 3 | ||||
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/Model.java | 12 |
2 files changed, 4 insertions, 11 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigDefinitionRepo.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigDefinitionRepo.java index 69dc3f08d64..6c407bc6064 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigDefinitionRepo.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ConfigDefinitionRepo.java @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.config.model.api; -import com.yahoo.config.codegen.InnerCNode; import com.yahoo.vespa.config.ConfigDefinitionKey; import com.yahoo.vespa.config.buildergen.ConfigDefinition; @@ -16,7 +15,7 @@ import java.util.Map; public interface ConfigDefinitionRepo { /** - * Retrieve a map with all configdefinitions in this repo. + * Retrieve a map with all config definitions in this repo. */ Map<ConfigDefinitionKey, ConfigDefinition> getConfigDefinitions(); 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 e45f0003a62..90ea7b5f15c 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 @@ -1,13 +1,11 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.config.model.api; -import com.yahoo.config.codegen.InnerCNode; import com.yahoo.config.provision.ProvisionInfo; import com.yahoo.vespa.config.ConfigKey; import com.yahoo.vespa.config.ConfigPayload; import com.yahoo.vespa.config.buildergen.ConfigDefinition; -import java.io.IOException; import java.util.Optional; import java.util.Set; import java.util.Collection; @@ -28,20 +26,16 @@ public interface Model { * @param targetDef The config definition to use for applying defaults. * @return override The global override to apply to the generated config. */ - // TODO: Remove 'throws IOException' when 6.67 is deployed everywhere - ConfigPayload getConfig(ConfigKey<?> configKey, ConfigDefinition targetDef, ConfigPayload override) throws IOException; + // TODO: Remove when 6.70 is deployed everywhere + ConfigPayload getConfig(ConfigKey<?> configKey, ConfigDefinition targetDef, ConfigPayload override); /** - * TODO: Remove this method once no fat bundles implementing it anymore. - * Use {@link Model#getConfig(ConfigKey, ConfigDefinition, ConfigPayload)} instead. - * * Resolves a config using a given def file, apply overrides and returns it. * * @param configKey The key of the config to retrieve. * @param targetDef The config definition to use for applying defaults. - * @return override The global override to apply to the generated config. */ - ConfigPayload getConfig(ConfigKey<?> configKey, InnerCNode targetDef, ConfigPayload override) throws IOException; + ConfigPayload getConfig(ConfigKey<?> configKey, ConfigDefinition targetDef); /** * Produces a set of the valid config keys for this model. |