Class ResilienceConfiguration.BulkheadConfiguration
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration.BulkheadConfiguration
- Enclosing class:
- ResilienceConfiguration
Provides options specific to bulkheads.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default maximum number of concurrent calls.static final DurationThe default maximum duration a thread will wait for to enter the bulkhead. -
Method Summary
Modifier and TypeMethodDescriptiondisabled()Instantiates a newBulkheadConfigurationthat allows for unlimited concurrent calls, effectively disabling the bulkhead functionality.booleaninthashCode()booleanGet the status indicator for the Bulkhead.intThe maximum number of concurrent calls.maxConcurrentCalls(int maxConcurrentCalls) The maximum number of concurrent calls.The maximum duration the calling thread will wait to enter the bulkhead.maxWaitDuration(Duration maxWaitDuration) The maximum duration the calling thread will wait to enter the bulkhead.of()
-
Field Details
-
DEFAULT_MAX_CONCURRENT_CALLS
public static final int DEFAULT_MAX_CONCURRENT_CALLSThe default maximum number of concurrent calls.- See Also:
-
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
Instantiates a newBulkheadConfigurationthat allows for unlimited concurrent calls, effectively disabling the bulkhead functionality.- Returns:
- A disabled
BulkheadConfiguration.
-
of
-
equals
-
hashCode
public int hashCode() -
maxConcurrentCalls
public int maxConcurrentCalls()The maximum number of concurrent calls. -
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.
-