Class NoResilienceDecorationStrategy
java.lang.Object
com.sap.cloud.sdk.cloudplatform.resilience.NoResilienceDecorationStrategy
- All Implemented Interfaces:
ResilienceDecorationStrategy
Function decorator which does not change the call.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> Callable<T>
decorateCallable
(Callable<T> callable, ResilienceConfiguration configuration, Function<? super Throwable, T> fallbackFunction) Decorate an instance of a callable function.<T> Supplier<T>
decorateSupplier
(Supplier<T> supplier, ResilienceConfiguration configuration, Function<? super Throwable, T> fallbackFunction) Decorate an instance of a supplier function.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.sap.cloud.sdk.cloudplatform.resilience.ResilienceDecorationStrategy
clearAllCacheEntries, clearCache, clearCache, decorateCallable, decorateSupplier, executeCallable, executeCallable, executeSupplier, executeSupplier, queueCallable, queueSupplier
-
Constructor Details
-
NoResilienceDecorationStrategy
public NoResilienceDecorationStrategy()
-
-
Method Details
-
decorateSupplier
@Nonnull public <T> Supplier<T> decorateSupplier(@Nonnull Supplier<T> supplier, @Nonnull ResilienceConfiguration configuration, @Nullable Function<? super Throwable, T> fallbackFunction) Description copied from interface:ResilienceDecorationStrategy
Decorate an instance of a supplier function.- Specified by:
decorateSupplier
in interfaceResilienceDecorationStrategy
- Type Parameters:
T
- The return type of the call.- Parameters:
supplier
- The supplier.configuration
- The configuration of the resilient call.fallbackFunction
- In case of failure, execute this function.- Returns:
- A decorated supplier.
-
decorateCallable
@Nonnull public <T> Callable<T> decorateCallable(@Nonnull Callable<T> callable, @Nonnull ResilienceConfiguration configuration, @Nullable Function<? super Throwable, T> fallbackFunction) Description copied from interface:ResilienceDecorationStrategy
Decorate an instance of a callable function.- Specified by:
decorateCallable
in interfaceResilienceDecorationStrategy
- Type Parameters:
T
- The return type of the call.- Parameters:
callable
- The callable.configuration
- The configuration of the resilient call.fallbackFunction
- In case of failure, execute this function.- Returns:
- A decorated callable.
-