Class ScheduledScope.Builder<T>

java.lang.Object
cloud.opencode.base.parallel.structured.ScheduledScope.Builder<T>
Type Parameters:
T - the result type - 结果类型
Enclosing class:
ScheduledScope<T>

public static final class ScheduledScope.Builder<T> extends Object
Builder for ScheduledScope. ScheduledScope 的构建器。
Since:
JDK 25, opencode-base-parallel V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • deadline

      public ScheduledScope.Builder<T> deadline(Instant deadline)
      Sets the deadline. 设置截止时间。
      Parameters:
      deadline - the deadline - 截止时间
      Returns:
      this builder - 此构建器
    • timeout

      public ScheduledScope.Builder<T> timeout(Duration timeout)
      Sets the timeout (deadline from now). 设置超时(从现在开始计算截止时间)。
      Parameters:
      timeout - the timeout - 超时
      Returns:
      this builder - 此构建器
    • schedulerThreads

      public ScheduledScope.Builder<T> schedulerThreads(int threads)
      Sets the number of scheduler threads. 设置调度器线程数。
      Parameters:
      threads - the number of threads - 线程数
      Returns:
      this builder - 此构建器
    • build

      public ScheduledScope<T> build()
      Builds the scope. 构建作用域。
      Returns:
      the scope - 作用域