diff options
4 files changed, 4 insertions, 40 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java b/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java index 7c805417739..f2d63f3bba4 100644 --- a/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java +++ b/config-model/src/main/java/com/yahoo/config/model/ApplicationConfigProducerRoot.java @@ -102,21 +102,6 @@ public class ApplicationConfigProducerRoot extends TreeConfigProducer<AnyConfigP } /** - * Returns the Service with the given id, or null if no such - * configId exists or if it belongs to a non-Service ConfigProducer. - * - * @param configId The configId, e.g. "search.0/tld.0" - * @return Service with the given configId - */ - public Service getService(String configId) { - ConfigProducer cp = getConfigProducer(configId); - if (cp == null || !(cp instanceof Service)) { - return null; - } - return (Service) cp; - } - - /** * Adds the descendant (at any depth level), so it can be looked up * on configId in the Map. * diff --git a/config-model/src/main/java/com/yahoo/config/model/test/MockApplicationPackage.java b/config-model/src/main/java/com/yahoo/config/model/test/MockApplicationPackage.java index 9ee279c68d3..b5999c15fad 100644 --- a/config-model/src/main/java/com/yahoo/config/model/test/MockApplicationPackage.java +++ b/config-model/src/main/java/com/yahoo/config/model/test/MockApplicationPackage.java @@ -215,13 +215,6 @@ public class MockApplicationPackage implements ApplicationPackage { return new MockApplicationPackage.Builder().withHosts(emptyHosts).withServices(emptyServices).build(); } - public static ApplicationPackage fromSearchDefinitionDirectory(String dir) { - return new MockApplicationPackage.Builder() - .withEmptyHosts() - .withEmptyServices() - .withSchemaDir(dir).build(); - } - // TODO: It might work to just merge this and the above public static ApplicationPackage fromSearchDefinitionAndRootDirectory(String dir) { return new MockApplicationPackage.Builder() diff --git a/config-model/src/main/java/com/yahoo/config/model/test/TestUtil.java b/config-model/src/main/java/com/yahoo/config/model/test/TestUtil.java index c05d7bf4942..24c418a9d2f 100644 --- a/config-model/src/main/java/com/yahoo/config/model/test/TestUtil.java +++ b/config-model/src/main/java/com/yahoo/config/model/test/TestUtil.java @@ -4,8 +4,6 @@ package com.yahoo.config.model.test; import com.yahoo.collections.CollectionUtil; import com.yahoo.config.model.builder.xml.XmlHelper; import org.w3c.dom.Element; -import org.xml.sax.InputSource; - import java.io.StringReader; import java.util.ArrayList; import java.util.Arrays; @@ -35,7 +33,4 @@ public class TestUtil { return String.join("\n", lines); } - private static InputSource inputSource(String str) { - return new InputSource(new StringReader(str)); - } } diff --git a/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java b/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java index 125966ae91d..2f704db1862 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java @@ -22,11 +22,7 @@ public class HostPorts { public final static int BASE_PORT = 19100; final static int MAX_PORTS = 799; - private DeployLogger deployLogger = new DeployLogger() { - public void log(Level level, String message) { - System.err.println("deploy log["+level+"]: "+message); - } - }; + private DeployLogger deployLogger = (level, message) -> System.err.println("deploy log["+level+"]: "+message); private final Map<Integer, NetworkPortRequestor> portDB = new LinkedHashMap<>(); @@ -98,7 +94,7 @@ public class HostPorts { /** Allocate a specific port number for a service */ public int requireNetworkPort(int port, NetworkPortRequestor service, String suffix) { - reservePort(service, port, suffix); + reservePort(service, port); String servType = service.getServiceType(); String configId = service.getConfigId(); portFinder.use(new NetworkPorts.Allocation(port, servType, configId, suffix)); @@ -119,18 +115,13 @@ public class HostPorts { return requireNetworkPort(port, service, suffix); } - /** Convenience method to allocate a preferred or required port number for a service */ - public int wantNetworkPort(int port, NetworkPortRequestor service, String suffix, boolean forceRequired) { - return forceRequired ? requireNetworkPort(port, service, suffix) : wantNetworkPort(port, service, suffix); - } - /** Allocate a dynamic port number for a service */ public int allocateNetworkPort(NetworkPortRequestor service, String suffix) { String servType = service.getServiceType(); String configId = service.getConfigId(); int fallback = nextAvailableNetworkPort(); int port = portFinder.findPort(new NetworkPorts.Allocation(fallback, servType, configId, suffix), hostname); - reservePort(service, port, suffix); + reservePort(service, port); portFinder.use(new NetworkPorts.Allocation(port, servType, configId, suffix)); return port; } @@ -161,7 +152,7 @@ public class HostPorts { * @param service the service that wishes to reserve the port. * @param port the port to be reserved. */ - void reservePort(NetworkPortRequestor service, int port, String suffix) { + void reservePort(NetworkPortRequestor service, int port) { if (portDB.containsKey(port)) { portAlreadyReserved(service, port); } |