Class ResilienceConfiguration
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.ResilienceConfiguration
This type provides options to configure the resilience function decoration.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Provides options specific to bulkheads.static final class
Provides options specific to caching.static final class
Provides options specific to circuit breakers.static final class
Provides options specific to rate limits.static final class
Provides options specific to retries, which will reattempt failed requests a limited amount of times.static final class
Provides options specific to timeouts. -
Constructor Summary
ModifierConstructorDescriptionprotected
ResilienceConfiguration
(String identifier) Constructor for resilience configuration. -
Method Summary
Modifier and TypeMethodDescriptionbulkheadConfiguration
(ResilienceConfiguration.BulkheadConfiguration bulkheadConfiguration) cacheConfiguration
(ResilienceConfiguration.CacheConfiguration cacheConfiguration) protected boolean
circuitBreakerConfiguration
(ResilienceConfiguration.CircuitBreakerConfiguration circuitBreakerConfiguration) static ResilienceConfiguration
Factory function to create a resilience configuration with all resilience features disabled by default.static ResilienceConfiguration
Factory function to create a resilience configuration with all resilience features disabled by default.boolean
int
hashCode()
isolationMode
(ResilienceIsolationMode isolationMode) static ResilienceConfiguration
Factory function to create a resilience configuration with only a subset of resilience features enabled by default.static ResilienceConfiguration
Factory function to create a resilience configuration with default values for the given identifier.rateLimiterConfiguration
(ResilienceConfiguration.RateLimiterConfiguration rateLimiterConfiguration) retryConfiguration
(ResilienceConfiguration.RetryConfiguration retryConfiguration) timeLimiterConfiguration
(ResilienceConfiguration.TimeLimiterConfiguration timeLimiterConfiguration)
-
Constructor Details
-
ResilienceConfiguration
Constructor for resilience configuration.- Parameters:
identifier
- A unique identifier for this configuration.
-
-
Method Details
-
of
Factory function to create a resilience configuration with default values for the given identifier.By default the following resilience features are active with default values:
Timeouts Enabled Circuit Breaker Enabled Bulkhead Enabled Caching Disabled Retries Disabled Rate Limiter Disabled - Parameters:
identifier
- A unique identifier for this configuration.- Returns:
- A resilience configuration.
-
of
Factory function to create a resilience configuration with only a subset of resilience features enabled by default.By default the following resilience features are active with default values:
Timeouts Enabled Circuit Breaker Enabled Bulkhead Enabled Caching Disabled Retries Disabled Rate Limiter Disabled - Parameters:
serviceClass
- The invoking caller class.- Returns:
- An new instance of resilience configuration.
-
empty
Factory function to create a resilience configuration with all resilience features disabled by default. Enable them explicitly through the setters to only add the functionality that is needed.- Parameters:
identifier
- A unique identifier for this configuration.- Returns:
- An empty resilience configuration.
-
empty
Factory function to create a resilience configuration with all resilience features disabled by default. Enable them explicitly through the setters to only add the functionality that is needed.- Parameters:
serviceClass
- The invoking caller class.- Returns:
- An empty resilience configuration.
-
equals
-
canEqual
-
hashCode
public int hashCode() -
identifier
-
isolationMode
-
timeLimiterConfiguration
-
circuitBreakerConfiguration
-
bulkheadConfiguration
-
cacheConfiguration
-
retryConfiguration
-
rateLimiterConfiguration
-
isolationMode
@Nonnull public ResilienceConfiguration isolationMode(@Nonnull ResilienceIsolationMode isolationMode) - Returns:
this
.
-
timeLimiterConfiguration
@Nonnull public ResilienceConfiguration timeLimiterConfiguration(@Nonnull ResilienceConfiguration.TimeLimiterConfiguration timeLimiterConfiguration) - Returns:
this
.
-
circuitBreakerConfiguration
@Nonnull public ResilienceConfiguration circuitBreakerConfiguration(@Nonnull ResilienceConfiguration.CircuitBreakerConfiguration circuitBreakerConfiguration) - Returns:
this
.
-
bulkheadConfiguration
@Nonnull public ResilienceConfiguration bulkheadConfiguration(@Nonnull ResilienceConfiguration.BulkheadConfiguration bulkheadConfiguration) - Returns:
this
.
-
cacheConfiguration
@Nonnull public ResilienceConfiguration cacheConfiguration(@Nonnull ResilienceConfiguration.CacheConfiguration cacheConfiguration) - Returns:
this
.
-
retryConfiguration
@Nonnull public ResilienceConfiguration retryConfiguration(@Nonnull ResilienceConfiguration.RetryConfiguration retryConfiguration) - Returns:
this
.
-
rateLimiterConfiguration
@Nonnull public ResilienceConfiguration rateLimiterConfiguration(@Nonnull ResilienceConfiguration.RateLimiterConfiguration rateLimiterConfiguration) - Returns:
this
.
-