Class DefaultBulkheadProvider
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultBulkheadProvider
- All Implemented Interfaces:
BulkheadProvider
,GenericDecorator
Default implementation for bulkhead 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.bulkhead.Bulkhead
getBulkhead
(ResilienceConfiguration configuration) Provides a bulkhead.
-
Constructor Details
-
DefaultBulkheadProvider
public DefaultBulkheadProvider()
-
-
Method Details
-
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.
-
getBulkhead
@Nonnull public io.github.resilience4j.bulkhead.Bulkhead getBulkhead(@Nonnull ResilienceConfiguration configuration) Description copied from interface:BulkheadProvider
Provides a bulkhead.- Specified by:
getBulkhead
in interfaceBulkheadProvider
- Parameters:
configuration
- The configuration for constructing the bulkhead.- Returns:
- A bulkhead.
-