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
Constructors -
Method Summary
Methods inherited from class org.springframework.retry.policy.NeverRetryPolicy
close, open, registerThrowableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.retry.RetryPolicy
getMaxAttempts
-
Constructor Details
-
AlwaysRetryPolicy
public AlwaysRetryPolicy()
-
-
Method Details
-
canRetry
Always returns true.- Specified by:
canRetryin interfaceRetryPolicy- Overrides:
canRetryin classNeverRetryPolicy- Parameters:
context- the current retry status- Returns:
- true if the operation can proceed
- See Also:
-