diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-10-08 22:32:10 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2018-10-08 22:33:55 +0200 |
commit | dd70aed6d773d02a1ac19c7c3af642feeef2212f (patch) | |
tree | fb7454fabb447e3332a647b35a122772c13cfe4f /config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java | |
parent | 622a5de6662af3f516d0898bfe78adc270f4b294 (diff) |
Wire in deployLogger explicit instead of using a backdoor.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java b/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java index 540393cec7b..fcd9df309a4 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java @@ -2,6 +2,7 @@ package com.yahoo.vespa.model; import com.yahoo.config.FileReference; +import com.yahoo.config.application.api.DeployLogger; import com.yahoo.config.model.api.PortInfo; import com.yahoo.config.model.api.ServiceInfo; import com.yahoo.config.model.producer.AbstractConfigProducer; @@ -123,7 +124,7 @@ public abstract class AbstractService extends AbstractConfigProducer<AbstractCon * @param hostResource The physical host on which this service should run. * @param userPort The wanted port given by the user. */ - private void initService(HostResource hostResource, int userPort) { + private void initService(DeployLogger deployLogger, HostResource hostResource, int userPort) { if (initialized) { throw new IllegalStateException("Service '" + getConfigId() + "' already initialized."); } @@ -132,7 +133,7 @@ public abstract class AbstractService extends AbstractConfigProducer<AbstractCon "The hostalias is probably missing from hosts.xml."); } id = getIndex(hostResource); - ports = hostResource.allocateService(this, getInstanceWantedPort(userPort)); + ports = hostResource.allocateService(deployLogger, this, getInstanceWantedPort(userPort)); initialized = true; } @@ -140,8 +141,8 @@ public abstract class AbstractService extends AbstractConfigProducer<AbstractCon * Called by builder class which has not given the host or port in a constructor, hence * initService is not yet run for this. */ - public void initService() { - initService(this.hostResource, this.basePort); + public void initService(DeployLogger deployLogger) { + initService(deployLogger, this.hostResource, this.basePort); } /** |