Class DefaultCircuitBreakerProvider
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultCircuitBreakerProvider
- All Implemented Interfaces:
CircuitBreakerProvider
,GenericDecorator
public class DefaultCircuitBreakerProvider
extends Object
implements CircuitBreakerProvider, GenericDecorator
Default implementation for circuit breaker provider.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Callable<T>
decorateCallable
(Callable<T> callable, ResilienceConfiguration configuration) Decorates the given callable to enable a resilient property.io.github.resilience4j.circuitbreaker.CircuitBreaker
getCircuitBreaker
(ResilienceConfiguration configuration) Provides a circuit breaker.
-
Constructor Details
-
DefaultCircuitBreakerProvider
public DefaultCircuitBreakerProvider()
-
-
Method Details
-
getCircuitBreaker
@Nonnull public io.github.resilience4j.circuitbreaker.CircuitBreaker getCircuitBreaker(@Nonnull ResilienceConfiguration configuration) Description copied from interface:CircuitBreakerProvider
Provides a circuit breaker.- Specified by:
getCircuitBreaker
in interfaceCircuitBreakerProvider
- Parameters:
configuration
- The configuration for constructing the circuit breaker.- Returns:
- A circuit breaker.
-
decorateCallable
@Nonnull public <T> Callable<T> decorateCallable(@Nonnull Callable<T> callable, @Nonnull ResilienceConfiguration configuration) Description copied from interface:GenericDecorator
Decorates the given callable to enable a resilient property.- Specified by:
decorateCallable
in interfaceGenericDecorator
- Type Parameters:
T
- The type of the callable.- Parameters:
callable
- The callable to decorate.configuration
- The configuration to be used.- Returns:
- The decorated callable.
-