public interface RetryTransactionProvider
RetryTransactionAspect, which implements the RetryTransaction functionality.RetryTransaction| Modifier and Type | Interface and Description |
|---|---|
static class |
RetryTransactionProvider.RetrySetup<T>
Holds the configuration information that is required when applying retry logic.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAttemptNumber()
Get the current transaction attempt number in the inner-most active transaction.
|
int |
getAttemptNumber(String transactionManagerName)
Get the current transaction attempt number for the specified transaction manager.
|
long |
getInitialDelayDefault()
Get the aspect-wide default for
RetryTransaction.initialDelay(). |
long |
getMaximumDelayDefault()
Get the aspect-wide default for
RetryTransaction.maximumDelay(). |
int |
getMaxRetriesDefault()
Get the aspect-wide default for
RetryTransaction.maxRetries(). |
PersistenceExceptionTranslator |
getPersistenceExceptionTranslator()
Get the configured exception translator.
|
<T> T |
retry(RetryTransactionProvider.RetrySetup<T> setup)
Perform a transaction, retrying as necessary.
|
PersistenceExceptionTranslator getPersistenceExceptionTranslator()
int getMaxRetriesDefault()
RetryTransaction.maxRetries().long getInitialDelayDefault()
RetryTransaction.initialDelay().long getMaximumDelayDefault()
RetryTransaction.maximumDelay().int getAttemptNumber()
Equivalent to getAttemptNumber(null).
int getAttemptNumber(String transactionManagerName)
transactionManagerName - transaction manager name, or null to match all<T> T retry(RetryTransactionProvider.RetrySetup<T> setup)
This method provides a way to apply retry logic directly without going through a method woven with the aspect.
T - transaction return typesetup - retryable transaction setupIllegalArgumentException - if setup is nullCopyright © 2020. All rights reserved.