Package org.springframework.retry.policy
Class AlwaysRetryPolicy
java.lang.Object
org.springframework.retry.policy.NeverRetryPolicy
org.springframework.retry.policy.AlwaysRetryPolicy
- All Implemented Interfaces:
Serializable
,RetryPolicy
A
RetryPolicy
that always permits a retry. Can also be used as a base class for
other policies, e.g. for test purposes as a stub.- Author:
- Dave Syer
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.retry.RetryPolicy
NO_MAXIMUM_ATTEMPTS_SET
-
Constructor Summary
-
Method Summary
Methods inherited from class org.springframework.retry.policy.NeverRetryPolicy
close, open, registerThrowable
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.retry.RetryPolicy
getMaxAttempts
-
Constructor Details
-
AlwaysRetryPolicy
public AlwaysRetryPolicy()
-
-
Method Details
-
canRetry
Always returns true.- Specified by:
canRetry
in interfaceRetryPolicy
- Overrides:
canRetry
in classNeverRetryPolicy
- Parameters:
context
- the current retry status- Returns:
- true if the operation can proceed
- See Also:
-