Class BatchProcessor.Builder
java.lang.Object
cloud.opencode.base.parallel.batch.BatchProcessor.Builder
- Enclosing class:
BatchProcessor
Builder for BatchProcessor.
BatchProcessor 的构建器。
- Since:
- JDK 25, opencode-base-parallel V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionbatchSize(int batchSize) Sets the batch size.build()Builds the processor.executor(ExecutorService executor) Sets the executor.parallelism(int parallelism) Sets the parallelism.stopOnError(boolean stopOnError) Sets whether to stop on error.Sets the timeout.
-
Method Details
-
batchSize
Sets the batch size. 设置批大小。- Parameters:
batchSize- the batch size - 批大小- Returns:
- this builder - 此构建器
-
parallelism
Sets the parallelism. 设置并行度。- Parameters:
parallelism- the parallelism - 并行度- Returns:
- this builder - 此构建器
-
timeout
Sets the timeout. 设置超时。- Parameters:
timeout- the timeout - 超时- Returns:
- this builder - 此构建器
-
executor
Sets the executor. 设置执行器。- Parameters:
executor- the executor - 执行器- Returns:
- this builder - 此构建器
-
stopOnError
Sets whether to stop on error. 设置是否在错误时停止。- Parameters:
stopOnError- whether to stop - 是否停止- Returns:
- this builder - 此构建器
-
build
-