Package dev.failsafe.spi
Interface FailurePolicy<R>
-
- Type Parameters:
R- result type
- All Superinterfaces:
Policy<R>
- All Known Implementing Classes:
CircuitBreakerImpl,FallbackImpl,RetryPolicyImpl
public interface FailurePolicy<R> extends Policy<R>
A policy that can handle specifically configured failures.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description FailurePolicyConfig<R>getConfig()Returns the policy config.default booleanisFailure(R result, java.lang.Throwable exception)Returns whether an executionresultorexceptionare considered a failure according to the policy configuration.-
Methods inherited from interface dev.failsafe.Policy
toExecutor
-
-
-
-
Method Detail
-
getConfig
FailurePolicyConfig<R> getConfig()
Description copied from interface:PolicyReturns the policy config.
-
isFailure
default boolean isFailure(R result, java.lang.Throwable exception)
Returns whether an executionresultorexceptionare considered a failure according to the policy configuration.
-
-