diff options
author | Jon Bratseth <bratseth@verizonmedia.com> | 2019-09-07 16:13:18 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@verizonmedia.com> | 2019-09-07 16:13:18 +0200 |
commit | 7c96e6604e5120e4be6c680ecb9963e11df24e79 (patch) | |
tree | 699bc5235b4f510905ec0e9cdfaa6c7f6a7e781b /controller-api | |
parent | 6566175df8d1f99fb9476df3ba5cc121f9f605c9 (diff) |
Minor simplification
Diffstat (limited to 'controller-api')
2 files changed, 6 insertions, 4 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/MeteringClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/MeteringClient.java index 90f1741a2f1..632dbaad419 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/MeteringClient.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/resource/MeteringClient.java @@ -1,6 +1,7 @@ // Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.resource; +import java.util.Collection; import java.util.List; /** @@ -10,7 +11,7 @@ import java.util.List; */ public interface MeteringClient { - void consume(List<ResourceSnapshot> resources); + void consume(Collection<ResourceSnapshot> resources); MeteringInfo getResourceSnapshots(String tenantName, String applicationName); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockMeteringClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockMeteringClient.java index ed9c95bb795..10e1eb39c8a 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockMeteringClient.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/stubs/MockMeteringClient.java @@ -7,6 +7,7 @@ import com.yahoo.vespa.hosted.controller.api.integration.resource.ResourceSnapsh import com.yahoo.vespa.hosted.controller.api.integration.resource.MeteringClient; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Optional; @@ -16,11 +17,11 @@ import java.util.Optional; */ public class MockMeteringClient implements MeteringClient { - private List<ResourceSnapshot> resources = new ArrayList<>(); + private Collection<ResourceSnapshot> resources = new ArrayList<>(); private Optional<MeteringInfo> meteringInfo; @Override - public void consume(List<ResourceSnapshot> resources){ + public void consume(Collection<ResourceSnapshot> resources){ this.resources = resources; } @@ -32,7 +33,7 @@ public class MockMeteringClient implements MeteringClient { }); } - public List<ResourceSnapshot> consumedResources() { + public Collection<ResourceSnapshot> consumedResources() { return this.resources; } |