Class DefaultCachingDecorator
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultCachingDecorator
- All Implemented Interfaces:
GenericDecorator
Default caching decorator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> javax.cache.configuration.Configuration<GenericCacheKey<?,
?>, T> Creates a cache configuration to describe the cache behavior.<T> Callable<T>
decorateCallable
(Callable<T> callable, ResilienceConfiguration configuration) Decorates the given callable to enable a resilient property.
-
Constructor Details
-
DefaultCachingDecorator
public DefaultCachingDecorator()
-
-
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.
-
createCacheConfiguration
@Nonnull protected <T> javax.cache.configuration.Configuration<GenericCacheKey<?,?>, createCacheConfigurationT> (@Nonnull ResilienceConfiguration.CacheConfiguration configuration) Creates a cache configuration to describe the cache behavior.- Type Parameters:
T
- The cache value type.- Parameters:
configuration
- The generic cache configuration.- Returns:
- A new instance of MutableConfiguration.
-