org.springframework.data.jdbc.retry
Class JdbcRetryPolicy
java.lang.Object
org.springframework.retry.policy.ExceptionClassifierRetryPolicy
org.springframework.data.jdbc.retry.JdbcRetryPolicy
- All Implemented Interfaces:
- org.springframework.retry.RetryPolicy
public class JdbcRetryPolicy
- extends org.springframework.retry.policy.ExceptionClassifierRetryPolicy
JDBC specific implementation of a RetryPolicy that checks the Exception for clues
to whether retry should be attempted or not.
- Since:
- 1.0
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
| Methods inherited from class org.springframework.retry.policy.ExceptionClassifierRetryPolicy |
close, open, registerThrowable, setExceptionClassifier, setPolicyMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
JdbcRetryPolicy
public JdbcRetryPolicy()
getRecoverableErrorCodes
public Integer[] getRecoverableErrorCodes()
setRecoverableErrorCodes
public void setRecoverableErrorCodes(Integer[] recoverableErrorCodes)
getMaxNumberOfRetries
public int getMaxNumberOfRetries()
setMaxNumberOfRetries
public void setMaxNumberOfRetries(int maxNumberOfRetries)
canRetry
public boolean canRetry(org.springframework.retry.RetryContext retryContext)
- This gets called for any new invocation. Make sure that we haven't exceeded the max number of retries.
- Specified by:
canRetry in interface org.springframework.retry.RetryPolicy- Overrides:
canRetry in class org.springframework.retry.policy.ExceptionClassifierRetryPolicy