Package dev.failsafe
Class FailurePolicyConfig<R>
- java.lang.Object
-
- dev.failsafe.PolicyConfig<R>
-
- dev.failsafe.FailurePolicyConfig<R>
-
- Type Parameters:
R
- result type
- Direct Known Subclasses:
DelayablePolicyConfig
,FallbackConfig
public abstract class FailurePolicyConfig<R> extends PolicyConfig<R>
Configuration for policies that handle specific failures and conditions.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
exceptionsChecked
Indicates whether exceptions are checked by a configured failure condition(package private) java.util.List<CheckedBiPredicate<R,java.lang.Throwable>>
failureConditions
Conditions that determine whether an execution is a failure-
Fields inherited from class dev.failsafe.PolicyConfig
failureListener, successListener
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FailurePolicyConfig()
protected
FailurePolicyConfig(FailurePolicyConfig<R> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CheckedBiPredicate<R,java.lang.Throwable>>
getFailureConditions()
Returns the conditions under which a result or Throwable should be treated as a failure and handled.boolean
isExceptionsChecked()
Returns whether exceptions are checked by a configured failure condition.-
Methods inherited from class dev.failsafe.PolicyConfig
getFailureListener, getSuccessListener
-
-
-
-
Field Detail
-
exceptionsChecked
boolean exceptionsChecked
Indicates whether exceptions are checked by a configured failure condition
-
failureConditions
java.util.List<CheckedBiPredicate<R,java.lang.Throwable>> failureConditions
Conditions that determine whether an execution is a failure
-
-
Constructor Detail
-
FailurePolicyConfig
protected FailurePolicyConfig()
-
FailurePolicyConfig
protected FailurePolicyConfig(FailurePolicyConfig<R> config)
-
-
Method Detail
-
isExceptionsChecked
public boolean isExceptionsChecked()
Returns whether exceptions are checked by a configured failure condition.
-
getFailureConditions
public java.util.List<CheckedBiPredicate<R,java.lang.Throwable>> getFailureConditions()
Returns the conditions under which a result or Throwable should be treated as a failure and handled.
-
-