diff options
author | Martin Polden <mpolden@mpolden.no> | 2019-09-04 15:32:10 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2019-09-05 11:23:25 +0200 |
commit | 26842f3a79578c35d74c9f83526a02c3f665fd8b (patch) | |
tree | e5da710f96f1d634f334154e2d37812a17da379d /controller-api | |
parent | 5f2e526646cddbd41295a47e918137cbfb36ebb5 (diff) |
Move EntityService to ServiceRegistry
Diffstat (limited to 'controller-api')
2 files changed, 6 insertions, 6 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java index 34169111079..73a4f56efcf 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/ServiceRegistry.java @@ -4,6 +4,7 @@ package com.yahoo.vespa.hosted.controller.api.integration; import com.yahoo.vespa.hosted.controller.api.integration.certificates.ApplicationCertificateProvider; import com.yahoo.vespa.hosted.controller.api.integration.configserver.ConfigServer; import com.yahoo.vespa.hosted.controller.api.integration.dns.NameService; +import com.yahoo.vespa.hosted.controller.api.integration.entity.EntityService; import com.yahoo.vespa.hosted.controller.api.integration.organization.ContactRetriever; import com.yahoo.vespa.hosted.controller.api.integration.organization.IssueHandler; import com.yahoo.vespa.hosted.controller.api.integration.organization.DeploymentIssues; @@ -44,4 +45,6 @@ public interface ServiceRegistry { DeploymentIssues deploymentIssues(); + EntityService entityService(); + } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java index c5400e2d8e7..a1e633becc6 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/entity/MemoryEntityService.java @@ -1,11 +1,10 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.entity; +import com.google.common.collect.ImmutableMap; import com.yahoo.vespa.hosted.controller.api.identifiers.Property; import com.yahoo.vespa.hosted.controller.api.identifiers.PropertyId; -import java.util.Collections; -import java.util.HashMap; import java.util.Map; /** @@ -15,10 +14,8 @@ public class MemoryEntityService implements EntityService { @Override public Map<PropertyId, Property> listProperties() { - Map<PropertyId, Property> properties = new HashMap<>(); - properties.put(new PropertyId("1234"), new Property("foo")); - properties.put(new PropertyId("4321"), new Property("bar")); - return Collections.unmodifiableMap(properties); + return ImmutableMap.of(new PropertyId("1234"), new Property("foo"), + new PropertyId("4321"), new Property("bar")); } } |