Class DefaultCachingDecorator

java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience4j.DefaultCachingDecorator
All Implemented Interfaces:
GenericDecorator

public class DefaultCachingDecorator extends Object implements GenericDecorator
Default caching decorator.
  • 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 interface GenericDecorator
      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<?,?>,T> createCacheConfiguration(@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.