diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-03-14 21:23:35 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-03-14 21:23:35 +0100 |
commit | 239c50e23bf179ccae8bbab208df4367b5388f50 (patch) | |
tree | 8f1a65b992e79da2a66eca42b0185bb1cb2c2720 /config-model | |
parent | 512745dd620abd94fffa1b61644b85dcb467e90c (diff) |
Whitespace changes
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/Container.java | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java b/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java index 5b219e53315..56fa3d01abc 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/Container.java @@ -150,9 +150,7 @@ public class Container extends AbstractService implements } public Http getHttp() { - return (parent instanceof ContainerCluster) ? - ((ContainerCluster) parent).getHttp(): - null; + return (parent instanceof ContainerCluster) ? ((ContainerCluster) parent).getHttp() : null; } public JettyHttpServer getDefaultHttpServer() { @@ -163,8 +161,7 @@ public class Container extends AbstractService implements public int index() { return index; } // We cannot set bindings yet, as baseport is not initialized - public void addBuiltinHandlers() { - } + public void addBuiltinHandlers() { } @Override public void initService() { @@ -242,9 +239,7 @@ public class Container extends AbstractService implements @Override public int getWantedPort() { - return getHttp() == null ? - BASEPORT: - 0; + return getHttp() == null ? BASEPORT: 0; } /** @@ -253,7 +248,6 @@ public class Container extends AbstractService implements @Override public boolean requiresWantedPort() { return getHttp() == null; - } public boolean requiresConsecutivePorts() { @@ -281,9 +275,7 @@ public class Container extends AbstractService implements } private int getRpcPort() { - return isRpcServerEnabled() ? - getRelativePort(numHttpServerPorts + 1) : - 0; + return isRpcServerEnabled() ? getRelativePort(numHttpServerPorts + 1) : 0; } private int getMessagingPort() { @@ -356,8 +348,7 @@ public class Container extends AbstractService implements @Override public void getConfig(ComponentsConfig.Builder builder) { - builder.components.addAll( - ComponentsConfigGenerator.generate(allEnabledComponents())); + builder.components.addAll(ComponentsConfigGenerator.generate(allEnabledComponents())); } private Collection<Component<?, ?>> allEnabledComponents() { @@ -368,12 +359,10 @@ public class Container extends AbstractService implements private void addAllEnabledComponents(Collection<Component<?, ?>> allComponents, AbstractConfigProducer<?> current) { for (AbstractConfigProducer<?> child: current.getChildren().values()) { - if (!httpServerEnabled && isHttpServer(child)) - continue; + if ( ! httpServerEnabled && isHttpServer(child)) continue; - if (child instanceof Component) { + if (child instanceof Component) allComponents.add((Component<?, ?>) child); - } addAllEnabledComponents(allComponents, child); } @@ -396,16 +385,14 @@ public class Container extends AbstractService implements @Override public void getConfig(ContainerMbusConfig.Builder builder) { - builder.enabled(messageBusEnabled). - port(getMessagingPort()); + builder.enabled(messageBusEnabled).port(getMessagingPort()); } @Override public HashMap<String,String> getDefaultMetricDimensions(){ HashMap<String, String> dimensions = new HashMap<>(); - if (clusterName != null) { + if (clusterName != null) dimensions.put("clustername", clusterName); - } return dimensions; } |