Class Bulkhead.ThreadPoolBuilder
java.lang.Object
cloud.opencode.base.cache.protection.Bulkhead.ThreadPoolBuilder
- Enclosing interface:
Bulkhead
Builder for thread pool-based bulkhead
线程池舱壁构建器
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the bulkhead 构建舱壁corePoolSize(int corePoolSize) Set core pool size 设置核心池大小keepAliveTime(Duration keepAliveTime) Set keep alive time for idle threads 设置空闲线程的保活时间maxPoolSize(int maxPoolSize) Set max pool size 设置最大池大小maxWaitDuration(Duration maxWaitDuration) Set max wait duration for operation completion 设置操作完成的最大等待时间queueCapacity(int queueCapacity) Set queue capacity 设置队列容量
-
Method Details
-
corePoolSize
Set core pool size 设置核心池大小- Parameters:
corePoolSize- core pool size | 核心池大小- Returns:
- this builder | 此构建器
-
maxPoolSize
Set max pool size 设置最大池大小- Parameters:
maxPoolSize- max pool size | 最大池大小- Returns:
- this builder | 此构建器
-
queueCapacity
Set queue capacity 设置队列容量- Parameters:
queueCapacity- queue capacity (0 for no queue) | 队列容量 (0 表示无队列)- Returns:
- this builder | 此构建器
-
keepAliveTime
Set keep alive time for idle threads 设置空闲线程的保活时间- Parameters:
keepAliveTime- keep alive time | 保活时间- Returns:
- this builder | 此构建器
-
maxWaitDuration
Set max wait duration for operation completion 设置操作完成的最大等待时间- Parameters:
maxWaitDuration- max wait duration | 最大等待时间- Returns:
- this builder | 此构建器
-
build
-