Class Bulkhead.SemaphoreBuilder

java.lang.Object
cloud.opencode.base.cache.protection.Bulkhead.SemaphoreBuilder
Enclosing interface:
Bulkhead

public static class Bulkhead.SemaphoreBuilder extends Object
Builder for semaphore-based bulkhead 信号量舱壁构建器
Since:
JDK 25, opencode-base-cache V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Details

    • maxConcurrentCalls

      public Bulkhead.SemaphoreBuilder maxConcurrentCalls(int maxConcurrentCalls)
      Set maximum concurrent calls 设置最大并发调用数
      Parameters:
      maxConcurrentCalls - max concurrent calls | 最大并发调用数
      Returns:
      this builder | 此构建器
    • maxWaitDuration

      public Bulkhead.SemaphoreBuilder maxWaitDuration(Duration maxWaitDuration)
      Set maximum wait duration for permit 设置获取许可的最大等待时间
      Parameters:
      maxWaitDuration - max wait duration | 最大等待时间
      Returns:
      this builder | 此构建器
    • build

      public Bulkhead build()
      Build the bulkhead 构建舱壁
      Returns:
      bulkhead | 舱壁