Class ResilienceConfiguration.BulkheadConfiguration

java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration.BulkheadConfiguration
Enclosing class:
ResilienceConfiguration

public static final class ResilienceConfiguration.BulkheadConfiguration extends Object
Provides options specific to bulkheads.
  • Field Details

    • DEFAULT_MAX_CONCURRENT_CALLS

      public static final int DEFAULT_MAX_CONCURRENT_CALLS
      The default maximum number of concurrent calls.
      See Also:
    • DEFAULT_MAX_WAIT_DURATION

      public static final Duration DEFAULT_MAX_WAIT_DURATION
      The default maximum duration a thread will wait for to enter the bulkhead.
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Get the status indicator for the Bulkhead.
      Returns:
      True if the configuration is enabled.
    • disabled

      @Nonnull public static ResilienceConfiguration.BulkheadConfiguration disabled()
      Instantiates a new BulkheadConfiguration that allows for unlimited concurrent calls, effectively disabling the bulkhead functionality.
      Returns:
      A disabled BulkheadConfiguration.
    • of

      @Nonnull public static ResilienceConfiguration.BulkheadConfiguration of()
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • maxConcurrentCalls

      public int maxConcurrentCalls()
      The maximum number of concurrent calls.
    • maxWaitDuration

      @Nonnull public Duration maxWaitDuration()
      The maximum duration the calling thread will wait to enter the bulkhead.
    • maxConcurrentCalls

      @Nonnull public ResilienceConfiguration.BulkheadConfiguration maxConcurrentCalls(int maxConcurrentCalls)
      The maximum number of concurrent calls.
      Returns:
      this.
    • maxWaitDuration

      @Nonnull public ResilienceConfiguration.BulkheadConfiguration maxWaitDuration(@Nonnull Duration maxWaitDuration)
      The maximum duration the calling thread will wait to enter the bulkhead.
      Returns:
      this.