update method name

pull/756/head
weihu 3 years ago
parent a8fdbbc50c
commit 5f9ba8d12e

@ -227,11 +227,11 @@ public class ThreadPoolBuilder implements Builder<ThreadPoolExecutor> {
} }
/** /**
* Create thread pool by thread pool id * Create dynamic thread pool by thread pool id
* @param threadPoolId threadPoolId * @param threadPoolId threadPoolId
* @return ThreadPoolExecutor * @return ThreadPoolExecutor
*/ */
public static ThreadPoolExecutor builderById(String threadPoolId) { public static ThreadPoolExecutor builderDynamicPoolById(String threadPoolId) {
return ThreadPoolBuilder.builder() return ThreadPoolBuilder.builder()
.threadFactory(threadPoolId) .threadFactory(threadPoolId)
.threadPoolId(threadPoolId) .threadPoolId(threadPoolId)

@ -37,6 +37,6 @@ public class ThreadPoolConfig {
@DynamicThreadPool @DynamicThreadPool
public ThreadPoolExecutor messageConsumeDynamicExecutor() { public ThreadPoolExecutor messageConsumeDynamicExecutor() {
String threadPoolId = "message-consume"; String threadPoolId = "message-consume";
return ThreadPoolBuilder.builderById(threadPoolId); return ThreadPoolBuilder.builderDynamicPoolById(threadPoolId);
} }
} }

Loading…
Cancel
Save