diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2020-09-07 15:15:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-07 15:15:00 +0200 |
commit | 8a7eaca15c977452e5b022cb6e69824ca31691f8 (patch) | |
tree | 4f6468e2be7ed15649290fcac8b0b1a97f432622 /config-model/src/main/java/com | |
parent | bf725254e886c67df4df14b6a0a2990186867ea7 (diff) | |
parent | 9effe4b9825308b65bb8e3e69fec3941000c8c08 (diff) |
Merge pull request #14310 from vespa-engine/bjorncs/separate-config-def-container-thread-pool
Use separate non-public config definition for ContainerThreadPool
Diffstat (limited to 'config-model/src/main/java/com')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/container/ThreadPoolExecutorComponent.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/ThreadPoolExecutorComponent.java b/config-model/src/main/java/com/yahoo/vespa/model/container/ThreadPoolExecutorComponent.java index aac73ce7636..9d59941f603 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/container/ThreadPoolExecutorComponent.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/container/ThreadPoolExecutorComponent.java @@ -2,8 +2,8 @@ package com.yahoo.vespa.model.container; import com.yahoo.container.bundle.BundleInstantiationSpecification; -import com.yahoo.container.handler.ThreadpoolConfig; import com.yahoo.container.handler.threadpool.ContainerThreadPool; +import com.yahoo.container.handler.threadpool.ContainerThreadpoolConfig; import com.yahoo.osgi.provider.model.ComponentModel; import com.yahoo.vespa.model.container.component.SimpleComponent; @@ -14,7 +14,7 @@ import java.time.Duration; * * @author bjorncs */ -public class ThreadPoolExecutorComponent extends SimpleComponent implements ThreadpoolConfig.Producer { +public class ThreadPoolExecutorComponent extends SimpleComponent implements ContainerThreadpoolConfig.Producer { private final String name; private final Integer maxPoolSize; @@ -38,10 +38,10 @@ public class ThreadPoolExecutorComponent extends SimpleComponent implements Thre } @Override - public void getConfig(ThreadpoolConfig.Builder builder) { + public void getConfig(ContainerThreadpoolConfig.Builder builder) { builder.name(this.name); - if (maxPoolSize != null) builder.maxthreads(maxPoolSize); - if (corePoolSize != null) builder.corePoolSize(corePoolSize); + if (maxPoolSize != null) builder.maxThreads(maxPoolSize); + if (corePoolSize != null) builder.minThreads(corePoolSize); if (keepAliveTime != null) builder.keepAliveTime(keepAliveTime.toMillis() / 1000D); if (queueSize != null) builder.queueSize(queueSize); if (maxThreadExecutionTime != null) builder.maxThreadExecutionTimeSeconds((int)maxThreadExecutionTime.toMillis() / 1000); |