Package dev.failsafe.internal
Class RetryPolicyImpl<R>
- java.lang.Object
-
- dev.failsafe.internal.RetryPolicyImpl<R>
-
- Type Parameters:
R- result type
- All Implemented Interfaces:
Policy<R>,RetryPolicy<R>,DelayablePolicy<R>,FailurePolicy<R>
public class RetryPolicyImpl<R> extends java.lang.Object implements RetryPolicy<R>, FailurePolicy<R>, DelayablePolicy<R>
ARetryPolicyimplementation.- See Also:
RetryPolicyBuilder
-
-
Field Summary
Fields Modifier and Type Field Description private RetryPolicyConfig<R>config
-
Constructor Summary
Constructors Constructor Description RetryPolicyImpl(RetryPolicyConfig<R> config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryPolicyConfig<R>getConfig()Returns theRetryPolicyConfigthat the RetryPolicy was built with.booleanisAbortable(R result, java.lang.Throwable failure)Returns whether an execution result can be aborted given the configured abort conditions.PolicyExecutor<R>toExecutor(int policyIndex)Returns aPolicyExecutorcapable of handling an execution for the Policy.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.failsafe.spi.DelayablePolicy
computeDelay
-
Methods inherited from interface dev.failsafe.spi.FailurePolicy
isFailure
-
-
-
-
Field Detail
-
config
private final RetryPolicyConfig<R> config
-
-
Constructor Detail
-
RetryPolicyImpl
public RetryPolicyImpl(RetryPolicyConfig<R> config)
-
-
Method Detail
-
getConfig
public RetryPolicyConfig<R> getConfig()
Description copied from interface:RetryPolicyReturns theRetryPolicyConfigthat the RetryPolicy was built with.- Specified by:
getConfigin interfaceDelayablePolicy<R>- Specified by:
getConfigin interfaceFailurePolicy<R>- Specified by:
getConfigin interfacePolicy<R>- Specified by:
getConfigin interfaceRetryPolicy<R>
-
isAbortable
public boolean isAbortable(R result, java.lang.Throwable failure)
Returns whether an execution result can be aborted given the configured abort conditions.- See Also:
RetryPolicyBuilder.abortOn(Class...),RetryPolicyBuilder.abortOn(List),RetryPolicyBuilder.abortOn(CheckedPredicate),RetryPolicyBuilder.abortIf(CheckedBiPredicate),RetryPolicyBuilder.abortIf(CheckedPredicate),RetryPolicyBuilder#abortWhen(R)
-
toExecutor
public PolicyExecutor<R> toExecutor(int policyIndex)
Description copied from interface:PolicyReturns aPolicyExecutorcapable of handling an execution for the Policy.- Specified by:
toExecutorin interfacePolicy<R>
-
-