8000 Enable other class find all threadpool and logspaces by HzjNeverStop · Pull Request #201 · sofastack/sofa-common-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Enable other class find all threadpool and logspaces #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>com.alipay.sofa.common</groupId>
<artifactId>sofa-common-tools</artifactId>
<version>2.1.0</version>
<version>2.1.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.slf4j.Logger;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

Expand Down Expand Up @@ -361,4 +362,8 @@ private static AbstractLoggerSpaceFactory createILoggerFactory(SpaceId spaceId,

return NOP_LOGGER_FACTORY;
}

public static Map<SpaceId, LogSpace> getLogFactoryMap() {
return new HashMap<>(LOG_FACTORY_MAP);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import com.alipay.sofa.common.thread.space.ThreadPoolSpace;
import com.alipay.sofa.common.utils.StringUtil;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.*;

Expand Down Expand Up @@ -366,4 +368,7 @@ public void setMonitorThreadPoolBySpaceName(String spaceName, long period) {
});
ThreadLogger.info("Thread pool with spaceName '{}' rescheduled with period '{}'", spaceName, period);
}
public Collection<ThreadPoolMonitorWrapper> getAllThreadPoolWrappers() {
return new ArrayList<>(registry.values());
}
}
0