diff options
author | Øyvind Grønnesby <oyving@yahooinc.com> | 2023-11-02 14:33:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 14:33:49 +0100 |
commit | 78316354ce82d77d79a15e1f23c67b4546f39480 (patch) | |
tree | 2f71a75b83699b22c0eac5799c27b22fbcaba178 /config-model-api/src/main/java | |
parent | ff1f66d284015e03537c34b4dc2cd0d8eb530fbe (diff) | |
parent | 6572324794d105fcf24b5d98f7405b2aea48de0b (diff) |
Merge pull request #29173 from vespa-engine/hmusum/minor-cleanup
Minor cleanup
Diffstat (limited to 'config-model-api/src/main/java')
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/Quota.java | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/Quota.java b/config-model-api/src/main/java/com/yahoo/config/model/api/Quota.java index b652f9e8a68..f49bb224394 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/Quota.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/Quota.java @@ -25,12 +25,7 @@ public class Quota { /** The max budget in dollars per hour */ private final Optional<BigDecimal> budget; - public Quota(Optional<Integer> maxClusterSize, Optional<Integer> budget) { - this(maxClusterSize, budget.map(BigDecimal::new), true); - } - - // TODO: Remove unused argument - private Quota(Optional<Integer> maxClusterSize, Optional<BigDecimal> budget, boolean isDecimal) { + public Quota(Optional<Integer> maxClusterSize, Optional<BigDecimal> budget) { this.maxClusterSize = Objects.requireNonNull(maxClusterSize); this.budget = Objects.requireNonNull(budget); } @@ -38,15 +33,15 @@ public class Quota { public static Quota fromSlime(Inspector inspector) { var clusterSize = SlimeUtils.optionalInteger(inspector.field("clusterSize")); var budget = budgetFromSlime(inspector.field("budget")); - return new Quota(clusterSize.stream().boxed().findFirst(), budget, true); + return new Quota(clusterSize.stream().boxed().findFirst(), budget); } public Quota withBudget(BigDecimal budget) { - return new Quota(this.maxClusterSize, Optional.of(budget), true); + return new Quota(this.maxClusterSize, Optional.of(budget)); } public Quota withClusterSize(int clusterSize) { - return new Quota(Optional.of(clusterSize), this.budget, true); + return new Quota(Optional.of(clusterSize), this.budget); } public Slime toSlime() { |