Class DefaultRetryProvider
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultRetryProvider
- All Implemented Interfaces:
GenericDecorator
,RetryProvider
Default implementation for a provider of retries.
-
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.retry.Retry
getRetry
(ResilienceConfiguration configuration) Provides a retry.
-
Constructor Details
-
DefaultRetryProvider
public DefaultRetryProvider()
-
-
Method Details
-
getRetry
@Nonnull public io.github.resilience4j.retry.Retry getRetry(@Nonnull ResilienceConfiguration configuration) Description copied from interface:RetryProvider
Provides a retry.- Specified by:
getRetry
in interfaceRetryProvider
- Parameters:
configuration
- The configuration for constructing the retry.- Returns:
- A retry.
-
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.
-