From 75f52ac3eee11b7fe19df7baf223619f79e55582 Mon Sep 17 00:00:00 2001 From: pravussum Date: Tue, 5 Jan 2021 23:27:35 +0100 Subject: [PATCH] add getPoolNames method to ThreadPoolManager (#2065) Signed-off-by: Robert Bach --- .../main/java/org/openhab/core/common/ThreadPoolManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java index 790236582a5..66e9a0d0bb0 100644 --- a/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java +++ b/bundles/org.openhab.core/src/main/java/org/openhab/core/common/ThreadPoolManager.java @@ -14,6 +14,7 @@ import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import java.util.WeakHashMap; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutorService; @@ -167,4 +168,8 @@ protected static int getConfig(String poolName) { Integer cfg = configs.get(poolName); return (cfg != null) ? cfg : DEFAULT_THREAD_POOL_SIZE; } + + public static Set getPoolNames() { + return pools.keySet(); + } }