public class TransactionalRetryProxy<T> extends Object implements InvocationHandler
SqlRetry and Transactional. The annotated methods will be called accordingly:
SqlRetry will be caught and the method will be re-executedTransactional will be executed after creating a transaction, and all operations done
via MultiDataSourceJdbcResource will use the created transaction.| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getProxy(SqlRetryHandler sqlRetryHandler,
MultiDataSourceJdbcResource jdbcResourceHandler,
T interfaceObject)
Gets the proxy interface for the given
TxnStore. |
Object |
invoke(Object proxy,
Method method,
Object[] args) |
public static <T> T getProxy(SqlRetryHandler sqlRetryHandler, MultiDataSourceJdbcResource jdbcResourceHandler, T interfaceObject)
TxnStore.sqlRetryHandler - Responsible to re-execute the methods in case of failure.interfaceObject - The real object to proxy.Copyright © 2024 The Apache Software Foundation. All rights reserved.