Class DefaultTimeLimiterProvider
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultTimeLimiterProvider
- All Implemented Interfaces:
GenericDecorator,TimeLimiterProvider
public class DefaultTimeLimiterProvider
extends Object
implements TimeLimiterProvider, GenericDecorator
Decorates a callable with a time limiter based on a provided resilience configuration.
-
Constructor Summary
Constructors -
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.timelimiter.TimeLimitergetTimeLimiter(ResilienceConfiguration configuration) Provides a time limiter.
-
Constructor Details
-
DefaultTimeLimiterProvider
public DefaultTimeLimiterProvider()
-
-
Method Details
-
decorateCallable
@Nonnull public <T> Callable<T> decorateCallable(@Nonnull Callable<T> callable, @Nonnull ResilienceConfiguration configuration) Description copied from interface:GenericDecoratorDecorates the given callable to enable a resilient property.- Specified by:
decorateCallablein 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.
-
getTimeLimiter
@Nonnull public io.github.resilience4j.timelimiter.TimeLimiter getTimeLimiter(@Nonnull ResilienceConfiguration configuration) Description copied from interface:TimeLimiterProviderProvides a time limiter.- Specified by:
getTimeLimiterin interfaceTimeLimiterProvider- Parameters:
configuration- The configuration for constructing the time limiter.- Returns:
- A time limiter.
-