org.mule.retry.policies
Class SimpleRetryPolicy
java.lang.Object
org.mule.retry.policies.SimpleRetryPolicy
- All Implemented Interfaces:
- RetryPolicy
public class SimpleRetryPolicy
- extends Object
- implements RetryPolicy
Allows to configure how many times a retry should be attempted and how long to wait between retries.
Method Summary |
PolicyStatus |
applyPolicy(Throwable cause)
|
protected boolean |
isApplicableTo(Throwable cause)
Indicates if the policy is applicable for the cause that caused the policy invocation. |
protected boolean |
isExhausted()
Determines if the policy is exhausted or not comparing the original configuration against the current state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
retryCounter
protected SimpleRetryPolicy.RetryCounter retryCounter
SimpleRetryPolicy
public SimpleRetryPolicy(long frequency,
int retryCount)
applyPolicy
public PolicyStatus applyPolicy(Throwable cause)
- Specified by:
applyPolicy
in interface RetryPolicy
isApplicableTo
protected boolean isApplicableTo(Throwable cause)
- Indicates if the policy is applicable for the cause that caused the policy invocation. Subclasses can override
this method in order to filter the type of exceptions that does not deserve a retry.
- Returns:
- true if the policy is applicable, false otherwise.
isExhausted
protected boolean isExhausted()
- Determines if the policy is exhausted or not comparing the original configuration against the current state.
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.