diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-08-28 09:33:13 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-08-28 09:33:13 +0200 |
commit | fc2f74f461fe2a049f3c7c362f83b48c0d3ae68b (patch) | |
tree | f37c4837ee3bb13eb0d1a3d3f5f1bce9eb52d208 /config-model-api/src/main/java/com/yahoo/config/model/api/Model.java | |
parent | de0d1ef384f75c8c0fc08503d75cfcaa5e494a5a (diff) |
Allocation consistency between model versions
Diffstat (limited to 'config-model-api/src/main/java/com/yahoo/config/model/api/Model.java')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/Model.java | 26 |
1 files changed, 13 insertions, 13 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 0c038077fe4..db589ef5d21 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 @@ -16,8 +16,7 @@ import java.util.Collection; * A {@link Model} represents the interface towards the model of an entire tenant, and defines methods * for querying this model. * - * @author lulf - * @since 5.1 + * @author Ulf Lilleengen */ public interface Model { @@ -60,9 +59,20 @@ public interface Model { /** * Get the provisioning info for this model. + * * @return {@link ProvisionInfo} instance, if available. + * @deprecated use provisionInfo */ - Optional<ProvisionInfo> getProvisionInfo(); + @Deprecated + // TODO: Remove this (and the implementation below) when no version older than 6.142 is deployed anywhere + default Optional<ProvisionInfo> getProvisionInfo() { + return Optional.of(provisionInfo()); + } + + @SuppressWarnings("deprecation") + default ProvisionInfo provisionInfo() { + return getProvisionInfo().get(); + } /** * Returns whether this application allows serving config request for a different version. @@ -71,11 +81,6 @@ public interface Model { */ default boolean allowModelVersionMismatch(Instant now) { return false; } - /** @deprecated pass now. */ - // TODO: Remove this when no version older than 6.115 is deployed anywhere - @Deprecated - default boolean allowModelVersionMismatch() { return allowModelVersionMismatch(Clock.systemUTC().instant()); } - /** * 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 @@ -88,9 +93,4 @@ public interface Model { */ default boolean skipOldConfigModels(Instant now) { return false; } - /** @deprecated pass now. */ - // TODO: Remove this when no version older than 6.115 is deployed anywhere - @Deprecated - default boolean skipOldConfigModels() { return skipOldConfigModels(Clock.systemUTC().instant()); } - } |