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 Details

    • DefaultTimeLimiterProvider

      public DefaultTimeLimiterProvider()
  • 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.
    • getTimeLimiter

      @Nonnull public io.github.resilience4j.timelimiter.TimeLimiter getTimeLimiter(@Nonnull ResilienceConfiguration configuration)
      Description copied from interface: TimeLimiterProvider
      Provides a time limiter.
      Specified by:
      getTimeLimiter in interface TimeLimiterProvider
      Parameters:
      configuration - The configuration for constructing the time limiter.
      Returns:
      A time limiter.