Class ResilienceConfiguration.BulkheadConfiguration
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration.BulkheadConfiguration
- Enclosing class:
- ResilienceConfiguration
Provides options specific to bulkheads.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default maximum number of concurrent calls.static final Duration
The default maximum duration a thread will wait for to enter the bulkhead. -
Method Summary
Modifier and TypeMethodDescriptiondisabled()
Instantiates a newBulkheadConfiguration
that allows for unlimited concurrent calls, effectively disabling the bulkhead functionality.boolean
int
hashCode()
boolean
Get the status indicator for the Bulkhead.int
The 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 newBulkheadConfiguration
that 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
.
-