|
|
@ -147,6 +147,13 @@ public class ThreadPoolBuilder implements Builder<ThreadPoolExecutor> {
|
|
|
|
return this;
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ThreadPoolBuilder singlePool() {
|
|
|
|
|
|
|
|
int singleNum = 1;
|
|
|
|
|
|
|
|
this.corePoolSize = singleNum;
|
|
|
|
|
|
|
|
this.maxPoolSize = singleNum;
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ThreadPoolBuilder poolThreadSize(int corePoolSize, int maxPoolSize) {
|
|
|
|
public ThreadPoolBuilder poolThreadSize(int corePoolSize, int maxPoolSize) {
|
|
|
|
this.corePoolSize = corePoolSize;
|
|
|
|
this.corePoolSize = corePoolSize;
|
|
|
|
this.maxPoolSize = maxPoolSize;
|
|
|
|
this.maxPoolSize = maxPoolSize;
|
|
|
|